Skip to content

[ci] Dont sign builds originating from anything other than facebook/react #32738

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
Mar 25, 2025

Conversation

poteto
Copy link
Member

@poteto poteto commented Mar 25, 2025

We now generate attestations in process_artifacts_combined so we can verify the provenance of the build later in other workflows. However, this requires write permissions for id-token and attestations so PRs from forks cannot generate this attestation.

To get around this, I added a --no-verify flag to scripts/release/download-experimental-build.js. This flag is only passed in runtime_build_and_test.yml for the sizebot job, since 1) the workflow runs in the pull_request trigger which has read-only permissions, and 2) the downloaded artifact is only used for sizebot calculation, and not actually used.

The flag is explicitly not passed in runtime_commit_artifacts.yml since there we actually use the artifact internally. This is fine as once a PR lands on main, it will then run the build on that new commit and generate an attestation.

Stack created with Sapling. Best reviewed with ReviewStack.

@react-sizebot
Copy link

react-sizebot commented Mar 25, 2025

Comparing: dc9b746...86a9515

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.14 kB 515.14 kB = 91.74 kB 91.74 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 614.35 kB 614.35 kB = 108.76 kB 108.76 kB
facebook-www/ReactDOM-prod.classic.js = 650.34 kB 650.34 kB = 114.79 kB 114.79 kB
facebook-www/ReactDOM-prod.modern.js = 640.62 kB 640.62 kB = 113.23 kB 113.23 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 86a9515

…eact

We now generate attestations in `process_artifacts_combined` so we can verify the provenance of the build later in other workflows. However, this requires `write` permissions for `id-token` and `attestations` so PRs from forks cannot generate this attestation.

To get around this, I added a `--no-verify` flag to scripts/release/download-experimental-build.js. This flag is only passed in `runtime_build_and_test.yml` for the sizebot job, since 1) the workflow runs in the `pull_request` trigger which has read-only permissions, and 2) the downloaded artifact is only used for sizebot calculation, and not actually used.

The flag is explicitly not passed in `runtime_commit_artifacts.yml` since there we actually use the artifact internally. This is fine as once a PR lands on main, it will then run the build on that new commit and generate an attestation.
@poteto poteto changed the title [ci] Dont sign builds from forks [ci] Dont sign builds originating from anything other than facebook/react Mar 25, 2025
@poteto poteto merged commit 44c4693 into main Mar 25, 2025
243 checks passed
@poteto poteto deleted the pr32738 branch March 25, 2025 15:16
poteto added a commit that referenced this pull request Mar 25, 2025
Run this a bit more frequently so we don't thrash `main` caches as
often.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32739).
* __->__ #32739
* #32738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants