-
Notifications
You must be signed in to change notification settings - Fork 87
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
ci: add deploy cleanup step for Vercel tests #2699
Conversation
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
… deploying e2e report using branch results
@@ -31,7 +31,7 @@ jobs: | |||
id: get-run-id | |||
run: | | |||
if [ "${{ inputs.use-branch }}" == "true" ]; then | |||
E2E_RUN_ID=$(gh run list -w test-e2e.yml -e workflow_dispatch -s success -b $GITHUB_REF_NAME --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY) | |||
E2E_RUN_ID=$(gh run list -w test-e2e.yml -s success -b $GITHUB_REF_NAME --json databaseId --jq ".[0].databaseId" --repo $GITHUB_REPOSITORY) |
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.
not really related to deleting deploys, but this allow to generate test results report from runs on pull request (when label is applied) and not just on workflow_dispatch
@@ -28,7 +28,7 @@ env: | |||
DATADOG_TRACE_NEXTJS_TEST: true | |||
DATADOG_API_KEY: foo | |||
TEST_CONCURRENCY: 2 | |||
NEXT_E2E_TEST_TIMEOUT: 300000 | |||
NEXT_E2E_TEST_TIMEOUT: 600000 |
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.
Similarly as above - not related to deleting deploys, but some of the test suites seemed to be on the verge of timeouts and would sometimes go over so this might reduce some of the flakiness (not very confident in that part due to troubles with reproducing problems locally or even when running individual tests in github actions and not locally, but I think it's worth a try)
) | ||
} else { | ||
require('console').log(`Successfully deleted deploy with deploy_id ${this._deployId}`) | ||
this._shouldDeleteDeploy = 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.
learning - why do we need to set this to false in the end? will it keep attempting and looping if we don't?
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.
It should not, this is just in case - I was looking at base class we extend - it does have some checks that look if something was deleted / destroyed already - there they throw:
but I didn't want to play with this as I don't fully know the contract that Vercel tests have with those modules - so this just felt safe way to just avoid wasting time on calling API to delete deploy that was already deleted in case this is called multiple times (deleteDeploy
api call is not immediate - it takes couple seconds to finish so just no point in calling it again)
Description
Documentation
Tests
You can test this change yourself like so:
Relevant links (GitHub issues, etc.) or a picture of cute animal