Commit Graph

175 Commits

Author SHA1 Message Date
lauren
1839e1437f [ez] Update compiler issue template (#31297)
Add a field to specify which version of React Compiler is being used.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31297).
* __->__ #31297
* #31296
2024-10-18 15:02:26 -04:00
lauren
54c0edc019 [ci] Don't use branch name for concurrency (#31296)
I happened to notice some jobs on main get canceled if another PR landed
before the prior commit on main had finished running CI. This is not
great for difftrain because the commit artifacts job relies on the CI
jobs on main finishing before it triggers. This would lead to commits
being skipped on DiffTrain which is not great for provenance since we
want it to be a 1:1 sync.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31296).
* #31297
* __->__ #31296
2024-10-18 15:02:14 -04:00
lauren
9deb36748d [ci] Publish compiler weekly prereleases (#31294)
Adds a new weekly job for the compiler
2024-10-18 14:43:43 -04:00
lauren
915be0ef78 [playground] Upgrade various packages (#31293)
Just some housekeeping
2024-10-18 14:25:36 -04:00
lauren
25cac220d6 [ci] Allow passing various params to compiler publish script (#31283)
Allow passing in a few more inputs when manually publishing.
2024-10-17 18:12:58 -04:00
lauren
9c60cbe3d1 [compiler] Clean up publish script (#31278)
Few small tweaks to make it easier to run adhoc publishes
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31278).
* #31283
* __->__ #31278
2024-10-17 18:02:41 -04:00
Ruslan Lesiutin
bf7e210cb5 tests[react-devtools]: added tests for Compiler integration (#31241)
Adds tests for Compiler integration.

This includes:
- Tests against Compiler from source.
- Versioned (18.2 - <19) tests against Compiler from npm.

For tests against React 18.2, I had to download `react-compiler-runtime`
from npm and put it to `react/compiler-runtime.js`.
2024-10-17 09:02:41 +01:00
lauren
6cf8518505 [ci] Specify limited concurrency for PR jobs (#31240)
There was a concurrency setting we hadn't enabled on jobs that are
primarily triggered for PRs. This meant that every update to the PR
would trigger new CI jobs without canceling any ones already in flight,
which can greatly slow down CI due to the number of jobs that need to
run.

This PR adds concurrency [based on the workflow name and PR number or
head
ref.](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs)
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31240).
* __->__ #31240
* #31239
2024-10-14 12:07:24 -04:00
lauren
cbcc1d2027 [ci] Consistent cache names (#31239)
Makes cache names more descriptive and consistent for CI, so it's easier
to tell which cache is used for what purpose.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31239).
* #31240
* __->__ #31239
2024-10-14 12:07:08 -04:00
Lauren Tan
db240980a3 [playground] Decouple playground from compiler
Currently the playground is setup as a linked workspace for the
compiler which complicates our yarn workspace setup and means that snap
can sometimes pull in a different version of react than was otherwise
specified.

There's no real reason to have these workspaces combined so let's split
them up.

ghstack-source-id: 56ab064b2f
Pull Request resolved: https://github.com/facebook/react/pull/31081
2024-09-27 15:25:07 -04:00
Lauren Tan
d34da5cdb9 [ci] Fix incorrect sha / commit messages in manual Meta builds
ghstack-source-id: 0790b32d29
Pull Request resolved: https://github.com/facebook/react/pull/31083
2024-09-26 17:43:07 -04:00
Lauren Tan
b90e440231 [dependabot] Ignore all fixture directories
Seems like we can specify a wildcard dependency name to ignore all
dependencies from being updated. As I understand it dependabot will
still run monthly but no PRs will be generated.

ghstack-source-id: 64b76bd532663cdc4db10ba6299e791b5908d5b1
Pull Request resolved: https://github.com/facebook/react/pull/31074
2024-09-26 10:34:35 -04:00
Lauren Tan
0e9ccde185 [dependabot] Remove stale directories from config
ghstack-source-id: 570399bc77529bf9fb005149cfd20ba59405b2bc
Pull Request resolved: https://github.com/facebook/react/pull/31073
2024-09-26 10:34:35 -04:00
Lauren Tan
b7f74f39d8 [ez] Update deprecated action
ghstack-source-id: 991b314fd610bcbca68df52149866b2c6d8e6799
Pull Request resolved: https://github.com/facebook/react/pull/31047
2024-09-26 10:20:10 -04:00
Lauren Tan
c900ee0cce [ez] Make commit sha clickable for fbsource
ghstack-source-id: 1307b9a83a8613c08f11be5397ab45719df00992
Pull Request resolved: https://github.com/facebook/react/pull/31046
2024-09-26 10:20:10 -04:00
Lauren Tan
64be7b4dcc [ci] Fix missing values during manual workflow dispatch
It seems like the github.event.workflow_run payload is only populated
for non manual runs of the workflow, so this would crash the manual
dispatch

Test plan: https://github.com/facebook/react/actions/runs/11017512571
completes

ghstack-source-id: fce02b17f85ac4762de0561764785882e767c872
Pull Request resolved: https://github.com/facebook/react/pull/31045
2024-09-26 10:20:10 -04:00
Lauren Tan
4708fb92c2 Fix runtime_commit_artifacts workflow
I messed up the yml syntax and also realized that our script doesn't
currently handle renames or deletes, so I fixed that

ghstack-source-id: 7d481a951a
Pull Request resolved: https://github.com/facebook/react/pull/31028
2024-09-23 17:39:53 -04:00
Lauren Tan
5b19dc0f06 Allow forcing a build in artifacts workflow dispatch
Sometimes it is useful to bypass the revision check when we need to make
changes to the runtime_commit_artifacts script. The `force` input can be
passed via the GitHub UI for manual runs of the workflow.

ghstack-source-id: cf9e32c01a
Pull Request resolved: https://github.com/facebook/react/pull/31027
2024-09-23 15:38:05 -04:00
Lauren Tan
79bcf6eb23 Fix missing trailing / in commit artifacts workflow
The trailing / was being omitted, so instead of moving the cjs
directory itself, it would move only its contents instead. This broke
some internal path assumptions.

Additionally, updates the step to create the react-dom directory prior
to moving.

ghstack-source-id: b6eedb0c88cd3aa3a786a3d3d280ede5ee81a063
Pull Request resolved: https://github.com/facebook/react/pull/31026
2024-09-23 14:58:19 -04:00
Jack Pope
e4953922a9 Update react-native/react-dom build directory (#31006)
Commit artifact actions are breaking after
https://github.com/facebook/react/pull/30711

See:
https://github.com/facebook/react/actions/runs/10930658977/job/30344033974

> mv: cannot stat 'build/facebook-react-native/react/dom/': No such file
or directory

After build, the new artifacts are in `/react-dom/cjs`, not
`/react/dom/`
```
$> yarn build
$> ls build/facebook-react-native/react/
# ... no dom
$> ls build/facebook-react-native/react-dom/cjs
```
2024-09-19 18:04:06 -04:00
Timothy Yung
e72127a4ec Build react-dom in builds/facebook-fbsource (#30711)
## Summary

Builds `react-dom` for React Native so that it also populates the
`builds/facebook-fbsource` branch.

**NOTE:** For Meta employees, D61354219 is the internal integration.

## How did you test this change?

```
$ yarn build
…
$ ls build/facebook-react-native/react-dom/cjs
ReactDOM-dev.js       ReactDOM-prod.js      ReactDOM-profiling.js
```
2024-09-18 14:44:55 -07:00
Lauren Tan
dcae56f8b7 [ez] Remove trailing space from babel-refresh header
ghstack-source-id: d78c53462b3be7b93733cdd0a7def96d7112087e
Pull Request resolved: https://github.com/facebook/react/pull/30806
2024-08-26 13:16:03 -04:00
Lauren Tan
1d989965a6 [ez] Add noformat etc headers into some files
These are only needed internally so I'm opting to just do it in the
commit artifacts job instead of amending the build config.

ghstack-source-id: 6a5382b028
Pull Request resolved: https://github.com/facebook/react/pull/30775
2024-08-21 11:49:02 -04:00
Jan Kassens
0e6d8c3d1a [ci] fix path in compiler_typescript.yml (#30651)
The path was incorrect, so the job didn\t run on changes to it.
2024-08-09 13:21:24 -04:00
Lauren Tan
9f0508fcf4 [final] Actually publish packages to npm
ghstack-source-id: 78a358a81726f1e9898be7f46de23e80005b5bfd
Pull Request resolved: https://github.com/facebook/react/pull/30618
2024-08-06 15:12:03 -04:00
Lauren Tan
47d85282bc [ci] Add prerelease nightly and manual script for compiler
Publishes the compiler packages on the same schedule as the React ones.
For now the manual script can only build from `main` but in the future
we can add support for building specific commits

ghstack-source-id: 66676c578b795b90bf3c5715be8900438868b6ee
Pull Request resolved: https://github.com/facebook/react/pull/30615
2024-08-06 14:48:33 -04:00
Arthur
eb52f3788f [CI] fix the shared_lint cached key (#30609)
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

In the shared_lint,

for the first Prettier job, use `${{ runner.arch }}-${{ runner.os
}}-modules-${{ hashFiles('yarn.lock') }}` as the cache key.

For the following jobs, use `${{ runner.arch }}-${{ runner.os
}}-modules-${{ hashFiles('**/yarn.lock') }}` as the cache key.

Some of the jobs do not hit the cache if the hash does not match.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

I run [act](https://github.com/nektos/act) locally to test it.
2024-08-06 14:43:10 -04:00
Lauren Tan
73b21a05e3 [ci] Read node version from .nvmrc instead of hardcoding
ghstack-source-id: 336ac1a45f
Pull Request resolved: https://github.com/facebook/react/pull/30530
2024-07-30 11:54:48 -04:00
Lauren Tan
a7f3b49be2 [ci] Make some workflows dispatchable
The previous checks for prerelease_commit_sha was incorrectly
implemented for devtools regression tests so I fixed it. I also made
some other workflows dispatchable so they can be manually run from
GitHub's UI as needed.

Test plan: https://github.com/facebook/react/actions/runs/10165564989

ghstack-source-id: b30c7b48e7
Pull Request resolved: https://github.com/facebook/react/pull/30529
2024-07-30 11:54:48 -04:00
Lauren Tan
927ba5799a [rfc] Delete devtools_check_repro workflow
With GitHub issue templates this workflow is not truly necessary and
can deny other workflows from running due to a limited amount of CI
workers in the pool.

I propose deleting this workflow and relying on issue templates instead.

ghstack-source-id: a798621f36
Pull Request resolved: https://github.com/facebook/react/pull/30518
2024-07-30 10:57:35 -04:00
Lauren Tan
8ebe42f17c [ci] Cleanup --ci flag
This can be restored back to being a boolean instead of an enum

ghstack-source-id: aca58fb7ea386ee489dd895e028f1aa2fc507193
Pull Request resolved: https://github.com/facebook/react/pull/30508
2024-07-29 19:18:03 -04:00
Lauren Tan
e415b22494 [ci] Rename scripts/circleci to scripts/ci
ghstack-source-id: 5d9cb7d3dbd0f5c54856ad194517524f14cf1ccb
Pull Request resolved: https://github.com/facebook/react/pull/30507
2024-07-29 19:18:03 -04:00
Lauren Tan
70885cfebe [ci] Cleanup forked build files
Unforks these scripts now that we are fully migrated to GH.

ghstack-source-id: e1e15452f2d2e178a5b56203ebd0b42151e6a9ba
Pull Request resolved: https://github.com/facebook/react/pull/30506
2024-07-29 19:18:02 -04:00
Lauren Tan
87b1a942ef [ci] Override actions/cache default timeout
actions/cache has a default timeout of 10 minutes. Occasionally the
cache service download gets stuck and it waits this amount of time
before proceeding like it was a cache miss.

10 minutes is way too long so let's shorten this to a minute.

ghstack-source-id: 95dee31bd9
Pull Request resolved: https://github.com/facebook/react/pull/30512
2024-07-29 17:36:43 -04:00
Lauren Tan
941e1b4a0a [ci] Fix passing secrets to runtime_prereleases
Second try, seems like you need to explicitly pass secrets to reusable
workflows.

ghstack-source-id: 05ffdae13474dba64119182bf72c15d07f83efd2
Pull Request resolved: https://github.com/facebook/react/pull/30504
2024-07-29 14:27:21 -04:00
Lauren Tan
93b12b824c [ci] Fix prerelease script npm authtoken
Try again to specify the npm token so the publish script can succeed.

ghstack-source-id: cd6e01b2ea
Pull Request resolved: https://github.com/facebook/react/pull/30503
2024-07-29 13:46:57 -04:00
Lauren Tan
03072a7a11 [ci] Fix prereleases reusable workflow
Turns out I had configured the reusable workflow with the wrong `on`
command.

Also removes the workflow_dispatch config from the nightly workflow as
that was not meant to be triggered manually.

ghstack-source-id: 426d07279d
Pull Request resolved: https://github.com/facebook/react/pull/30498
2024-07-29 12:37:05 -04:00
Lauren Tan
9af9764f55 [ci] Add prerelease workflows to GH actions
Migrates the last 2 remaining circleci jobs to GH actions. The behavior
of these workflows have been kept the same.

Overview:
- Reusable workflow `runtime_prereleases.yml` added
- Nightly workflow on cron triggers the reusable workflow with the
  current HEAD sha
- Manual workflow which can be triggered from the github UI with a
  `prerelease_commit_sha` which triggers the reusable workflow

ghstack-source-id: 84ef33c732
Pull Request resolved: https://github.com/facebook/react/pull/30495
2024-07-29 11:29:29 -04:00
Lauren Tan
b9af819f8b [ci] Fix invalid username and email in synthetic commit
ghstack-source-id: 951d0ef445
Pull Request resolved: https://github.com/facebook/react/pull/30486
2024-07-26 15:15:00 -04:00
Lauren Tan
0023cff871 [ci] Update runtime_commit_artifacts step versions
These were outdated and emitting warnings

ghstack-source-id: 2e22c29253
Pull Request resolved: https://github.com/facebook/react/pull/30479
2024-07-26 11:58:20 -04:00
Lauren Tan
2883d28b2d [ci] Unfork runtime_commit_artifacts
Promotes v2 to the primary workflow file so that we don't double write
to the protected branches.

Note: this may break DiffTrain temporarily, I will fix forward if so

ghstack-source-id: f6505a72f2
Pull Request resolved: https://github.com/facebook/react/pull/30477
2024-07-26 11:34:26 -04:00
Lauren Tan
417e93ca19 [ci] Add commit steps to new runtime_commit_artifacts_v2
Adds back the missing steps with a few tweaks to where previously some
`github` context value was referenced, I changed it to read from the
triggering workflow_run (ie the build on `main`) instead.

ghstack-source-id: 4b0fa135f0
Pull Request resolved: https://github.com/facebook/react/pull/30476
2024-07-26 11:34:25 -04:00
Lauren Tan
27d5dba884 [ci] Temporary fork runtime_commit_artifacts
Unfortunately creating a workflow that depends on another worfklow run
requires it to first be merged into main, so I can't really test porting
this without landing it first.

To do this safely, I've left the original job intact for DiffTrain and
added a forked file. This fork only currently downloads the artifact
from the HEAD commit in GH actions; I've removed the steps that push to
the protected branches for now while I test to see if this works as
expected.

This workflow needs to depend on the runtime_build_and_test workflow
being complete because otherwise it will fail since the artifacts
haven't been built yet.

ghstack-source-id: 0f9cebc525
Pull Request resolved: https://github.com/facebook/react/pull/30472
2024-07-25 18:09:32 -04:00
Lauren Tan
fe225e3a1f [ci] Add devtools regression workflow
More or less a straight copy from the circleci config. I spotted some
inefficiencies but will fix those later to make reviewing this easier.

ghstack-source-id: cb3456c602
Pull Request resolved: https://github.com/facebook/react/pull/30406
2024-07-25 17:27:38 -04:00
Lauren Tan
66df94460e [ci] Update sizebot node_modules caching strategy
The download job for sizebot requires both modules from the root repo
but also has a nested yarn lockfile in scripts/release. Calculate the
hash for the cache using both lockfiles.

ghstack-source-id: fc1703b547ab906ee244cfa3540414a6df8c660e
Pull Request resolved: https://github.com/facebook/react/pull/30393
2024-07-18 17:42:46 -04:00
Lauren Tan
abc0b712aa [ci] Fix sizebot job omitting build_and_lint dependency
ghstack-source-id: 3d457818c9812e320ddbd2bb3f35d5b2e3b92bdc
Pull Request resolved: https://github.com/facebook/react/pull/30392
2024-07-18 17:42:45 -04:00
Lauren Tan
3f4391d589 [ci] Only run sizebot on pull requests
Oops, forgot to port this bit over.

ghstack-source-id: 7fae8021d80a2ea58e89759147553e6910b49a0f
Pull Request resolved: https://github.com/facebook/react/pull/30390
2024-07-18 17:42:45 -04:00
Lauren Tan
4fb11acd79 [ci] Add sizebot to gh actions
Wires up sizebot in gh actions. I also fixed sizebot incorrectly
reporting that ReactAllWarnings was deleted.

ghstack-source-id: d3b1bb2088651409e8656c66f1eb28ab534a0604
Pull Request resolved: https://github.com/facebook/react/pull/30380
2024-07-18 16:41:22 -04:00
Lauren Tan
76f8cf5277 [ci] Rename temporary build parts
Adds an _ prefix to temporary build parts from parallelization to allow
easier merging in later passes.

ghstack-source-id: 714da85972e138d389224f67601dc7aaa6676e11
Pull Request resolved: https://github.com/facebook/react/pull/30385
2024-07-18 16:41:20 -04:00
Lauren Tan
512b09b24d [ci][ez] Rename artifact from process_artifacts_combined
Build artifacts are uniquely associated to a single workflow run, so
appending the sha was unnecessary. I originally included it to make it
easier to download later but this turns out to be unneeded.

Drops the sha suffix to make downloading the artifact in a separate
script / workflow more straightforward.

ghstack-source-id: 36ac4df4c3
Pull Request resolved: https://github.com/facebook/react/pull/30364
2024-07-18 11:53:05 -04:00