Skip to content

Comments

fix: include yarn.lock in preview build artifacts#8023

Merged
cryptodev-2s merged 2 commits intomainfrom
fix/publish-preview-workspace-resolution
Feb 23, 2026
Merged

fix: include yarn.lock in preview build artifacts#8023
cryptodev-2s merged 2 commits intomainfrom
fix/publish-preview-workspace-resolution

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Feb 23, 2026

Explanation

The publish-preview job fails because yarn workspaces foreach can't resolve the renamed @metamask-previews/ packages. The root cause is that prepare-preview-builds.sh updates the lockfile via yarn install --no-immutable, but yarn.lock is not included in the uploaded artifacts. The publish job gets a stale lockfile from main that doesn't match the renamed package names.

This adds yarn.lock to the artifact upload and removes the path override on download so it extracts to the workspace root alongside packages/.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • 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
  • 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 workflow-only change that affects artifact packaging/restoration; low risk outside of potentially impacting preview publish reliability.

Overview
Fixes the preview publish workflow by including the updated yarn.lock in the uploaded build artifact set, ensuring the publish job uses the same lockfile produced by yarn prepare-preview-builds.

Also removes the actions/download-artifact path override so artifacts (including yarn.lock) restore to the workspace root instead of being extracted under packages/.

Written by Cursor Bugbot for commit 0a45543. This will update automatically on new commits. Configure here.

@cryptodev-2s cryptodev-2s force-pushed the fix/publish-preview-workspace-resolution branch from dd221bf to 02ba12f Compare February 23, 2026 21:23
Copy link

@cursor cursor bot left a comment

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 2 potential issues.

@Gudahtt
Copy link
Member

Gudahtt commented Feb 23, 2026

This is the error in question I'm guessing? https://github.com/MetaMask/core/actions/runs/22324841398/job/64592901687

I'm not following why this change would fix this error. Is it possible that the problem is that the lockfile is not cached along with the build output?

@cryptodev-2s cryptodev-2s changed the title fix: publish-preview workspace resolution failure fix: include yarn.lock in preview build artifacts Feb 23, 2026
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Feb 23, 2026
Merged via the queue into main with commit f926b31 Feb 23, 2026
310 checks passed
@cryptodev-2s cryptodev-2s deleted the fix/publish-preview-workspace-resolution branch February 23, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants