Skip to content
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

Do not install yarn latest in docker build #2968

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

richardTowers
Copy link
Contributor

As per the documentation for yarn set version:

The version specifier can be:

- a tag:

  - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release

So yarn set version berry is equivalent to yarn set version latest, which will install newly released versions of yarn.

There was a release of yarn v4.0.0 yesterday - https://github.com/yarnpkg/berry/releases/tag/%40yarnpkg%2Fcli%2F4.0.0 which is now breaking the build, because it produces a slightly different lockfile.

The docker build should use whichever yarn version package.json uses, not install the latest version on the fly.

As per the documentation for `yarn set version`:

    The version specifier can be:

    - a tag:

      - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`)
        release

So `yarn set version berry` is equivalent to `yarn set version latest`,
which will install newly released versions of yarn.

There was a release of yarn v4.0.0 yesterday - https://github.com/yarnpkg/berry/releases/tag/%40yarnpkg%2Fcli%2F4.0.0
which is now breaking the build, because it produces a slightly
different lockfile.

The docker build should use whichever yarn version package.json uses,
not install the latest version on the fly.
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-2968 October 23, 2023 10:25 Inactive
@sengi
Copy link
Contributor

sengi commented Oct 23, 2023

There might be a bunch more of these - istr it was a workaround for something. (edit: apparently it was only in this and Frontend.)

@richardTowers richardTowers merged commit 07d4dbc into main Oct 23, 2023
@richardTowers richardTowers deleted the do-not-install-yarn-latest branch October 23, 2023 11:55
richardTowers added a commit to alphagov/frontend that referenced this pull request Oct 23, 2023
As per the documentation for `yarn set version`:

    The version specifier can be:

    - a tag:

      - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release

So `yarn set version berry` is equivalent to `yarn set version latest`, which will install newly released versions of yarn.

There was a release of yarn v4.0.0 yesterday - https://github.com/yarnpkg/berry/releases/tag/%40yarnpkg%2Fcli%2F4.0.0 which is now breaking the build, because it produces a slightly different lockfile.

The docker build should use whichever yarn version package.json uses, not install the latest version on the fly.

See also: alphagov/government-frontend#2968
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