This repository was archived by the owner on Sep 30, 2024. It is now read-only.
ci: wrap yarn into a retrying loop#39454
Merged
Merged
Conversation
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 1da629b...125bea1.
|
Contributor
|
Codenotify: Notifying subscribers in OWNERS files for diff 1da629b...125bea1.
|
jhchabran
commented
Jul 26, 2022
burmudar
approved these changes
Jul 26, 2022
bobheadxi
approved these changes
Jul 26, 2022
marekweb
reviewed
Jul 26, 2022
kalanchan
approved these changes
Jul 26, 2022
cd395ff to
125bea1
Compare
LawnGnome
added a commit
that referenced
this pull request
Jul 27, 2022
This fixes the `sourcegraph-async` breakage introduced in #39454: most invocations of `yarn` that were replaced by `yarn-install-with-retry.sh` did not disable lifecycle scripts, but the new unified `yarn-install-with-retry.sh` script did globally. This moves the `--ignore-scripts` flag back into the only script that actually used it, which is `yarn-deduplicate.sh`.
LawnGnome
added a commit
that referenced
this pull request
Jul 27, 2022
This fixes the `sourcegraph-async` breakage introduced in #39454: most invocations of `yarn` that were replaced by `yarn-install-with-retry.sh` did not disable lifecycle scripts, but the new unified `yarn-install-with-retry.sh` script did globally. This moves the `--ignore-scripts` flag back into the only script that actually used it, which is `yarn-deduplicate.sh`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Behold, duct tape to the rescue.
This wraps
yarn installcommands within a loop that check for the presence of "unexpected errors ..." that are announcing that some network / 500 error / whatever happened when requesting stuff on the registry.If such an error is found, the script will run yarn again. If we did not find such an error, the script will simply exit, like it would do without the loop.
If we go over
$MAX_TIMEOUT_IN_SECONDSthe script will simply abort.@sourcegraph/frontend-platform I know that a possible fix is coming in a few weeks, but this could at least stop the bleeding until then.
Test plan
main-dry-run
To test this locally, I botched the registry url in
yarn.lockto reproduce the kind of errors we've been seeing in CI. Remember to wipe your./node_modulesfolder before doing so, otherwise it won't be taken in account.