Update sizebot to new workflow #20719
Merged
+126
−231
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
ba4aafb
to
72b4a92
8a3614c
to
bffa377
.circleci/config.yml
Outdated
| - run: | ||
| name: Download artifacts for base revision | ||
| # TODO: Commit sha is hardcoded until required changes land in main | ||
| # branch. Once they do, replace with `merge-base HEAD origin/master` |
acdlite
Feb 3, 2021
Author
Member
I'll un-hardcode the base sha before landing. Need to land in two stages.
I'll un-hardcode the base sha before landing. Need to land in two stages.
ca6bd97
to
2242ed6
.circleci/config.yml
Outdated
| git fetch origin master | ||
| echo "$(git merge-base HEAD origin/master)" | ||
| cd ./scripts/release && yarn && cd ../../ | ||
| scripts/release/download-experimental-build.js --commit=4783999 |
bvaughn
Feb 3, 2021
Contributor
So long as we remember to change this.
So long as we remember to change this.
Alternative to parsing an arbitrary package's version number, or its `build-info.json`.
I think this only reason we needed this was to support passing any job id to `--build`, instead of requiring the `process_artifacts` job. And to do that you needed to use the workflows API endpoint, which requires an API token. But now that the `--commit` argument exists and automatically finds the correct job id, we can just use that.
Uses download-experimental script and places the base artifacts into a top-level folder.
2242ed6
to
9d0ee0b
Replaces the two separate sizebot jobs (one for each channel, stable and experimental) with a single combined job that outputs size information for all bundles in a single GitHub comment. I didn't attempt to simplify the output at all, but we should. I think what I would do is remove our custom Rollup sizes plugin, and read the sizes from the filesystem instead. We would lose some information about the build configuration used to generate each artifact, but that can be inferred from the filepath. For example, the filepath `fb-www/ReactDOM-dev.classic.js` already tells us everything we need to know about the artifact. Leaving this for a follow up.
The download script will poll the CircleCI endpoint until the build job is complete; it should also poll the GitHub status endpoint if the build job hasn't been spawned yet.
b936ab6
into
facebook:master
34 of 36 checks passed
34 of 36 checks passed
ci/circleci: yarn_test--r=stable --env=development --persistent
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test--r=www-classic --env=development --variant
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test--r=www-classic --env=production --variant
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test--r=www-modern --env=development --variant
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test--r=www-modern --env=production --variant
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build---project=devtools -r=experimental
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build--r=experimental --env=development
Your tests passed on CircleCI!
Details
ci/circleci: yarn_test_build--r=experimental --env=production
Your tests passed on CircleCI!
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replaces the two separate sizebot jobs (one for each channel, stable and experimental) with a single combined job that outputs size information for all bundles in a single GitHub comment.
I didn't attempt to simplify the output at all, but we should. I think what I would do is remove our custom Rollup sizes plugin, and read the sizes from the filesystem instead. We would lose some information about the build configuration used to generate each artifact, but that can be inferred from the filepath. For example, the filepath
fb-www/ReactDOM-dev.classic.jsalready tells us everything we need to know about the artifact. Leaving this for a follow up.