Commit Graph

202 Commits

Author SHA1 Message Date
Riccardo Cipolleschi
ece68f0efd Remove the trigger-react-native-release to use the GHA workflow_dispatch UI (#44898)
Summary:
This change removes the need for the trigger-react-native-release.js script.
Thanks to the migration to Github Actions, we can now leverage the GHA workflow UI to trigger a Prepare Release job that creates a github tag that will spin a new release.

The pro of this approach are:
- less code to maintain: instead of a complex trigger release scripts, we only have to maintain two very straightforward scripts for the CI
- easier to trigger a release: instead of running a script, we can now just use the GH UI

The `trigger-react-native-release` script was doing the following steps:
- check that we are in the release branch ==> Already implemented in the GHA workflow
- Gets the branch name (not needed) ==> the job will automatically run on the stable branch
- Check for unsent changes (not needed) ==> we are not in a local environment
- get the gh token (not needed) ==> You need to be logged in GH and have write access to the repo
- get the version ==> provided as a parameter
- fails if the tag is already there ==> Functionality added in the workflow
- Parse and validate the version ==> Functionality added to the action prepare-release action + the JS Script
- Compute the npmTag ==> Functionality added to the action prepare-release action + the JS Script
- trigger the release workflow ==> The GH UI does that for us

## Changelog:
[Internal] - Remove the trigger-react-native-release.js

Pull Request resolved: https://github.com/facebook/react-native/pull/44898

Test Plan: Testing in Production!

Reviewed By: cortinico, huntie

Differential Revision: D58461470

Pulled By: cipolleschi

fbshipit-source-id: 32bb0ee91370c9483a29e2ca2e18e24557d5fd53
2024-06-13 08:19:58 -07:00
Nicola Corti
1cb587c620 Do not publish Gradle Scans (#44925)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44925

I have the suspect this is causing our builds to be slower and especially causing the template tests to take 6 hours.
Let's try to disable it.

Changelog:
[Internal] [Changed] - Do not publish Gradle Scans

Reviewed By: cipolleschi

Differential Revision: D58520463

fbshipit-source-id: 028e16a725ea87e178ed4e0bf134737f32780544
2024-06-13 03:41:39 -07:00
Riccardo Cipolleschi
9fe9f032e6 Fix publish-release regex (#44921)
Summary:
The publish_release job is broken due to the initial regex. This change would like to fix it

## Changelog:
[Internal] - Fix publish_release job

Pull Request resolved: https://github.com/facebook/react-native/pull/44921

Test Plan:
Test on PR

<img width="1028" alt="Screenshot 2024-06-13 at 08 51 59" src="https://github.com/facebook/react-native/assets/11162307/0f68be41-a820-454e-9aca-99b2178984cd">

Reviewed By: huntie

Differential Revision: D58513441

Pulled By: cipolleschi

fbshipit-source-id: 55d632e111c4057431c5c607330571af2848534e
2024-06-13 03:24:40 -07:00
Blake Friedman
d54fd6219e disable on PRs (#44912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44912

While moving from CircleCI → GHA, we're removing this blocking folks landing PRs and just running on main.  We will re-enable once GHA is stable.

Changelog: [General][Changed] Disable GHA on PRs until it's stable

Reviewed By: NickGerleman

Differential Revision: D58478000

fbshipit-source-id: 053ee53455956bf19b6f9113cb796346359ad4ef
2024-06-12 14:41:25 -07:00
Riccardo Cipolleschi
ae7d543d31 Move HelloWorld jobs from CCI to GHA (#44875)
Summary:
This change migrates the GHA template jobs to the HelloWorld package for iOS.

## Changelog:
[Internal] - Move iOS template jobs to HelloWorld

Pull Request resolved: https://github.com/facebook/react-native/pull/44875

Test Plan: GHA are green

Reviewed By: cortinico

Differential Revision: D58459398

Pulled By: cipolleschi

fbshipit-source-id: 95404445d7375186860af5835b750b4735795434
2024-06-12 10:21:49 -07:00
Nicola Corti
b8f1b92298 Setup publishing of Gradle Scans on GHA (#44879)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44879

This sets up publishing of Gradle scans for every build on GHA.

Changelog:
[Internal] [Changed] - Setup publishing of Gradle Scans on GHA

Reviewed By: blakef

Differential Revision: D58419361

fbshipit-source-id: f54365ad259324747248ef0bb726dc64964507f8
2024-06-12 03:47:00 -07:00
Nicola Corti
d0012b7dcd Simplify build_android (#44870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44870

This just simplifies the build_android step on GHA

Changelog:
[Internal] [Changed] - Simplify build_android

Reviewed By: cipolleschi

Differential Revision: D58407537

fbshipit-source-id: 2bb34ef8b8d1883e653914488d4d417356f0f1d2
2024-06-11 08:34:46 -07:00
Nicola Corti
3c3c687bf7 Add Gradle Wrapper validation workflow (#44872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44872

This is just a security measure against wrapper tampering attacks.
See more on this here: https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md

Changelog:
[Internal] [Changed] - Add Gradle Wrapper validation workflow

Reviewed By: cipolleschi

Differential Revision: D58408099

fbshipit-source-id: 9768b924aa051128e4adc83f862536fb87238e65
2024-06-11 06:36:15 -07:00
Nicola Corti
2867d6679e Fix test_android_template (#44871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44871

This re-enables and fix `test_android_template`.
The problem was that we were invoking `yarn install` inside the template after we already installed with `npm install --registry`.
So this was invalidating the Verdaccio setup and effectively fetching packages from NPM

Changelog:
[Internal] [Changed] - Fix test_android_template

Reviewed By: cipolleschi

Differential Revision: D58407941

fbshipit-source-id: 9b7b877cfc994eb8db1b5bf71dd35289c3937f5c
2024-06-11 04:58:20 -07:00
Riccardo Cipolleschi
54bbb2b4fc Move the Publish Release workflow to GHA (#44868)
Summary:
This change moves the Publish release workflow to GHA

## Changelog:
[Internal] - Move the Publish Release workflow to GHA

Pull Request resolved: https://github.com/facebook/react-native/pull/44868

Test Plan: GHA is green

Reviewed By: cortinico, huntie

Differential Revision: D58406352

Pulled By: cipolleschi

fbshipit-source-id: 99fb1df16aeffa9d48bb4ed409847c6ac4892a82
2024-06-11 04:46:55 -07:00
Nicola Corti
1d926d47ff Make hermesc executable
Summary:
Seems like hermesc produced by GitHub Actions is not executable. This fixes it.

Changelog:
[Internal] [Changed] - Make hermesc executable

Reviewed By: cipolleschi

Differential Revision: D58407086

fbshipit-source-id: 84d7ba950b99214dfaed09a6aa499835fd01ede0
2024-06-11 03:55:53 -07:00
Nicola Corti
7c0c9a2b93 Cleanup the .github/workflows folder (#44857)
Summary:
Just doing some cleanup of the `.github/workflows` folder:
* apply-version-label-issue.yml hasn't been working since 0.72
* ios-tests is unnecessary as it's now covered by test-all
* nightlies-feedback.yml was experimental and last execution was ~5 months ago.

We can still recover them from the Git history if necessary.

## Changelog:

[INTERNAL] - Cleanup the .github/workflows folder

Pull Request resolved: https://github.com/facebook/react-native/pull/44857

Test Plan: Will wait for CI result

Reviewed By: NickGerleman

Differential Revision: D58362912

Pulled By: cortinico

fbshipit-source-id: d886e4f077eebfdf906169f09f96a950a361cab7
2024-06-11 03:14:49 -07:00
Nick Gerleman
db0e9eaa32 Disable test_android_template on PR (#44865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44865

This has not yet passed on main since we started testing on main two weeks ago: https://github.com/facebook/react-native/actions/runs/9316380994/job/25688028045

This change disables the GitHub Actions version `test_android_template` as a signal for PRs or diffs, since it isn't stable yet (but we still run it on main, and can manually dispatch it on any branch). This coverage is still enabled in CircleCI.

Changelog: [Internal]

Reviewed By: cortinico, alanleedev

Differential Revision: D58394745

fbshipit-source-id: 3227328b150a89b450d48784190f5d08d510cd1b
2024-06-11 03:01:18 -07:00
Riccardo Cipolleschi
7ce5e56f38 Migrate the Prepare Release workflow (#44833)
Summary:
This change migrates the prepare_release workflow from CCI to GHA

## Changelog:
[Internal] - Migrate from CCI to GHA

Pull Request resolved: https://github.com/facebook/react-native/pull/44833

Test Plan: Test on GHA

Reviewed By: huntie

Differential Revision: D58289050

Pulled By: cipolleschi

fbshipit-source-id: 134fc7ffb66a18eec1187e14500daec2828cae61
2024-06-10 09:49:45 -07:00
Riccardo Cipolleschi
01822eb66f Add VisionOS support to GHA nightlies (#44855)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44855

We recently landed a change that added support for VisionOS in the general test case for GHA but we forgot to include nightlies.

This change takes the same changes applied to [this file](https://github.com/facebook/react-native/pull/44691/files#diff-12d2c3c126fcc84106dce4b6d2be2220f018661b111a5382ad6effc1047f66aeR114-R368) and applies them to the nightlies.

## Changelog:
[Internal] - Add GHA nightlies support for VisionOS

Reviewed By: huntie

Differential Revision: D58358115

fbshipit-source-id: 577f62e53fb530bc534ba98508801a6970aef095
2024-06-10 07:12:02 -07:00
Oskar Kwaśniewski
924fb3de9b feat: build visionos hermes binary on the CI (#44691)
Summary:
As discussed with cipolleschi offline, this PR adds visionOS to the prebuilt Hermes binary for the CI.

## Changelog:

[IOS] [ADDED] - Prebuilt version of Hermes for visionOS

Pull Request resolved: https://github.com/facebook/react-native/pull/44691

Test Plan: Check if CI builds xcframework for visionOS.

Reviewed By: cortinico

Differential Revision: D58189271

Pulled By: cipolleschi

fbshipit-source-id: dc76746b2c1e22670bef4c21411a598e43dad577
2024-06-10 04:52:24 -07:00
Oskar Kwaśniewski
38bae4bdf4 fix: run nightly CI only on the main repo (#44844)
Summary:
I've noticed that nightly CI build was also running on my fork. I don't think this is necessary for every React Native fork (there are 24k of forks). This can save lots of unnecessary CI time.

## Changelog:

[INTERNAL] [FIXED] - Enable nightly run only on the main repo

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/44844

Test Plan: CI Green

Reviewed By: cipolleschi

Differential Revision: D58356192

Pulled By: cortinico

fbshipit-source-id: 1384d06708220d297e67d31433fcf3ac1d58bbbc
2024-06-10 04:32:46 -07:00
Riccardo Cipolleschi
9fa0764334 Fix Nightlies for Android (#44847)
Summary:
While migrating from CCI to GHA, we mistakenly set the `ORG_GRADLE_PROJECT_reactNativeArchitectures` wrongly. The result was that the nightly was building only 1 architecture for android instead of all of them.

This change fixes that, but asking GHA to build all the architectures when running nightlies

bypass-github-export-checks

## Changelog:
[Internal] - Build all the architectures for android when running nightlies

Pull Request resolved: https://github.com/facebook/react-native/pull/44847

Test Plan: Run a nightly from the branch and see it working

Reviewed By: huntie

Differential Revision: D58347697

Pulled By: cipolleschi

fbshipit-source-id: 43a2b83ba9183e6f5a11d1e6f6a27df622ee8cc6
2024-06-10 03:56:24 -07:00
Riccardo Cipolleschi
2b343ca449 Handle lowercase->uppercase of hermes ios artifacts (#44836)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44836

Sometimes, GHA creates artifacts with lowercase Debug/Release. Make sure that if it happen, we uppercase them.

## Changelog
[Internal] - Handle lowercase->uppercase of hermes ios artifacts

Reviewed By: cortinico

Differential Revision: D58290049

fbshipit-source-id: c1e76e9e5718500378ba08d26d5c4dd0620c78c4
2024-06-07 08:38:04 -07:00
Riccardo Cipolleschi
f57d6246f1 Bump build_npm_package machine to more powerful ones (#44831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44831

The build_npm_package jobs remains sometimes in queue because there are not enough executors for it to run.
This makes our signals less reliable.

Plus, it is rebuilding part of Android, so it can benefit from a bigger machine

## Changelog:
[Internal] - Bump build_npm_package machine to more powerful ones

Reviewed By: cortinico

Differential Revision: D58284884

fbshipit-source-id: a29b7db843633ff3cfd9373cf4dbe55b24c939b1
2024-06-07 05:38:46 -07:00
Riccardo Cipolleschi
ace899a2bb Setup Nightlies (#44741)
Summary:
This change adds a separate workflow for Nightlies. This workflow do not run tests on iOS and Android and proceed to release a nightly.

**🚨 Important 🚨** We need to update the GHA secrets as there is none set.

_Note: This is a first step to ensure that we can release Nightlies from GHA. I'll factor out all the actions in following updates to cleanup and refactor once we know that everything works!_

## Changelog:
[INTERNAL] - Add nightlies workflow on GHA

Pull Request resolved: https://github.com/facebook/react-native/pull/44741

Test Plan:
1. Add the `pull_request` trigger to see the workflow start
2. Monitored the workflow to make sure that it worked
3. Tested the nightly locally
4. Removed the `pull_request` trigger, otherwise we would publish a nightly on each PR! xD

Reviewed By: cortinico

Differential Revision: D58084002

Pulled By: cipolleschi

fbshipit-source-id: 593145392fe686930ccb00beb68d9130b8401cbc
2024-06-07 01:27:25 -07:00
Riccardo Cipolleschi
84ff977b37 Fix GHA for Publish bumped packages (#44760)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44760

This change fixes the gha that should publish bumped packages.

## Changelog
[Internal] - Fix CI

Reviewed By: huntie

Differential Revision: D58084675

fbshipit-source-id: 16639f5413dbe2a7182561a1de911194ae52a161
2024-06-03 07:10:34 -07:00
Riccardo Cipolleschi
be38fbb3f8 Add publish_bumped_packages in GHA
Summary:
This change introduce the publish_bumped_packages job in GHA as this job was not ported before.

This is a porting of [this workflow](https://github.com/facebook/react-native/blob/main/.circleci/configurations/workflows.yml#L128-L135), which calls the [`find_and_publish_bumped_packages`](https://github.com/facebook/react-native/blob/main/.circleci/configurations/jobs.yml#L1278-L1289) which uses the [`build_packages`](https://github.com/facebook/react-native/blob/main/.circleci/configurations/commands.yml#L100-L104) command

## Changelog:
[Internal] - Add the `publish_bumped_packages` to GHA

Reviewed By: huntie

Differential Revision: D58016209

fbshipit-source-id: 3c8cf7bc50eeaf11b00850fc2251183b12b18d20
2024-06-03 06:14:58 -07:00
Riccardo Cipolleschi
31d6ed14d0 Remove Old Arch build jobs (#44729)
Summary:
Based on https://github.com/facebook/react-native/issues/44723.
This PR removes some Old Arch build only jobs on iOS.
Some of the recent changes where unifying the build process across archs, so we don't have to build Old and New Arch

## Changelog:
[Internal] - Remove OldArch jobs when they are not required

Pull Request resolved: https://github.com/facebook/react-native/pull/44729

Test Plan: CCI is green

Reviewed By: cortinico

Differential Revision: D57975238

Pulled By: cipolleschi

fbshipit-source-id: ffd0ff0534f25019d501aa3862baee1442088784
2024-06-03 03:09:51 -07:00
Riccardo Cipolleschi
68d513bd21 Run GHA on main (#44723)
Summary:
In the previous months, we worked with a GH engineer to run our test workflow on PRs. The workflow was running properly, so we want to run it on main too.

## Changelog:
[Internal] - Run gha on main too

Pull Request resolved: https://github.com/facebook/react-native/pull/44723

Test Plan: GHA is green

Reviewed By: cortinico, NickGerleman

Differential Revision: D57975230

Pulled By: cipolleschi

fbshipit-source-id: 89d06361ad6f2230b7000e05970e9b16539c9164
2024-05-31 02:52:52 -07:00
Saad Najmi
c67dfbbe42 chore(ci): Set retryOnFailure for RNTester iOS Unit and Integration tests (#44642)
Summary:
On React Native macOS (I am not sure with the current state of React Native), the Xcode Unit and Integration tests are a bit flaky. Rather than set "retry on failure up to 3 times" through the pipeline config (in our case, Azure Pipelines), I realized my earlier PR to use Xcode test plans (https://github.com/facebook/react-native/pull/36443) means we can have Xcode retry the test. This should be faster than retrying it on the pipeline, because it retries just the failing test, not the entire "test" step. I did this on React Native macOS, so I'm doing it upstream so we can remove a diff.

## Changelog:

[INTERNAL] [CHANGED] - Set `retryOnFailure` for Xcode Unit and Integration tests

Pull Request resolved: https://github.com/facebook/react-native/pull/44642

Test Plan: CI should pass (faster)

Reviewed By: cortinico

Differential Revision: D57662523

Pulled By: cipolleschi

fbshipit-source-id: 8de2ab0ea15ba4d38c3b5bf96108c0c7ff5e9f32
2024-05-30 07:24:35 -07:00
Rob Anderson
de1967d631 convert circleci to github actions part 3 (#44511)
Summary:
One of the last parts of the migration. This PR foucuses on bringing the template jobs to Github actions.

bypass-github-export-checks

## Changelog:
[Internal] - Migrate template jobs from CCI to GH

Pull Request resolved: https://github.com/facebook/react-native/pull/44511

Test Plan: https://fburl.com/workplace/f6mz6tmw

Reviewed By: blakef

Differential Revision: D57202477

Pulled By: cipolleschi

fbshipit-source-id: be562cd3690d221f094dc734dd501aac25c36f59
2024-05-20 03:09:36 -07:00
Rob Anderson
d224e8c911 convert circleci mac and ios workflows to github actions (#44032)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. This change only inlcudes the mac and ios build and test jobs.

## Changelog:
[Internal] - Migrate iOS to github actions

Pull Request resolved: https://github.com/facebook/react-native/pull/44032

Test Plan:
[Here is the latest workflow run in my fork](https://github.com/robandpdx-org/react-native/actions/runs/8637660560).

 ---
https://fburl.com/workplace/f6mz6tmw

Reviewed By: NickGerleman

Differential Revision: D56581393

Pulled By: cipolleschi

fbshipit-source-id: a806b1a274e3d86c03e66a543360a800187855e4
2024-04-26 02:50:12 -07:00
Nick Gerleman
3db7ab6683 Run Android Build and Tests Against 8-core-ubuntu (#44248)
Summary:
The final merged GitHub Actions PR ended up keeping us on `ubuntu-latest` for Android jobs. These are ridiculously slow and are also now running out of disk space (which then files a task on a random change author). E.g. https://github.com/facebook/react-native/actions/runs/8826104037/job/24231379139

Switch to the `8-core-ubuntu`, which is closer to what we were using for CircleCI, and has more disk space: https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#specifications-for-general-larger-runners

Changelog:
[Internal]

Pull Request resolved: https://github.com/facebook/react-native/pull/44248

Test Plan: GitHub Actions still runs these successfully

Reviewed By: cortinico

Differential Revision: D56558697

Pulled By: NickGerleman

fbshipit-source-id: 180abcf2d3420760c090c0c21173afc6fa5bcf0c
2024-04-25 06:40:59 -07:00
Nicola Corti
3f7dadd838 Always quote the user + add links to the release support policy (#43810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43810

This bot never works because facebook bot is faster.
I'm updating the logic to always publish the thank you message + update the link with the correct one.

Changelog:
[Internal] [Changed] - Always quote the user + add links to the release support policy

Reviewed By: rshest, cipolleschi

Differential Revision: D55643675

fbshipit-source-id: d2e726580c82d7f89b37d17846675b7c4c38e908
2024-04-03 05:44:01 -07:00
Rob Anderson
036ffbc530 convert circleci workflows to github actions for android build and test (#43644)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. This change only inlcudes the android build and test jobs.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/43644

Test Plan:
[Here is the latest workflow run in my fork](https://github.com/robandpdx-org/react-native/actions/runs/8426560047).

 ---
https://fburl.com/workplace/f6mz6tmw

Reviewed By: NickGerleman

Differential Revision: D55417814

Pulled By: cortinico

fbshipit-source-id: 918c6be6fa06bb6605fad6efe21def5fe397f024
2024-04-02 04:04:34 -07:00
chenlong12580
274faf4b39 Delete useless local-cli dir (#43602)
Summary:
local-cli seems to have not been used, so we request to delete it

## Changelog:

[INTERNAL] [REMOVED] - Delete useless local-cli dir

Pull Request resolved: https://github.com/facebook/react-native/pull/43602

Reviewed By: cortinico

Differential Revision: D55281532

Pulled By: blakef

fbshipit-source-id: 8109222dbf643f1b1c3de491b4f42c07d09d8e13
2024-03-25 04:27:54 -07:00
Nicola Corti
9c7742b7db Bump needs-attention to v2.0.0 (#43493)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43493

This is a bump of one of our external GH custom action
Closes #38046

Changelog:
[Internal] [Changed] - Bump needs-attention to v2.0.0

Reviewed By: GijsWeterings

Differential Revision: D54905530

fbshipit-source-id: 1ecc25926144641bfc080b4ca7b8551a00a0caa1
2024-03-15 05:41:20 -07:00
Alex Hunt
eef87ca59e Implement previouslyExportedState on HermesRuntimeAgentDelegateNew (#43392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43392

## Context

We are migrating to the new Hermes `CDPAgent` and `CDPDebugAPI` APIs in the modern CDP server (previously `HermesCDPHandler`).

## This diff

Wires up `previouslyExportedState` with `CDPAgent`, and re-enables the `ResolveBreakpointAfterReload` integration test.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D54369985

fbshipit-source-id: 5dcb4fe59b8b36b2db9f0385e8487097822e5704
2024-03-12 13:03:13 -07:00
Alex Hunt
166fdc5125 Create wrapper class for Hermes CDPAgent + CDPDebugAPI (#43352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43352

## Context

We are migrating to the new Hermes `CDPAgent` and `CDPDebugAPI` APIs in the modern CDP server (previously `HermesCDPHandler`).

## This diff

Adds the `HermesRuntimeAgentDelegateNew` class to provide a swap-in replacement for the existing `HermesRuntimeAgentDelegate` when we enable this via an incoming feature flag.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D53810356

fbshipit-source-id: c63684252230a747ecf0bd8cbb6f4e22052ed9bf
2024-03-08 07:29:22 -08:00
D N
f043c832d1 chore: [Github Actions] Update actions/stale to the latest version (#43312)
Summary:
- Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/stale@v5. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
  - from last run: https://github.com/facebook/react-native/actions/runs/8136278191

## Changelog:

[INTERNAL] [CHANGED] - [Github Actions] Update actions/stale to the latest version

Pull Request resolved: https://github.com/facebook/react-native/pull/43312

Test Plan: Run workflow once

Reviewed By: cortinico

Differential Revision: D54506678

Pulled By: arushikesarwani94

fbshipit-source-id: 530ed1f0ff5571ee124bc78bac11c6584a9af60c
2024-03-05 03:43:32 -08:00
Luna Wei
9f85a249fa Link to releases repo for upgrade issues (#43295)
Summary:
Changelog: [Internal]

We're moving upgrade issues to https://github.com/reactwg/react-native-releases/issues/new/choose

Pull Request resolved: https://github.com/facebook/react-native/pull/43295

Reviewed By: cortinico, cipolleschi

Differential Revision: D54442540

Pulled By: lunaleaps

fbshipit-source-id: a079935a290f56d2932c5fc588e96a68e1c13f9a
2024-03-04 08:55:00 -08:00
Riccardo Cipolleschi
eca78c30c7 Add hermes commit to github action cache (#43067)
Summary:
The test_ios_rntester-Hermes which runs in github actions was created to make sure that recent commits on Hermes/main won't be breaking React Native
However, we discovered that the job was using a cached version of hermes and it was't really downloading the latest hermes every time.

With this change, the cocoapods cache will be invalidated whenever there is a commit on hermes/main, forcing the job to reinstall the dependencies when that happens.

bypass-github-export-checks

## Changelog:
[internal] - Fixed GH Action job to properly refetch newest version on Hermes when it changes.

Pull Request resolved: https://github.com/facebook/react-native/pull/43067

Test Plan:
Github Actions must be green and the action should show that a new version of Hermes is downloaded.

The commit is downloaded here:
 {F1457505882}

And it is used here, notice the last hash:
 {F1457505989}

Reviewed By: motiz88

Differential Revision: D53853963

Pulled By: cipolleschi

fbshipit-source-id: 7a65dd72a21b6da12b826273d1c92bb90b678652
2024-02-16 06:59:10 -08:00
m-nakamura145
dd4f15bf08 chore: Bump actions/checkout (#42952)
Summary:
GitHub is [planning to upgrade to Node 20](https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/). Versions prior to actions/checkout v3 use an outdated version of node, so we will upgrade to actions/checkout v4, where [Node 20 is the default](https://github.com/actions/checkout/releases/tag/v4.0.0).

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

chore: Bump actions/checkout

Pick one each for the category and type tags:

[INTERNAL] [FIXED] - chore: Bump actions/checkout

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - chore: Bump actions/checkout

Pull Request resolved: https://github.com/facebook/react-native/pull/42952

Reviewed By: cipolleschi

Differential Revision: D53655117

Pulled By: cortinico

fbshipit-source-id: 7c05e6ac2cb71c9d20c0b28b183cada6856f0a2d
2024-02-12 02:12:40 -08:00
Blake Friedman
9c0fe734fb constrain on github.actor
Summary: Currently rejecting all users, use the [github.actor](https://docs.github.com/en/actions/learn-github-actions/contexts#github-context:~:text=The%20username%20of%20the%20user%20that%20triggered,run%20(github.triggering_actor)%20has%20different%20privileges.)

Reviewed By: hoxyq

Differential Revision: D53275232

fbshipit-source-id: 54bbbdb857db6c642814953832e0ffdc55505deb
2024-01-31 13:12:47 -08:00
Blake Friedman
82e9a5e4f7 Add Github Action to mirror partner's nightly CI results (#42744)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42744

This adds a nightlies-feedback workflow, which our partners can get permission to mirror the results of their nightlies CI workflows.  We do this to use our internal tools that are restricted to Meta owned Github projects.

The benefit to partners is that they can add this step to their workflow:

```
      - if: ${{ success() || failure() }}
        env:
          OUTCOME: ${{ contains(steps.*.conclusion, 'failure') && 'fail' || 'pass' }}
        run: |
          curl -X POST \
               -H "Accept: application/vnd.github.v3+json" \
               -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
               https://api.github.com/repos/facebook/react-native/actions/workflows/nightlies-feedback.yml/dispatches \
               -d "$(printf '{"ref":"main","inputs":{"outcome":"%s","stage":"needs_an_action","link":"http://github.com/some/action","version":"%s"}}' "$OUTCOME" "${{ inputs.version }}" )"

```

### Feedback:
It's complicated, but there are ways to simplify this for our users.  I'd like to prove out that it's valuable first with Expo.

### Limits:

There's certainly a lot of room for improvement, which we could provide with a published action (populate the ref correctly, simplify gathering the outcome, labelling of failing step correctly, etc...).

### Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53229996

fbshipit-source-id: 10e4ba5b5fd85935b1b03aaafa41ef8b96d2faca
2024-01-31 09:49:08 -08:00
Nicola Corti
38d07eb284 Adds "Needs: Author Feedback" if "Needs: Repro" is applied
Summary:
As the title says, if we discover that an issue needs a repro, then we should also apply
the "Needs: Author Feedback" as that will make the issue stale quicker (30 days) rather than (90)

Changelog:
[Internal] [Changed] - Adds "Needs: Author Feedback" if "Needs: Repro" is applied

Reviewed By: NickGerleman

Differential Revision: D51895945

fbshipit-source-id: 3ed651aec96795ada3e7c28b0f1e68d68f7fc870
2023-12-07 02:56:49 -08:00
Nicola Corti
bdcc9d0937 Refresh the New Issue template (#41800)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41800

I've cleaned up the new issue template:
1. Added Expo to the template selector list
2. Added a short blurb with relevant links at the beginning of every issue template
3. I've added a dedicated field for reproducer and one for extra
4. I've added rendering to the react-native info block
5. I've added another rendered blog for stacktraces.
6. I've added a drop-down item for affected platform

Changelog:
[Internal] [Changed] - Refresh the New Issue template

Reviewed By: GijsWeterings

Differential Revision: D51847659

fbshipit-source-id: 565a2dcab4913825f441e2315ae9b4dd34fd2f4f
2023-12-05 08:18:51 -08:00
Riccardo Cipolleschi
19945ad83b Add Github Action to add a commit with #run-e2e-tests (#41311)
Summary:
https://github.com/facebook/react-native/issues/41308 introduce the possibility to run e2e tests if a commit contains #run-e2e-tests in the commit message.
This PR builds on top of that, and let users to run e2e tests by adding a comment with with #run-e2e-tests

## Changelog:
[Internal] - Allow to run e2e tests from comments

Pull Request resolved: https://github.com/facebook/react-native/pull/41311

Test Plan: Not sure it can be tested until the PR is merged... ¯\_(ツ)_/¯

Reviewed By: dmytrorykun

Differential Revision: D51111543

Pulled By: cipolleschi

fbshipit-source-id: e6c55950552f03830fa35c89d385ab9b17f8facb
2023-11-09 05:53:47 -08:00
Riccardo Cipolleschi
475b835e43 Add Hermes Xcode integration test to GH Actions (#41187)
Summary:
After disabling the E2E tests, we lost a test that was verifying that Hermes works well with the latest version of React Native for iOS
This change introduce this test back in GH actions

## Changelog:
[Internal] Add tests for Hermes-Xcode integration to GH Actions

Pull Request resolved: https://github.com/facebook/react-native/pull/41187

Test Plan: CI is green 🤞

Reviewed By: NickGerleman

Differential Revision: D50737860

Pulled By: cipolleschi

fbshipit-source-id: f4bc09be879af7aba0ca42f1b7e407a5d5dc0986
2023-10-31 09:37:24 -07:00
kacperkapusciak
54d70cf0c6 Prevent check-for-reproducer action trigger on Umbrella and old issues (#38664)
Summary:
This PR resolves problems with too spammy `check-for-reproducer` action triggering on very old and most prominently the Umbrella issues.

Also, it brings back triggering on edited issues removed in https://github.com/facebook/react-native/pull/38634

Related to https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Prevent check-for-reproducer action trigger on Umbrella and old issues

Pull Request resolved: https://github.com/facebook/react-native/pull/38664

Test Plan: <img width="470" alt="image" src="https://github.com/facebook/react-native/assets/39658211/1d840145-1e4f-43c5-a3ea-bc16e61071ef">

Reviewed By: cipolleschi

Differential Revision: D47868536

Pulled By: cortinico

fbshipit-source-id: fd78c38145c76f3867a41439aee5d087f38c85d2
2023-07-28 08:50:35 -07:00
Nicola Corti
ad91518fed Let check-for-reproducer run only on newly created issues. (#38634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38634

To reduce the noise of the `check-for-reproducer` bot, this restricts the event
that trigger the bot to only the issue creation.

Changelog:
[Internal] [Changed] - Let check-for-reproducer run only on newly created issues

Reviewed By: cipolleschi

Differential Revision: D47792374

fbshipit-source-id: 738a9342899e234022029e94f43b0dccebc21819
2023-07-26 03:53:59 -07:00
Nicola Corti
bae0016dc9 Properly split the "Too Old Version of React Native" message
Summary:
The bot message is split in a wrong way:
https://github.com/facebook/react-native/issues/38603#issuecomment-1648749441
I'm updating it to use `<br/><br/>` instead which renders correctly inside tables.

Changelog:
[Internal] [Changed] - Properly split the "Too Old Version of React Native" message

Reviewed By: NickGerleman

Differential Revision: D47764363

fbshipit-source-id: 7a80f03b4228a3f0c69d718b8eb60ecd4ac60a2b
2023-07-25 21:49:41 -07:00
kacperkapusciak
3f78fa953a Fix checkForReproducer action not adding Missing Repro comment (#38531)
Summary:
This PR fixes a bug where GitHub Actions bot didn't add a comment when "Needs: Repro" label was present in an issue.

When a maintainer adds the label manually the bot comments with "Missing Reproductible Example" as normally.

It seems like the problem occurred because of a difference in a sandbox repository and the proper facebook/react-native repo environment.

My sandbox that I used to test https://github.com/facebook/react-native/pull/38338 had an "bot" account with Personal Access Token setup to reply to issues. Turns out that bots using PAT have more permissions and can trigger one action from the other.

**The solution is to send the comment directly from the `checkForReproducer` action.** This won't collide with other actions but sadly will duplicate the sending logic into two actions.

This PR also makes the bot respect when a maintainer removes and adds a label by hand and won't alter the maintainer decision.

Related to ☂️ https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Message

Pull Request resolved: https://github.com/facebook/react-native/pull/38531

Test Plan: ![image](https://github.com/facebook/react-native/assets/39658211/b956416f-9834-4c61-981f-fe6c17a5eec5)

Reviewed By: cipolleschi

Differential Revision: D47666922

Pulled By: cortinico

fbshipit-source-id: 4a6a471cb11c6ed9b48263d18bf8e283577a14bb
2023-07-21 08:46:03 -07:00
kacperkapusciak
5705661d1f Fix issue bot triggering on PRs (#38525)
Summary:
This PR fixes a bug with an issue labeling bot issues triggering on comments to pull requests. The action doesn't trigger when a pull request is open (but other actions add comments immediately).

From [GitHub docs](https://docs.github.com/en/webhooks-and-events/events/issue-event-types):

> GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. [...] Pull requests have a **`pull_request` property in the `issue` object.**

☝️ Which is a way to differentiate between an issue and a pull request

Relates to a bug introduced in https://github.com/facebook/react-native/pull/38338 and links to ☂️https://github.com/facebook/react-native/issues/35591

## Changelog:

[INTERNAL] [FIXED] - Prevent issue bot triggering on pull requests

Pull Request resolved: https://github.com/facebook/react-native/pull/38525

Test Plan:
This PR makes use of  `github.event.issue.pull_request` object which is null on issues and comments in issues:

![image](https://github.com/facebook/react-native/assets/39658211/e0a64039-5fb7-4ad3-95aa-65cb7c9f0a4b)

and truthy on comments on pull requests

![image](https://github.com/facebook/react-native/assets/39658211/9df69d00-c792-4c00-bfc2-9ee832551d16)

With a change from PR bot skips execution on comments on pull requests

![image](https://github.com/facebook/react-native/assets/39658211/f02687fb-f81b-4278-8d0e-9b23651229c1)

Reviewed By: ryancat

Differential Revision: D47628330

Pulled By: cortinico

fbshipit-source-id: 63e7180bb57ffd34904414a702c02019e18a042b
2023-07-21 03:10:12 -07:00