Decrease frequency of yarn install failures in monitoring#642
Open
michalinacienciala wants to merge 3 commits intomainfrom
Open
Decrease frequency of yarn install failures in monitoring#642michalinacienciala wants to merge 3 commits intomainfrom
yarn install failures in monitoring#642michalinacienciala wants to merge 3 commits intomainfrom
Conversation
We've published new versions of the `@keep-network/tbtc-v2` and `@keep-network/tbtc-v2.ts` packages The versions of tghose packages for the development environment don't contain `prepare-dependencies.sh` script from `@threshold-network/solidity-contracts` which was causing random failures during `yarn install`. The `goerli` and `mainnet` packages still contain that script, so we won't completely eliminate the problem, but should decrease its frequency. In a separate commit we'll add a workaround that should help with eliminating the problem in CI.
Sometimes during installation of the `monitoring` project we were getting random failures related to the presence of the `prepare-dependencies.sh` script from `threshold-network/solidity-contracts` in the project subdependencies. Lately we managed to remove the script from the `development`-tagged packages, but the script is still present in `goerli` and `mainnet` packages. As `monitoring` project installs `goerli` and `mainnet` `@keep-network/tbtc-v2` packages during `yarn install`, the random failures may still occur. As a workaround for this problem in our CI we will run install step with the `--ignore-scripts` flag which installs the dependencies without running the postinstall scripts (neither in subdependencies nor in the main project). We then add a step that executes `yarn run postinstall` - this way we still execute any postinstall scripts from the main project (currently it's `npm rebuild bcrypto`) script.
There are two reasons why we need to run `yarn install --frozen-lockfile` with the `--ignore-scripts` flag and run `yarn run postinstall` afterwards: 1. Sometimes during installation of the `monitoring` project we were getting random failures related to the presence of the `prepare-dependencies.sh` script from `threshold-network/solidity-contracts` in the project subdependencies. Lately we managed to remove the script from the `development`-tagged packages, but the script is still present in `goerli` and `mainnet` packages. As `monitoring` project installs `goerli` and `mainnet` `@keep-network/tbtc-v2` packages during `yarn install`, the random failures may still occur. As a workaround for this problem we will ca run install step with the `--ignore-scripts` flag which installs the dependencies without running the postinstall scripts (neither in subdependencies nor in the main project). We then add a step that executes `yarn run postinstall` - this way we still execute any postinstall scripts from the main project (currently it's `npm rebuild bcrypto`) script. 2. The `bcoin` holds their `node_modules` in VCS (https://github.com/bcoin-org/bcoin/tree/master/node_modules). That means `bcrypto` dependency is already here when we run `yarn install`. For an unknown reason, `yarn install` does not build all native components in that case, hence the need for manual `postinstall` that does it again under the hood.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In this PR we:
tbtc-v2andtbtc-v2.tspackages to decrease frequency of manually runyarn install's failurespostinstallscripts separately fromyarn install(to eliminateyarn installfailures in CI)postinstallseparately in the Dockerfile (as requested in Don't run postinstall script separately from yarn install #629 (comment))