Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use devcluster for react tests [INFENG-449] #9185

Merged
merged 35 commits into from
Apr 22, 2024

Conversation

djanicekpach
Copy link
Contributor

@djanicekpach djanicekpach commented Apr 17, 2024

test: use devcluster for react tests INFENG-449

Ticket

infeng-449

Description

use devcluster for react tests rather than a shared backend. THis should alleviate a lot of repeatability issues at the cost of speed, but I think the trade-off has shown that it's worth it.

This overrides ENV variables setup by circle-ci. (lines 1701-1705) Once this merges, I can change the variables in circle and I'll create a -new PR to remove the override from this config. I think that lets this merge with 0 downtime. If I change the ENV vars it will have a mismatch before or after this merges briefly.

Fast-follow items that I'll work on next once tests are passing again: https://hpe-aiatscale.atlassian.net/browse/INFENG-636

Test Plan

Ran CI

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@djanicekpach djanicekpach requested a review from a team as a code owner April 17, 2024 22:08
@cla-bot cla-bot bot added the cla-signed label Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 37.46%. Comparing base (86be18a) to head (aaa3123).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9185      +/-   ##
==========================================
- Coverage   44.75%   37.46%   -7.29%     
==========================================
  Files        1266      597     -669     
  Lines      154655    92951   -61704     
  Branches     2438     2439       +1     
==========================================
- Hits        69212    34825   -34387     
+ Misses      85211    57894   -27317     
  Partials      232      232              
Flag Coverage Δ
backend ?
harness 42.36% <ø> (-21.81%) ⬇️
web 35.38% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...react/src/e2e/models/pages/Admin/UserManagement.ts 0.00% <0.00%> (ø)
webui/react/src/e2e/models/pages/SignIn.ts 0.00% <0.00%> (ø)
webui/react/src/e2e/models/pages/Workspaces.ts 0.00% <0.00%> (ø)
webui/react/src/e2e/models/pages/ProjectDetails.ts 0.00% <0.00%> (ø)

... and 758 files with indirect coverage changes

Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit aaa3123
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6622c24cceeef80008bd1d99
😎 Deploy Preview https://deploy-preview-9185--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@djanicekpach djanicekpach force-pushed the djanicek/infenf-449/devcluster-react branch from db05587 to bc8c6bf Compare April 18, 2024 16:30
@djanicekpach djanicekpach requested review from a team as code owners April 19, 2024 14:41
@djanicekpach djanicekpach requested a review from ioga April 19, 2024 15:16
@ioga
Copy link
Contributor

ioga commented Apr 19, 2024

can we please have human-readable commit titles so one could make sense of what's happening from git log --oneline without going to JIRA? e.g. test: use devcluster for react tests [INFENG-449].

@djanicekpach djanicekpach changed the title test: Djanicek/infenf 449/devcluster react test: use devcluster for react tests [INFENG-449] Apr 19, 2024
.circleci/devcluster/react.devcluster.yaml Outdated Show resolved Hide resolved
.circleci/devcluster/react.devcluster.yaml Outdated Show resolved Hide resolved
.circleci/devcluster/react.devcluster.yaml Outdated Show resolved Hide resolved
Comment on lines 1961 to 1972
- run: |
apt-get update && sudo apt-get install -y ca-certificates curl make sudo python3-pip iproute2 tar
# Docker repo setup DNJ TODO - move to own step and vet all deps
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have other jobs using devcluster on circleci, and they don't have to setup docker like this. why do we need this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect it was from the container_name on the postgres config. I assume that starts postgres in docker. I'm trying with that removed. Is this config documented somewhere? I looked in devcluster and didn't see anything that stuck out in the help or readme

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a bunch of jobs in real_config.yaml which run install-devcluster and start-devcluster. they use the same machine-image, and they don't setup docker.

e.g. here's one which runs db stage only so it'll need docker: https://github.com/determined-ai/determined/blob/main/.circleci/real_config.yml#L1905

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember now. In the initial iteration we used the official playwright image, but with devcluster this leads to a docker-in-docker pain-scenario. I switched to using our default vm image, using standard dependency steps, and just installing playwright after. I deleted this step entirely since it shouldn't be necessary anymore. I'll update this comment if it seems like any additional dependencies are needed.

@djanicekpach djanicekpach force-pushed the djanicek/infenf-449/devcluster-react branch from 92ea55f to aaa3123 Compare April 19, 2024 19:13
@djanicekpach
Copy link
Contributor Author

djanicekpach commented Apr 19, 2024

OK, both test-e2e-react jobs are now passing, and I'm rebased on main with Eric's latest changes, so this should unstick the UI tests at least. I have some follow-ups to get it stable long term, but I figure it's best to get it passing for now.
follow-ups: https://hpe-aiatscale.atlassian.net/browse/INFENG-636

@djanicekpach djanicekpach requested a review from ioga April 19, 2024 19:28
@djanicekpach djanicekpach merged commit e7d870e into main Apr 22, 2024
81 of 95 checks passed
@djanicekpach djanicekpach deleted the djanicek/infenf-449/devcluster-react branch April 22, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants