Skip to content

build: Install dependencies in CI with frozen lockfile #5348

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

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

lforst
Copy link
Member

@lforst lforst commented Jul 1, 2022

Because we keep running into situations where our builds fail out of the blue (#5327 (comment), #5296 (comment)), I propose we install our dependencies in CI with --frozen-lockfile which simply installs packages exactly as described in yarn.lock. Additionally, we want to pin as many dependencies in our CI as possible, just so we can have reproducible builds.

This PR:

  • adds a --frozen-lockfile flag to yarn install in our CI
  • Pins a ts-node dependency version in CI

@lforst lforst self-assigned this Jul 1, 2022
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I missed parts around the discussion about this in Daily. Happy to ✅ this but are there potential drawbacks other than us potentially then depending on a bug in the specific version we pinned?

@lforst
Copy link
Member Author

lforst commented Jul 1, 2022

I think I missed parts around the discussion about this in Daily. Happy to ✅ this but are there potential drawbacks other than us potentially then depending on a bug in the specific version we pinned?

Yeah, let's definitely discuss this with the rest of the team!

The upside this change has, is that we will not have broken things out of nowhere. Imagine rollup has a bug in a new patch. We didn't notice locally because we don't run yarn install in between our local builds, but CI will produce corrupted builds because it uses the new patch - the worst-case scenario being during a release build.

With this change we will be able to test things, each time we update our yarn.lock. We might still depend on bugs, but at the very least there's no rug being pulled beneath our feet when the bug is suddenly fixed in a patch.

@Lms24
Copy link
Member

Lms24 commented Jul 1, 2022

Thanks for explaining. Makes sense to me!

@AbhiPrasad
Copy link
Member

This won't help with ember, as it has a separate install process for it's integration tests, but overall is a good change that will prevent stale yarn.lock!

@lforst
Copy link
Member Author

lforst commented Jul 6, 2022

Merging this. If this messes something up we can revisit.

@lforst lforst merged commit 67080e7 into master Jul 6, 2022
@lforst lforst deleted the lforst-ci-frozen-lockfile branch July 6, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants