Skip to content

Conversation

@eYinka
Copy link
Contributor

@eYinka eYinka commented Oct 24, 2025

Following the deprecation of Yarn 1.xx and 2.xx, we have upgraded Whitehall's base image to use Yarn v4 . Consequently, flags like --production --frozen-lockfile have been removed.

Note: Due to lockfile conflicts on the current Github Action runner (uses yarn v1), we have had to switch to using the corepack branch which supports Yarn v4 and will not throw errors in CI.

PR for local Docker: alphagov/govuk-docker#908

Flags: https://yarnpkg.com/cli/install

JIRA: https://gov-uk.atlassian.net/browse/WHIT-1954

Checks:

  • Javascript rake tasks are running fine
  • Can build the app locally with make whitehall
  • Can run the UI without broken Javascript
  • Github CI is fine

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

@eYinka eYinka marked this pull request as draft October 24, 2025 17:13
@eYinka eYinka force-pushed the upgrade-yarn-4 branch 2 times, most recently from 0115c40 to 2f0a3dc Compare October 27, 2025 16:22
@eYinka eYinka marked this pull request as ready for review October 27, 2025 16:47
@eYinka eYinka force-pushed the upgrade-yarn-4 branch 3 times, most recently from d4a1ec2 to dbe05fb Compare October 27, 2025 17:10
Copy link
Contributor

@matthillco matthillco left a comment

Choose a reason for hiding this comment

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

I've successfully remade the app in docker, have run it with no JS errors in the UI, and no JS errors from the jasmine tests. So it looks good to go, nice work.

Copy link
Contributor

@ChrisBAshton ChrisBAshton left a comment

Choose a reason for hiding this comment

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

Looks good, and well done for working through this and figuring it all out! ⭐

I'd be a bit nervous about merging without ensuring it works for sure. Have you tried deploying this branch of Whitehall to integration?

From the Slack thread it sounds as though this is a bit of a workaround. I'd be keen to get a Platform Engineering perspective on whether or not we should just hold off. Upgrading Yarn isn't top priority and it can certainly wait a few months if there's better centralised support in the pipeline.

(I was kind of under the impression Whitehall was behind the other apps when it comes to Yarn - not that we'd be paving the way for an upgrade where nobody else has before!)

@eYinka
Copy link
Contributor Author

eYinka commented Oct 28, 2025

Considering that an exception was made for Whitehall (how temporary, not sure), I'll say it makes sense to probably wait. Or at least when the platform-eng team announces a permanent workflow for recent yarn versions.

I was previously under the impression that some other apps have been upgraded too.

Following the deprecation of Yarn 1.xx and 2.xx, we have upgraded Whitehall's base image to use Yarn v4.
Consequently, flags like `--production` `--frozen-lockfile` have been removed.

Associated PR: alphagov/govuk-docker#908

Flags: https://yarnpkg.com/cli/install

JIRA: https://gov-uk.atlassian.net/browse/WHIT-1954
@ChrisBAshton ChrisBAshton marked this pull request as draft October 29, 2025 10:14
@ChrisBAshton
Copy link
Contributor

Converted to draft. We've decided to hold off until there's support more widely - see issue on Platform Engineering board: alphagov/govuk-infrastructure#3068

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.

4 participants