Skip to content

[core] Fix corepack installation in CircleCI #1405

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
Feb 3, 2025

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Feb 3, 2025

npmjs.org rotated the public signing keys but corepack hardcoded the old one, causing all the CI pipelines to fail (example) because it couldn't install pnpm properly: nodejs/corepack#612

This fix fetches the latest keys and storing them in an env variable, taken from this comment: nodejs/corepack#612 (comment)

The alternatives are not as good:

  • npm install -g corepack@latest will work but requires sudo in CircleCI which is annoying to install

  • COREPACK_INTEGRITY_KEYS=0 disable the signature check, risky!

  • I have followed (at least) the PR section of the contributing guide.

@mj12albert mj12albert added the core DO NOT USE. This label has been deprecated and replaced by `all components` and `internal`. label Feb 3, 2025
Copy link

netlify bot commented Feb 3, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 71c3a8f
🔍 Latest deploy log https://app.netlify.com/sites/base-ui/deploys/67a07487cf87e60008a07881
😎 Deploy Preview https://deploy-preview-1405--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mj12albert mj12albert force-pushed the fix/ci-corepack branch 6 times, most recently from 5bbcb00 to c631d45 Compare February 3, 2025 06:57
@mj12albert mj12albert changed the title [core] Install latest corepack in CI [core] Fix corepack installation in CircleCI Feb 3, 2025
@mj12albert mj12albert marked this pull request as ready for review February 3, 2025 07:46
@mj12albert mj12albert merged commit f75e28a into mui:master Feb 3, 2025
22 checks passed
@mj12albert mj12albert deleted the fix/ci-corepack branch February 3, 2025 08:23
@Janpot
Copy link
Member

Janpot commented Feb 3, 2025

@mj12albert Have you checked whether we can already stop using corepack altogether? i.e.

  • does our circle ci image come with a pnpm version preinstalled?
  • if yes, is it new enough to (make it) respect the packageManager field in package.json? Newer versions behave like corepack.
  • if no, is it possible to just install pnpm globally ourselves instead of using corepack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core DO NOT USE. This label has been deprecated and replaced by `all components` and `internal`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants