You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Foundry release downloads are normally fast, but transient GitHub release-asset failures have been causing E2E and benchmark jobs to fail. The previous .metamask Actions cache was removed in #43868 because a normal yarn mm-foundryup installation usually takes only 1–2 seconds, while restoring the cache on every job added coupling, cache usage, and workflow complexity.
This PR keeps that fast direct-download path and adds the cache back strictly as a fallback:
Try one direct Anvil installation with a one-minute timeout.
If it fails, restore the default branch's Anvil cache.
Verify that the cache contains exactly one Anvil binary and that its SHA-256 checksum matches package.json before executing it.
If the cache is missing, invalid, or unusable, clear it and retain the existing four-attempt direct-download retry policy.
The cache key includes the schema version, platform, architecture, installed @metamask/foundryup version, Foundry version, and expected Anvil checksum. A single best-effort step in the trusted mainprep-deps job maintains the cache using a lookup-only restore; parallel E2E, benchmark, and fixture-update jobs are restore-only consumers and never contend to write it.
The shared behavior lives in a local composite action used by all three workflows. It deliberately does not race cache restoration against foundryup, avoiding concurrent writes to .metamask and first-success/cancellation coordination.
I've completed the PR template to the best of my ability
I’ve included tests if applicable
I’ve documented my code using JSDoc format if applicable
I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Validation
yarn lint:changed:fix
Parsed the composite action and changed workflows with the repository's yaml dependency
actionlint 1.7.12 against all changed workflows
Clean direct Anvil installation followed by anvil --version
Local cache restore, repository-checksum verification, cached installation, and anvil --version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Foundry release downloads are normally fast, but transient GitHub release-asset failures have been causing E2E and benchmark jobs to fail. The previous
.metamaskActions cache was removed in #43868 because a normalyarn mm-foundryupinstallation usually takes only 1–2 seconds, while restoring the cache on every job added coupling, cache usage, and workflow complexity.This PR keeps that fast direct-download path and adds the cache back strictly as a fallback:
package.jsonbefore executing it.The cache key includes the schema version, platform, architecture, installed
@metamask/foundryupversion, Foundry version, and expected Anvil checksum. A single best-effort step in the trustedmainprep-depsjob maintains the cache using a lookup-only restore; parallel E2E, benchmark, and fixture-update jobs are restore-only consumers and never contend to write it.The shared behavior lives in a local composite action used by all three workflows. It deliberately does not race cache restoration against
foundryup, avoiding concurrent writes to.metamaskand first-success/cancellation coordination.Changelog
CHANGELOG entry: null
Related issues
Pre-merge author checklist
Pre-merge reviewer checklist
Validation
yarn lint:changed:fixyamldependencyactionlint1.7.12 against all changed workflowsanvil --versionanvil --version