Skip to content

fix(ci): bootstrap yarn via corepack to match packageManager pin#394

Merged
JosephSamirL merged 2 commits into
mainfrom
fix/ci-corepack-yarn-bootstrap
May 25, 2026
Merged

fix(ci): bootstrap yarn via corepack to match packageManager pin#394
JosephSamirL merged 2 commits into
mainfrom
fix/ci-corepack-yarn-bootstrap

Conversation

@abbaseya
Copy link
Copy Markdown
Contributor

Summary

  • Three workflows still bootstrap yarn via the v1-era yarn set version berry trick. Since the packageManager: yarn@4.10.3 pin landed in 38cc9a9, that bootstrap now fails on push to main — the runner's pre-installed Yarn 1.22.22 refuses to operate against a project with a packageManager field and demands corepack.
  • Concrete fallout from the PR chore: release main #390 merge (today, 15:01 UTC):
    • pages.yml failed at "Installing npm packages" → run 26406885986.
    • release-please.yml publish jobs failed at "Install deps" for packages/types, packages/utils, packages/js-sdk → run 26406886058. The release tags got created (v3.13.0 / v2.4.0 / v4.4.2 exist on GitHub), but none were published to npm.
    • publish-package.yml has the same defect — latent until the next manual workflow_dispatch.
  • Fix mirrors the working pattern already in qa.yml: corepack enable + corepack prepare yarn@4.10.3 --activate (matching the explicit pin), then plain yarn install. The yarn set version berry line is removed from all three workflows.
  • Also bumps pages.yml's actions/setup-node@v1 and actions/checkout@v2 to @v4 (both prior majors are EOL).

Test plan

  • CI: Running QA automated checks passes on this PR (it doesn't use any of the changed files, but should remain green).
  • After merge, the auto-triggered Updating Github pages run on main succeeds.
  • After merge, manually publish the 3 pending releases:
    • gh workflow run publish-package.yml -f tag=js-sdk-types-v3.13.0
    • gh workflow run publish-package.yml -f tag=js-sdk-utils-v2.4.0
    • gh workflow run publish-package.yml -f tag=js-sdk-v4.4.2
  • Confirm all three appear on npm with the new versions.

🤖 Generated with Claude Code

Three workflows still bootstrapped yarn via `yarn set version berry`
(a Yarn v1 escape hatch) before installing. Since 38cc9a9 pinned
`"packageManager": "yarn@4.10.3"` in package.json, the runner's
pre-installed Yarn 1.22.22 refuses to operate against the project
and errors with "Corepack must currently be enabled" — failing the
first push to main after the pin.

Concrete fallout from PR #390's merge:
- pages.yml: failed at "Installing npm packages"
- release-please.yml publish jobs: failed at "Install deps" for
  packages/types, packages/utils, packages/js-sdk — leaving the
  v3.13.0 / v2.4.0 / v4.4.2 releases created on GitHub but never
  published to npm.
- publish-package.yml: same defect, latent until next manual
  workflow_dispatch.

Replace the v1 bootstrap with `corepack enable` +
`corepack prepare yarn@4.10.3 --activate` (matching the
package.json pin), then a plain `yarn` install — same pattern
qa.yml already uses successfully.

Also bumps pages.yml's `actions/setup-node@v1` and
`actions/checkout@v2` to `@v4` (both prior versions are EOL).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@abbaseya abbaseya self-assigned this May 25, 2026
…ad-only

Plain `yarn` in CI is *effectively* immutable because Yarn 4 enables
`enableImmutableInstalls` when `CI=true` (which GitHub Actions
auto-sets). Relying on that is brittle — `--immutable` makes the
intent explicit and fails loudly with YN0028 if yarn.lock would be
mutated, instead of depending on environment auto-detection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@abbaseya abbaseya requested a review from a team May 25, 2026 15:20
@JosephSamirL JosephSamirL merged commit 55dc5ae into main May 25, 2026
5 checks passed
@JosephSamirL JosephSamirL deleted the fix/ci-corepack-yarn-bootstrap branch May 25, 2026 15:28
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.

2 participants