311 Commits

Author SHA1 Message Date
Lauren Tan
a7c5c07ed4 [ci] Add new fizz GitHub action
Copies the existing circleci workflow for checking the inlined Fizz
runtime into GitHub actions. I didn't remove the circleci job for now
just to check for parity.

ghstack-source-id: 09480b1a20
Pull Request resolved: https://github.com/facebook/react/pull/30035
2024-06-22 12:37:42 -04:00
Lauren Tan
85215413cb [ci] Improve parallelism of yarn test
This PR adds parallelism similar to our existing circleci setup for
running yarn tests with the various test params. It does this by
sharding tests into `$SHARD_COUNT` number of groups, then spawning a job
for each of them and using jest's built in `--shard` option.

Effectively this means that the job will spawn an additional (where `n`
is the number of test params)

`n * $SHARD_COUNT` number of jobs to run tests in parallel

for a total of `n + (n * $SHARD_COUNT)` jobs. This does mean the
GitHub UI at the bottom of each PR gets longer and unfortunately it's
not sorted in any way as far as I can tell. But if something goes wrong
it should still be easy to find out what the problem is.

The PR also changes the `ci` argument for jest-cli to be an enum instead
so the tests use all available workers in GitHub actions. This will have
to live around for a bit until we can fully migrate off of circleci.

ghstack-source-id: 08f2d16353
Pull Request resolved: https://github.com/facebook/react/pull/30033
2024-06-22 12:37:42 -04:00
Lauren Tan
28c1336c91 [ci] Add new yarn test GitHub action
Copies the existing circleci workflow for yarn test into GitHub
actions. I didn't remove the circleci job for now just to check for
parity.

Opted to keep the same hardcoded list of params rather than use GitHub's
matrix permutations since this was intentional in the circleci config.

ghstack-source-id: b77a091254
Pull Request resolved: https://github.com/facebook/react/pull/30032
2024-06-22 12:37:41 -04:00
Lauren Tan
2f34bf427f [ci] Add new flags GitHub action
Copies the existing circleci workflow for yarn flags into GitHub
actions. I didn't remove the circleci job for now just to check for
parity.

ghstack-source-id: 003f2a4796
Pull Request resolved: https://github.com/facebook/react/pull/30029
2024-06-21 15:02:18 -04:00
Lauren Tan
419ace93ec [ci] Parallelize flow github action
The existing flow-ci script makes some assumptions about running inside
of circleci for parallelization. This PR forks the script with very smal
ll tweaks to allow for a short name to be passed in as an argument.
These short names are discovered in a new GH job and then each one is
passed as an argument for parallelization

ghstack-source-id: dc85486388
Pull Request resolved: https://github.com/facebook/react/pull/30026
2024-06-21 12:32:47 -04:00
Lauren Tan
0477799cfb [ci] Add new flow GitHub action
Copies the existing circleci workflow for flow into GitHub actions. I
didn't remove the circleci job for now just to check for parity.

ghstack-source-id: 59104902e4
Pull Request resolved: https://github.com/facebook/react/pull/30025
2024-06-21 12:32:47 -04:00
Lauren Tan
f598eb4dc9 [ci] Add new lint GitHub action
Copies the existing circleci workflow for linting into GitHub actions. I
didn't remove the circleci for now just to check for parity.

ghstack-source-id: a3754dcc3b
Pull Request resolved: https://github.com/facebook/react/pull/30023
2024-06-21 12:05:29 -04:00
Lauren Tan
49c37048de [prettier] Combine compiler and runtime configs
Merges the existing config to the root one so we can have a single
configuration file. I've tried to keep the compiler config as much as
possible in this PR so that no formatting changes occur.

