Commit Graph

24 Commits

Author SHA1 Message Date
Andrew Clark
bbb2ba8c8d
sizebot: Combine stable and experimental results (#20753)
Because we have access to the artifacts in CI, we can read bundle sizes
directly from the filesystem, instead of the JSON files emitted by our
custom Rollup plugin.

This gives us some flexibility if we ever have artifacts that aren't
generated by Rollup, or if we rewrite our build script.

Personally, I also prefer to see the whole file path, instead of just
the name, because some of our names are repeated.

My immediate motivation, though, is because it gives us a way to merge
the separate "experimental" and "stable" size results. Instead
everything is reported in a single table and disambiguated by path.

I also added a section at the top that always displays the size impact
to certain critical bundles — right now, that's the React DOM production
bundles for each release channel. This section will also include any
size changes larger than 2%.

Below that is a section that is collapsed by default and includes all
size changes larger than 0.2%.
2021-02-06 12:57:11 -08:00
Andrew Clark
903384ab0c
sizebot: Fix wrong order of base, head arguments (#20751)
The base and head arguments were flipped, so an n% decrease in bundle
size was instead reported as an n% increase.
2021-02-05 15:45:25 -08:00
Andrew Clark
b936ab660a
Update sizebot to new workflow (#20719)
* build-combined: Fix bundle sizes path

* Output COMMIT_SHA in build directory

Alternative to parsing an arbitrary package's version number, or
its `build-info.json`.

* Remove CircleCI environment variable requirement

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.

* Add CI job that gets base artifacts

Uses download-experimental script and places the base artifacts into
a top-level folder.

* Migrate sizebot to combined workflow

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.

* Move GitHub status check inside retry loop

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.

* Only run get_base_build on main branch
2021-02-03 08:29:51 -08:00
Sunil Pai
d84c539b31
fix sizebot - point correctly to circleci artifact (#17975)
similar to #17972, this should fix sizebot not reporting stats right now
2020-02-04 14:03:12 -08:00
Andrew Clark
2c832b4dcf
Separate sizebot for experimental builds (#17100)
Configures the sizebot to leave a second comment that tracks the
experimental build artifacts.
2019-10-15 18:43:06 -07:00
Andrew Clark
8ce8b9ab81
Update name of CI job in sizebot (#15767)
Same as #15714. I moved the artifacts step to a different job, so I
need to update the name in the sizebot script to match.
2019-05-29 14:52:11 -07:00
Andrew Clark
5fe97dbe19
Remove sizebot race condition (#15735)
Sometimes the status of the `build` job is not in the first page of
the `/statuses` endpoint. The combined `/status` endpoint consolidates
the entries, though, so it always appears there.
2019-05-24 18:55:28 -07:00
Andrew Clark
d66c8f2d9d
Update sizebot to match name of CircleCI build job (#15714)
The sizebot scrapes the GitHub `/statuses` endpoint to get the lastest
CircleCI build number for master, in order to fetch the bundle size
info for that build, which are stored as build artifacts. (There's gotta
be a better way to do this, but that's what we have for now.) This
updates the script to match the name of the updated CircleCI job that
generates the bundle sizes.
2019-05-22 16:12:14 -07:00
Andrew Clark
38bd570d41
Stop tracking bundle sizes (#15404)
* [sizebot] Fail gracefully if CI returns invalid response

Moves the `response.json()` call into the catch block.

* Stop tracking bundle sizes
2019-04-12 13:33:27 -07:00
Andrew Clark
ed6798405d Better message when CI for base commit is pending 2019-04-11 19:24:22 -07:00
Andrew Clark
cdfb06e38b Fix path to results.json 2019-04-11 17:20:14 -07:00
Andrew Clark
de75903272
Fix CI (#15393)
* Revert "Bump scheduler version to 0.14.0"

This reverts commit 687e4fb6f7.

* Store results.json as CI build artifact
2019-04-11 16:43:33 -07:00
Brian Vaughn
f64906fba1
Dangerfile exits early if build failed (#14400)
* Dangerfile exits early (without leaving an error comment) if build failed
2018-12-07 09:06:47 -08:00
Héctor Ramos
b87aabdfe1
Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
bee0060
3fb8be5c30 Minor fix params description for addPercent function (#12669) 2018-05-07 17:46:42 -07:00
Dan Abramov
c27a99812e
[Danger] Minor fixes (#12606)
* Don't download bundle stats from master on CI

This was temporarily necessary in the past because we didn't have the logic that downloads actual *merge base* stats.

We do have that now as part of the Danger script. So we can remove this.

* Use absolute threshold for whether to show a change

* Download master stats, but only for other master builds

* Rewrite sizes
2018-04-11 18:46:02 +01:00
Sophie Alpert
2bd1222a82
Format danger percents better (#12256)
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
2018-02-21 15:48:37 -08:00
Orta
e8ee1b92dc [Danger] Add a remote for the upstream repo, and try use that for the merge base for danger (#12229) 2018-02-15 12:19:31 +00:00
Orta
a634e53d2f [Danger] Include 1% changes in a build, not just greater than (#12213) 2018-02-12 12:44:18 +00:00
Orta
c7ce0091dc [Danger] Use the PR's mergebase for a branch in the dangerfile (#12049)
* [Danger] Use the PR's mergebase for a branch in the dangerfile instead of
the root commit's parent.

* [Danger] Get the full history to find the merge base
2018-02-11 19:43:29 +00:00
Dan Abramov
467b1034ce
Disable for...of by default, rewrite cases where it matters (#12198)
* Add no-for-of lint rule

* Ignore legit use cases of for..of

* Rewrite for..of in source code
2018-02-09 16:11:22 +00:00
Claire L
4ca7855ca0 Highlight production bundles in bold in the Danger integration comment (#12054)
* update Danger integration comments

* update Danger integration comments

* revised codes for unconditional call

* update setBoldness parameter
2018-01-19 18:07:26 +00:00
Esben Sparre Andreasen
bd6b533c29 Fix copy paste error for file size comparison (#12040) 2018-01-18 13:55:40 +00:00
Orta
d8d797645c Adds Danger and a rule showing build size differences (#11865)
* Adds danger_js with an initial rule for warning about large PRs

Signed-off-by: Anandaroop Roy <roop@artsymail.com>

* [WIP] Get the before and after for the build results

* [Dev] More work on the Dangerfile

* [Danger] Split the reports into sections based on their package

* Remove the --extract-errors on the circle build

* [Danger] Improve the lookup for previous -> current build to also include the environment

* Fix rebase
2018-01-17 01:49:38 +00:00