Skip to content

[CI] Use constant commit sha#20828

Merged
acdlite merged 1 commit intofacebook:masterfrom
acdlite:ci-constant-sha
Feb 16, 2021
Merged

[CI] Use constant commit sha#20828
acdlite merged 1 commit intofacebook:masterfrom
acdlite:ci-constant-sha

Conversation

@acdlite
Copy link
Copy Markdown
Collaborator

@acdlite acdlite commented Feb 16, 2021

When running the publish workflow, either via the command line or via the daily cron job, we should use a constant SHA instead of whatever happens to be at the head of the main branch at the time the workflow is run.

The difference is subtle: currently, the SHA is read at runtime, each time the workflow is run. With this change, the SHA is read right before the workflow is created and passed in as a constant parameter.

In practical terms, this means if a workflow is re-run via the CircleCI web UI, it will always re-run using the same commit SHA as the original workflow, instead of fetching the latest SHA from GitHub, which may have changed.

Also avoids a race condition where the head SHA changes in between the Next publish job and the Experimental publish job.

When running the publish workflow, either via the command line or
via the daily cron job, we should use a constant SHA instead of
whatever happens to be at the head of the main branch at the time the
workflow is run.

The difference is subtle: currently, the SHA is read at runtime,
each time the workflow is run. With this change, the SHA is read right
before the workflow is created and passed in as a constant parameter.

In practical terms, this means if a workflow is re-run via the CircleCI
web UI, it will always re-run using the same commit SHA as the original
workflow, instead of fetching the latest SHA from GitHub, which may
have changed.

Also avoids a race condition where the head SHA changes in between the
Next publish job and the Experimental publish job.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 16, 2021
@sizebot
Copy link
Copy Markdown

sizebot commented Feb 16, 2021

Comparing: 6f88438...322aa28

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.min.js = 122.34 kB 122.34 kB = 39.40 kB 39.40 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 128.92 kB 128.92 kB = 41.46 kB 41.46 kB
facebook-www/ReactDOM-prod.classic.js = 404.69 kB 404.69 kB = 75.17 kB 75.17 kB
facebook-www/ReactDOM-prod.modern.js = 393.04 kB 393.04 kB = 73.27 kB 73.27 kB
facebook-www/ReactDOMForked-prod.classic.js = 404.70 kB 404.70 kB = 75.17 kB 75.17 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 322aa28

@acdlite acdlite merged commit 9e8f3c8 into facebook:master Feb 16, 2021
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
When running the publish workflow, either via the command line or
via the daily cron job, we should use a constant SHA instead of
whatever happens to be at the head of the main branch at the time the
workflow is run.

The difference is subtle: currently, the SHA is read at runtime,
each time the workflow is run. With this change, the SHA is read right
before the workflow is created and passed in as a constant parameter.

In practical terms, this means if a workflow is re-run via the CircleCI
web UI, it will always re-run using the same commit SHA as the original
workflow, instead of fetching the latest SHA from GitHub, which may
have changed.

Also avoids a race condition where the head SHA changes in between the
Next publish job and the Experimental publish job.
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.

4 participants