ghstack-source-id: 8bbfc9f269
Pull Request resolved: https://github.com/facebook/react/pull/30021
2024-06-21 12:05:29 -04:00
Rick Hanlon
bf1bb2e5e5 Fix xplat sync syntax error 2024-06-10 13:30:30 -04:00
Ricky
f81d5ee219 Fix xplat sync (#29833)
## Overview

The clever trick in https://github.com/facebook/react/pull/29799 turns
out to not work because signedsource includes the generated hash in the
header. Reverts back to checking git diff, filtering out the REVISION
file and `@generated` headers.
2024-06-10 13:24:45 -04:00
Rick Hanlon
a0e99f7a6d Revert bad push 2024-06-10 10:51:07 -04:00
Rick Hanlon
13cd4018a8 don't commit 2024-06-10 10:47:18 -04:00
Rick Hanlon
b6b2ab1e0c try this 2024-06-10 10:46:11 -04:00
Ricky
6b35ff766a Move @generated from build to sync (#29799)
## Overview

Reverts https://github.com/facebook/react/pull/26616 and implements the
suggested way instead.

This change in #26616 broken the internal sync command, which now
results in duplicated `@generated` headers. It also makes it harder to
detect changes during the diff train sync. Instead, we will check for
changes, and if there are changes sign the files and commit them to the
sync branch.

## Strategy

The new sync strategy accounts for the generated headers during the
sync:
- **Revert Version**: Revert the version strings
- **Revert @generated**: Re-sign the files (will be the same hash as
before if unchanged)
- **Check**: Check if there are changes **if not, skip**
- **Re-apply Version**: Now add back the new version string
- **Re-sign @generated**: And re-generate the headers

Then commit to branch. This ensures that if there are no changes, we'll
skip.

---------

Co-authored-by: Timothy Yung <yungsters@gmail.com>
2024-06-10 10:16:40 -04:00
Ricky
8c3697a849 Fix xplat sync to ignore @generated header (#29738)
Use some clever git diffing to ignore lines that only change the
`@generated` header. We can't do this for the version string because the
version string can be embedded in lines with other changes, but this
header is always on one line.
2024-06-03 16:39:38 -04:00
Rick Hanlon
b421783110 Don't skip www commit 2024-06-03 10:21:28 -04:00
Ricky
5ad2c37273 Skip empty sync commits (both repos) (#29707)
Requires https://github.com/facebook/react/pull/29706

The strategy here is to:
- Checkout the builds/facebook-www branch
- Read the current sync'd VERSION
- Checkout out main and sync new build
- sed/{new version string}/{old version string}
- Run git status, skip sync if clean
- Otherwise, sed/{old version string}/{new version string} and push
commit

This means that:
- We're using the real version strings from the builds
- We are checking the last commit on the branch for the real last
version
- We're skipping any commits that won't result in changes
- ???
- Profit!
2024-06-03 10:09:23 -04:00
Ricky
6d3110b4d9 Don't allow blank issues (#29691)
We're getting a ton of issues filed using the blank template, for
example these airline support tickets:
https://github.com/facebook/react/issues/29678


I think someone somewhere is linking to our issues with pre-filled
content. This fixes it by forcing a template to be used.
2024-05-31 12:05:32 -04:00
Timothy Yung
5bd4031226 Revert Build Versions from Content Hash to Commit Hash (#29663)
https://github.com/facebook/react/pull/29236 caused issues for internal
syncs at Meta, because we were computing version numbers using file
hashes (to eliminate "no-op" internal sync commits). The problem is that
since version numbers may not be consistent across synced files (e.g. if
some files have not changed in recent commits), the newly introduced
version mismatch check fails.

There's some more work that needs to be done here to restore the
benefits of file-specific hashing, but for now this simply reverts the
content hash changes from the following PRs:

- https://github.com/facebook/react/pull/28633
(95319ab5af)
- https://github.com/facebook/react/pull/28590
(37676aba76)
- https://github.com/facebook/react/pull/28582
(cb076b593c)
- https://github.com/facebook/react/pull/26734
(5dd90c5623)
- https://github.com/facebook/react/pull/26331
(3cad3a54ed)
2024-05-30 07:26:12 -07:00
Lauren Tan
61aa159086 [compiler] Fix up prettier
Our prettier setup is all messed up after the merge, so this PR should
fix things

ghstack-source-id: f825460ea6
Pull Request resolved: https://github.com/facebook/react/pull/29213
2024-05-29 11:46:27 +09:00
Lauren Tan
ecddf3cb07 Add issue template for React Compiler
Adds a GitHub issue template form so we can automatically categorize
issues and get more information upfront. I mostly referenced the
DevTools bug report template and made some tweaks.

ghstack-source-id: 5bfc728a62
Pull Request resolved: https://github.com/facebook/react/pull/29140
2024-05-17 11:33:53 -07:00
Joe Savona
575477a2e8 Publish React Compiler to open source 2024-05-15 10:58:51 -07:00
Lauren Tan
ecccaf6e01 Fix CI for compiler paths
ghstack-source-id: 43bb0c8c957fc550203445868c90fa706e3a8d11
Pull Request resolved: https://github.com/facebook/react-forget/pull/2968
2024-05-14 11:02:47 -04:00
Jan Kassens
4cf7ee23fb CI: remove non-functional Rust compiler benchmark workflow (#2948)
`forget_napi` doesn't exist and given we're not currently working on the Rust compiler, I'm not sure we need to keep this around until we know that we do want to invest into this area again.
2024-05-13 17:04:18 -04:00
Jan Kassens
5a1cbc77b6 CI: remove react.yml integration test workflow (#2947)
This was used to run React CI tests compiled with the React Compiler. This is currently no longer used.
2024-05-07 17:29:57 -04:00
Jan Kassens
f4c12cc4a8 CI: fix Compiler Playground workflow (#2945)
Also renamed the workflow to make more sense when merged into the main React repo.
2024-05-07 16:15:59 -04:00
Jan Kassens
257f22ac57 CI: fix Compiler TypeScript workflow (#2946) 2024-05-07 16:07:46 -04:00
Jan Kassens
90a5d48a2f CI: fix Rust CI workflows (#2942)
- update paths
- update working directory
- rename files for clarity when merged into the main react repo
2024-05-07 11:17:30 -04:00
Jan Kassens
55d6c6efaa CI: move .github directory back to root (#2941)
We need this in the root to run the steps. It should merge cleanly with the React repo as there is no file name overlap.

Next step is to update the paths to make it work again.
2024-05-07 11:03:44 -04:00
Timothy Yung
46abd7b1de Update compiled-rn destination paths to vendor/react (#28989)
I'm changing the destination paths in fbsource from `vendor/*` to
`vendor/react/*`.
2024-05-03 15:46:43 -07:00
Jon Janzen
38cd73b25b Stop committing resources to an external repo (#28963)
This has been integrated into this repo (`builds/facebook-fbsource`) so
we no longer need the extra repo
2024-05-03 11:01:53 -07:00
Ricky
c4083616a2 Create React 19 issue template 2024-04-25 15:32:31 -04:00
Jon Janzen
1f0701c11e Write Diff Train import branch to this repo (#28869)
For fbsource we've historically used a separate repo for imports due to
internal limitations in Diff Train. Those have been lifted so we can now
commit this branch here and then we can import from this repo (and get
rid of the other repo)
2024-04-18 12:08:52 -07:00
Ricky
4fdbac075f Revert "convert circleci workflow devtools_regression_tests to github actions" (#28865)
Reverts facebook/react#27800, tests fail on main
2024-04-18 10:18:53 -04:00
Rob Anderson
496e8733bb convert circleci workflow devtools_regression_tests to github actions (#27800)
## Summary

This pull request converts the CircleCI workflows to GitHub actions
workflows. [Github Actions
Importer](https://github.com/github/gh-actions-importer) was used to
convert the workflows initially, then I edited them manually to correct
errors in translation.

**Issues**
1. facebook/react/devtools_regression_tests  
The scripts that this workflow calls need to be modified.

## How did you test this change?

I tested these changes in a forked repo. You can [view the logs of this
workflow in my fork](https://github.com/robandpdx/react/actions).

https://fburl.com/workplace/f6mz6tmw
2024-04-18 15:04:27 +01:00
Joseph Savona
64c8d2d45d Attempt to fix diff syncing for Meta (#28801)
#28796 broke Meta's PR syncing tool, hoping this fixes it
2024-04-09 14:05:18 -07:00
Jan Kassens
cffbcac8e3 Run stale job hourly (#28769) 2024-04-09 09:21:20 -04:00
Jack Pope
7966ccddc8 Enable stale action (#28729)
Follows #28695

Now that the action has run successfully in debug mode
([logs](https://github.com/facebook/react/actions/runs/8532177618/job/23372921455#step:2:35)),
let's enable it to persist changes.

Also changes the number of operations per run from the default of 30 to
100 since we have a large backlog of issues and PRs to work through.

Finally adds enhancement label as exempt from stale.
2024-04-04 10:27:29 -04:00
Jack Pope
8833338c8f Convert deprecated stalebot to github action (#28695)
## Summary

This repo uses [Stalebot](https://github.com/probot/stale) to manage
stale Issues and PRs. Stalebot hasn't been maintained for a couple of
years and is officially archived. The number of open Issues and PRs has
increased rapidly since early 2022. Some of this looks like issues with
Stalebot reliability where labels were not applied or close actions were
not taken even when meeting the criteria in the config.

In order to make it easier for maintainers to spend time on current
Issues and PRs, let's upgrade to the Github Stale Action. For now this
PR applies the same config to the new action but we can iterate on it as
needed. The goal is to clean up abandoned and no-longer-relevant
submissions, not to close Issues that describe active bugs or feedback.

## How did you test this change?

Added `debug-only: 'true'` to this PR so we can run the action and
review the logs before allowing the action to run on schedule. We may
see a large amount of label changes and close actions on the first run
as the action clears out previously ignored stale submissions.
2024-04-01 14:32:28 -04:00
Ricky
0711ff1763 Add Type: Feature Request to stalebot ignore (#28625)
Prevent issues like https://github.com/facebook/react/issues/12525 from
closing due to inactivity.
2024-03-24 12:48:12 -04:00
Ricky
07c2543e54 Ignore /fixtures for dependabot (#28422)
We'll keep these up to date out of band, they are just for testing and
don't ship in the npm packages.
2024-02-22 15:44:37 -05:00
Masato Nakamura
51c9146072 Bump actions/checkout (#28383) 2024-02-20 22:46:43 +01:00
Ricky
6f8f000592 Update react docs link in issue template (#28195) 2024-02-01 14:44:26 -05:00
Rob Anderson
c01ac689e9 convert circleci worklfow fuzz_tests to github actions (#27801)
## Summary

This pull request converts the CircleCI workflows to GitHub actions
workflows. [Github Actions
Importer](https://github.com/github/gh-actions-importer) was used to
convert the workflows initially, then I edited them manually to correct
errors in translation.

## How did you test this change?

I tested these changes in a forked repo. You can [view the logs of this
workflow in my fork](https://github.com/robandpdx/react/actions).

https://fburl.com/workplace/f6mz6tmw
2023-12-12 14:55:43 -05:00
Jan Kassens
40f653d13c Remove WARNINGS file from FB (#27820)
The test was migrated to the generated JS file that allows Jest to track
the dependencies, we can now remove this file generation.
2023-12-08 16:21:15 -05:00
Jan Kassens
d3ed07bce0 [ci] try to fix commit_artifacts step (#27817)
Tries to fix the failure from
https://github.com/facebook/react/actions/runs/7142005723/job/19450371514

I think it failed because we cannot `mv` into a folder with existing
files or folders.
2023-12-08 12:38:35 -05:00
Jan Kassens
af1fc87b54 [meta] copy ReactAllWarnings.js file (#27811)
I recently added generation of this file in #27786, which builds the
file in CircleCI, but missed actually copying it to the facebook build
on GitHub Actions.

This adds the later.
2023-12-07 17:08:52 -05:00
Samuel Susla
5dd90c5623 Use content hash for react-native builds (#26734) 2023-05-02 12:04:02 +01:00
Jan Kassens
6d394e3d26 [actions] commit from special branches iff they exist (#26673)
This creates 2 special branches. If these special branches exist, we'll
commit build artifacts from these branches, main otherwise.
2023-04-19 12:11:40 -04:00
Samuel Susla
0018cf2246 Add REVISION file to react-fbsource-import (#26448)
For DiffTrain to fbsource, we need REVISION file in compiled-rn folder
2023-03-21 16:18:20 +00:00