-
Notifications
You must be signed in to change notification settings - Fork 0
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
E2E sharding part 2 #90
Conversation
.github/workflows/e2e-tests.yml
Outdated
matrix: | ||
shard: [1, 2, 3] | ||
total_shards: [3] # Github Actions doesn't have a built-in method to get the length of an array | ||
fail-fast: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a fail-fast
to false
on the matrix strategy here so even if one shard fails, we still can generate a report out of othershard runs that have succeeded. See PR description for a demo of this working
is this PR ready for review? i'm confused it looks like there are some changes in here that were already in the previous PR related to e2e tests. did you merge main into this branch |
@lorenyu There was some shuffle due to the template deploy workflow not working for a couple days - I ended up branching this PR of the sharding part 1 PR just to get started before the template-deploy was fixed - but I'm not sure what parts you're thinking of that are older.
I've updated more today, including removing the docker setup cache because it was taking too long - I think it's ready for review |
e2e/package-lock.json
Outdated
@@ -4,231 +4,231 @@ | |||
"lockfileVersion": 2, | |||
"requires": true, | |||
"packages": { | |||
"": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to update the lock file to run tests natively/locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good but let's resolve the issue with some previous changes not appearing on main first
BASE_URL=${{ inputs.service_endpoint }} \ | ||
CURRENT_SHARD=${{ matrix.shard }} \ | ||
TOTAL_SHARDS=${{ matrix.total_shards }} | ||
make e2e-test \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the extra indent
id: cache-node | ||
uses: actions/cache@v4 | ||
with: | ||
path: e2e/node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indenting too much here let's be consistent. do you need to check editor settings? i would have imagined the editor would autoformat on save
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using actionlint for this? What formatter are you using locally for these yml files
Co-authored-by: Loren Yu <[email protected]>
Merged on |
Ticket
Resolves navapbc/template-infra#720
Changes
e2e-merge-reports
fail-fast
tofalse
so reports can be generated if one of the shards failsContext for reviewers
Sharding part 1 PR Run e2e tests in parallel shards template-infra#776
Took a pass at uploading a saved docker image to github actions artifact - which means we avoid rebuilding image in each shard - however this ended up taking longer to upload and download from artifacts. It's faster just to build in each concurrent shard run with
make e2e-test
buildx
for how that worked - https://github.com/navapbc/platform-test-nextjs/actions/runs/11808432981/job/32897151032Testing
Local sharding and report demo:
the above commands create a combined report locally:
Demo of one shard failing (
fail-fast
demo) - html report is still created:output.mov
Demo of nodejs caching - skips
make e2e-setup-ci
step on cache hit:Preview environment