Skip to content

fix: stop Corepack prompting in the Renovate container - #10303

Merged
cryptodev-2s merged 3 commits into
mainfrom
fix/renovate-corepack-prompt
Sep 21, 2026
Merged

cryptodev-2s merged 3 commits into
mainfrom
fix/renovate-corepack-prompt

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

The first approved update on the Dependency Dashboard (#10300) produced no pull request. Renovate honoured the approval and got as far as building the branch, then the lockfile update failed:

ExecError: Command failed: yarn install --mode=update-lockfile
! Corepack is about to download https://repo.yarnpkg.com/4.17.1/packages/yarnpkg-cli/bin/yarn.js

Corepack asks for confirmation before downloading the Yarn version pinned in packageManager. Inside the Renovate container there is nothing to answer it, so the install exits 1 and the run ends with No files to commit, which is why no branch and no pull request appeared.

Everything before that worked. The debug log shows the approval being picked up correctly:

Branch is not pending, removing pending upgrades   (renovate/ts-jest-29.x-lockfile)
Branch needs creating

COREPACK_ENABLE_DOWNLOAD_PROMPT=0 is Corepack's own switch for this; its source reads the variable and treats 0 as "do not prompt".

References

Follows #10298. Part of WPC-1161.

Checklist

  • I've updated the test suite for new or updated code as appropriate (workflow only)
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed (no published package is touched)
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
CI-only workflow change with no impact on application code, auth, or published packages.

Overview
Renovate lockfile updates were failing in CI because Corepack prompts to download the Yarn version from packageManager, and the Renovate container has no way to confirm—yarn install --mode=update-lockfile exits and no PR gets created.

The Run Renovate step now sets COREPACK_ENABLE_DOWNLOAD_PROMPT=0 and passes it through the action via additional-env-list, so Corepack downloads Yarn without an interactive prompt.

Reviewed by Cursor Bugbot for commit 8cc066b. Bugbot is set up for automated code reviews on this repo. Configure here.

@cryptodev-2s
cryptodev-2s requested a review from a team as a code owner September 18, 2026 20:36
@cryptodev-2s cryptodev-2s self-assigned this Sep 18, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 839e0a7. Configure here.

Comment thread .github/workflows/renovate.yml
@cryptodev-2s
cryptodev-2s requested review from mcmire and removed request for mcmire September 18, 2026 20:46
@cryptodev-2s
cryptodev-2s added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit 0936afc Sep 21, 2026
337 checks passed
@cryptodev-2s
cryptodev-2s deleted the fix/renovate-corepack-prompt branch September 21, 2026 08:58
pull Bot pushed a commit to Reality2byte/core that referenced this pull request Sep 21, 2026
…#10311)

## Explanation

Approving an update on the Dependency Dashboard (MetaMask#10300) produced no
pull request. Renovate built the branch, hit a `lock file error`, and
reported `No files to commit`. Underneath that:

```
➤ YN0000: ┌ Link step
➤ YN0073: │ Skipped due to mode=update-lockfile
➤ YN0000: └ Completed
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
$ yarn run [--inspect] ... <scriptName>
```

Renovate runs `yarn install --mode=update-lockfile`, which skips the
Link step, so `node_modules` and its install state file are never
written. Our `.yarnrc.yml` loads LavaMoat's
[`plugin-allow-scripts`](https://github.com/LavaMoat/LavaMoat/tree/main/packages/yarn-plugin-allow-scripts),
whose `afterAllInstalled` hook runs `yarn run allow-scripts`. `yarn run`
needs that state file to resolve the binary, so it exits non zero, and
Renovate reads that as a lock file error and throws the updated lockfile
away.

Isolated it by running `yarn install --mode=update-lockfile` cold on
`main` with each piece removed in turn:

| `.yarnrc.yml` plugin | root `postinstall` | Result |
| --- | --- | --- |
| present | present | fails |
| present | removed | fails |
| removed | present | exit 0 |

The third row also shows Yarn does not run root lifecycle scripts in
this mode at all, so the root `postinstall` is not involved.

Setting `skipInstalls: false` makes Renovate use `yarn install
--mode=skip-build` instead
([source](https://github.com/renovatebot/renovate/blob/main/lib/modules/manager/npm/post-update/yarn.ts#L166-L207)):
the Link step runs, so the state file exists and `allow-scripts`
succeeds, while dependency build scripts stay skipped. Cold run on
`main`, exit 0 in 26 seconds.

This also reverts MetaMask#10303. The `! Corepack is about to download` line is
a notice on stderr, not a blocking prompt, and was never the cause.

## References

Reverts MetaMask#10303. Follows MetaMask#10298. Part of WPC-1161.

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
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