Commit Graph

112 Commits

Author SHA1 Message Date
Brian Vaughn
7edd628134 Removed (deleted) tracing fixture test from relesae scripts 2021-04-28 12:36:09 -04:00
Brian Vaughn
fc33f12bde Remove unstable scheduler/tracing API (#20037) 2021-04-26 19:16:18 -04:00
Dan Abramov
a5c3baeecd Fix a broken link 2021-03-22 21:04:13 +00:00
Andrew Clark
9e8f3c8955 [CI] Use constant commit sha (#20828)
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.
2021-02-16 08:31:24 -08:00
Andrew Clark
4e08fb10c9 Update release documentation (#20736)
Added information about automated prereleases
2021-02-04 13:20:49 -08:00
Andrew Clark
c64d6d21be Implement CI job that publishes prereleases (#20732)
PR #20728 added a command to initiate a prerelease using CI, but it left
the publish job unimplemented. This fills in the publish job.

Uses an npm automation token for authorization, which bypasses the need
for a one-time password. The token is configured via CircleCI's
environment variable panel.

Currently, it will always publish the head of the main branch. If the
head has already been published, it will exit gracefully.

It does not yet support publishing arbitrary commits, though we could
easily add that. I don't know how important that use case is, because
for PR branches, you can use CodeSandbox CI instead. Or as a last
resort, run the publish script locally.

Always publishing from main is nice because it further incentivizes us
to keep main in a releasable state. It also takes the guesswork out of
publishing a prerelease that's in a broken state: as long as we don't
merge broken PRs, we're fine.
2021-02-03 20:57:31 -08:00
Andrew Clark
c1cfa734fd Add command to publish preleases via CI (#20728)
```
yarn publish-prereleases
```

Script to trigger a CircleCI workflow that publishes preleases.

**The CI workflow doesn't actually publish yet; it just runs and logs
its inputs.**
2021-02-03 15:42:34 -08:00
Andrew Clark
00e38c80b2 Fallback if GitHub status is stuck as "pending" (#20729)
GitHub's status API is super flaky. Sometimes it reports a job as
"pending" even after it completes in CircleCI. If it's still pending
when we time out, return the build ID anyway. TODO: The location of the
retry loop is a bit weird. We should probably combine this function with
the one that downloads the artifacts, and wrap the retry loop around the
whole thing.
2021-02-03 15:33:46 -08:00
Andrew Clark
3be750eee9 Add --ci option to publish script (#20727)
When running in CI, the publish script will skip interactive prompts,
including the prompt for a one-time password.

Instead, CI will need to use an automation access token:
https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow
2021-02-03 12:17:40 -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
Brian Vaughn
2d025753e2 Remove --build flag from release scripts (#20723)
Also update instructions to match recent script changes.

Also add reproducible commit SHA to post download instructions to support publishing the Firefox DevTools extension.
2021-02-03 11:11:56 -05:00
Andrew Clark
0e526bcec2 Fix release script --commit param (#20720)
PR #20717 accidentally broke the `--commit` parameter because the
script errors if you provide both a `--build` and a `--commit`.

I solved by removing the validation error. When there's a conflict, it
will choose the --`build`.

(Although maybe we should `--build` entirely and always uses `--commit`.
I think `--commit` is a sufficient replacement.)
2021-02-02 19:30:37 -08:00
Andrew Clark
7e36d8beba Some release script fixes (#20718)
* Retry loop should not start over from beginning

When the otp times out, we should not retry the packages that were
already successfully published. We should pick up where we left off.

* Don't crash if build-info.json doesn't exist

The "print follow up instructions" step crashes if build-info.json is
not found. The new build workflow doesn't include those yet (might not
need to) and since the instructions that depend on it only affect
semver (latest) releases, I've moved the code to that branch. Will
follow up with a proper fix, either by adding back a build-info.json
file or removing that dependency and reading the commit some other way.
2021-02-02 14:48:02 -08:00
Brian Vaughn
c47f3cfa17 Restore experimental build script's ability to auto download latest build (#20717) 2021-02-02 16:40:31 -05:00
Andrew Clark
f8545f6eb8 Add automatic retry to download script (#20704)
If build job is still pending, the script will continously poll until
it reaches the retry limit.

I've set the limit at 10 minutes, since our CI pipeline almost always
finishes before that.
2021-02-01 08:30:50 -08:00
Andrew Clark
f8b6969da6 Add --commit param to release scripts (#20703)
Alternative to `--build`. Uses same logic as sizebot and www
sync script.

Immediate motivation is I want sizebot to use the
`download-experimental-build` command in CI. Will do that next.
2021-02-01 08:27:59 -08:00
Brian Vaughn
db5945efee Set default release channel for download-experimental-build script (#20663) 2021-01-26 15:17:56 -05:00
Andrew Clark
98313aaa7e Migrate prepare-release-from-ci to new workflow (#20581)
* Migrate prepare-release-from-ci to new workflow

I added a `--releaseChannel (-r)` argument to script. You must choose
either "stable" or "experimental", because every build job now includes
both channels.

The prepare-release-from-npm script is unchanged since those releases
are downloaded from npm, nt CI.

(As a side note, I think we should start preparing semver releases using
the prepare-release-from-ci script, too, and get rid of
prepare-release-from-npm. I think that was a neat idea originally but
because we already run `npm pack` before storing the artifacts in CI,
there's really not much additional safety; the only safeguard it adds is
the requirement that a "next" release must have already been published.)

* Move validation to parse-params module
2021-01-14 09:20:20 -08:00
Andrew Clark
fc07b070a0 Retry with fresh otp if publish fails (#20582)
Currently, if publishing a package fails, the script crashes, and the
user must start it again from the beginning. Usually this happens
because the one-time password has timed out.

With this change, the user will be prompted for a fresh otp, and the
script will resume publishing.
2021-01-13 11:54:56 -08:00
Andrew Clark
99554dc36f Add Flight packages to experimental allowlist (#20486)
- react-fetch
- react-fs
- react-pg
- react-server-dom-webpack
2020-12-18 14:29:48 -08:00
Andrew Clark
1bda600378 Hardcoded allowlist for publishing packages (#20485)
With separate lists for stable and experimental.
2020-12-18 14:20:37 -08:00
Dan Abramov
c91c1c4ebe Release script: allow preparing RC from npm 2020-09-22 14:27:50 +01:00
Dan Abramov
2d9ec9199c Indent a command 2020-08-07 19:24:49 +01:00
Dan Abramov
db2f229110 Fix command 2020-08-07 19:23:43 +01:00
Halit Ogunc
8d57ca519a fix: typo in React Release Scripts (#19524) 2020-08-04 13:22:50 -04:00
Dan Abramov
a1c0864d19 Support untagged releases (#19509) 2020-07-31 20:47:28 +01:00
Dan Abramov
5d271fc3b1 Revert "Support untagged releases (#19507)" (#19508)
This reverts commit 58b3ee7a88.
2020-07-31 19:57:32 +01:00
Dan Abramov
58b3ee7a88 Support untagged releases (#19507)
* Support untagged releases

* Fix
2020-07-31 19:18:37 +01:00
Dan Abramov
7543459a48 Allow publishing untagged releases (#19505) 2020-07-31 16:10:01 +01:00
Dan Abramov
2663a12eb3 Tweak wording 2020-07-10 14:56:28 +01:00
Andrew Clark
a71aa803a1 [Release] Follow redirect when downloading tarball (#18845)
Adds -L option to `curl` command.

See: https://curl.haxx.se/docs/manpage.html#-L
2020-05-06 10:28:49 -07:00
dependabot[bot]
f8b084276d Bump https-proxy-agent from 2.2.1 to 2.2.4 in /scripts/release (#18642)
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](https://github.com/TooTallNate/node-https-proxy-agent/compare/2.2.1...2.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-16 16:06:13 -07:00
Brian Vaughn
8e13f099ab Overhauled release scripts and docs (#18569)
* Overhauled release scripts and docs
2020-04-10 12:28:40 -07:00
Andrew Clark
31e6756b8c Remove error code step from publish script (#18350)
Error codes don't need to be pulled from CI anymore because the ones
in source are already expected to match the build output.

I noticed this when running the 16.13.1 release. Patch releases are cut
with the commit used to build the previous release as a base. So the
publish script accidentally reverted the changes that had landed to
the error codes file since then.
2020-03-19 14:45:07 -07:00
Brian Vaughn
cccba39f5b Fixed broken anchor tag for patch release 2020-03-06 11:05:01 -08:00
Sebastian Markbåge
4469700bb6 Change ReactVersion from CJS to ES module (#18181) 2020-02-28 13:09:02 -08:00
Dan
efaffc4797 Prettier 2020-02-26 21:02:20 +00:00
Sunil Pai
c1c5499cc3 update version numbers for 16.13 (#18143)
also includes a bugfix when downloading error codes from circleci.
2020-02-26 20:33:29 +00:00
Brian Vaughn
9e158c091b Updated release script documentation and command names (#17929)
* Updated release script documentation and command names

* Update scripts/release/README.md

Co-Authored-By: Sunil Pai <threepointone@oculus.com>

* Updated README

Co-authored-by: Sunil Pai <threepointone@oculus.com>
2020-02-05 08:52:31 -08:00
Brian Vaughn
613cbd3ace Formatting fix (Prettier) to build script 2020-02-04 11:37:38 -08:00
Brian Vaughn
562d2fbc49 Fix release scripts (#17972)
Circle CI seems to have changed the reported artifact path which broke our scripts.
2020-02-04 11:36:49 -08:00
Dan Abramov
241c4467ee Add a note about expiring OTP codes 2020-01-29 16:31:51 +00:00
Dan Abramov
faabe22b4f Use next tag for canary releases in the doc (#17923) 2020-01-29 16:09:05 +00:00
Dan Abramov
b979db4e72 Bump Prettier (#17811)
* Bump Prettier

* Reformat

* Use non-deprecated option
2020-01-09 13:54:11 +00:00
Karan Sharma
d259f45813 Fix various typos (#17724) 2019-12-29 13:47:51 -08:00
Brian Vaughn
95056b6836 DevTools build script enhancements (#17653)
* Updated DevTools local development instructions to mention experimental build step

* Added a command to download latest experimental release (for DevTools)

* Updated build instructions for clarity

* Added build-for-devtools package alias
2019-12-18 14:34:40 -08:00
Dan Abramov
7c21bf72ac Fix release script to ignore empty package folders 2019-12-16 19:16:58 +00:00
Andrew Clark
54f66731c8 Update release script URL (#17428)
CircleCI API endpoint changed
2019-11-21 13:19:03 -08:00
Andrew Clark
3059ab3523 Add experimental instructions to release README (#17143) 2019-10-18 16:26:06 -07:00
Andrew Clark
30c5daf943 Remove concurrent apis from stable (#17088)
* Tests run in experimental mode by default

For local development, you usually want experiments enabled. Unless
the release channel is set with an environment variable, tests will
run with __EXPERIMENTAL__ set to `true`.

* Remove concurrent APIs from stable builds

Those who want to try concurrent mode should use the experimental
builds instead.

I've left the `unstable_` prefixed APIs in the Facebook build so we
can continue experimenting with them internally without blessing them
for widespread use.

* Turn on SSR flags in experimental build

* Remove prefixed concurrent APIs from www build

Instead we'll use the experimental builds when syncing to www.

* Remove "canary" from internal React version string
2019-10-15 15:09:19 -07:00