Skip to content

Fix cache-key test on release branches - #58546

Closed
fabriziocucci wants to merge 1 commit into
react:mainfrom
fabriziocucci:export-D120209439
Closed

fabriziocucci wants to merge 1 commit into
react:mainfrom
fabriziocucci:export-D120209439

Conversation

@fabriziocucci

Copy link
Copy Markdown
Contributor

Summary:
getCacheKey only hashes package contents when the package version ends in
-main; published releases short-circuit and return the version string. The
test asserted only the main-build property, so it could never pass on a release
branch, where two calls with different package contents both return the version.

The test now asserts the property that actually holds for each case: differing
keys on main builds, and the version string on published releases. This also
adds coverage for the published-release path, which previously had none.

Changelog: [Internal]

Differential Revision: D120209439

Summary:
`getCacheKey` only hashes package contents when the package version ends in
`-main`; published releases short-circuit and return the version string. The
test asserted only the main-build property, so it could never pass on a release
branch, where two calls with different package contents both return the version.

The test now asserts the property that actually holds for each case: differing
keys on main builds, and the version string on published releases. This also
adds coverage for the published-release path, which previously had none.

Changelog: [Internal]

Differential Revision: D120209439
@meta-codesync

meta-codesync Bot commented Sep 15, 2026

Copy link
Copy Markdown

@fabriziocucci has exported this pull request. If you are a Meta employee, you can view the originating Diff in D120209439.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 15, 2026
@meta-codesync meta-codesync Bot closed this in 6e862f9 Sep 15, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Sep 15, 2026
@meta-codesync

meta-codesync Bot commented Sep 15, 2026

Copy link
Copy Markdown

This pull request has been merged in 6e862f9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant