ci: add max_auto_reruns to test-image job #1428
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Situation
The CircleCI pipeline based on circle.yml regularly exhibits flakiness due to network issues. The highest number of these issues are related to 502 Bad Gateway errors connecting to https://jsonplaceholder.cypress.io.
An example is https://app.circleci.com/pipelines/github/cypress-io/cypress-docker-images/2745/workflows/ed480f85-f0ba-4d64-b7f1-8a38620cb50e/jobs/86471 which issues
cy.request('https://jsonplaceholder.cypress.io/comments')
and fails with a 502 Bad Gateway error:https://jsonplaceholder.cypress.io/comments is hosted on
cloudflare
.Change
Making use of the CircleCI Automatic reruns functionality, add
max_auto_reruns
andauto_rerun_delay
to thetest-image
job,test
step:The 5 minute delay is an empirical choice, assuming that the Cloudflare sources are rate-limited and need time to reset. CircleCI allows a maximum of 10 minutes delay.
With knowledge of how https://jsonplaceholder.cypress.io is set up, it may be possible to choose a more optimal delay time. A related question posted to #1168 (comment) is still open.