Commit Graph

1130 Commits

Author SHA1 Message Date
Donny/강동윤 10c308ea22 build: Update swc_core to v23.1.0 again with macos build fix (#78940)
### What?

Update swc_core to `v23.1.0` again. And add `MACOSX_DEPLOYMENT_TARGET=11.0`.
 
### Why?

It's required to fix the build.

### How?

Closes PACK-4544
2025-05-08 13:57:54 -07:00
Benjamin Woodruff ea30af4a38 chore(CI): Run rspack tests in build_and_test.yml (#78757)
This is mostly a copy-paste of the turbopack tests in `build_and_test.yml`.

- Only runs tests on PRs with the `Rspack` label.
- Only runs the tests listed as passing in the manifest files. We want to identify regressions, but shouldn't report failures on known broken tests.
- Don't bother with the code for running tests against React 18. The cost of running those tests is high, and the value is pretty low. Most users should be on React 19.
- Rspack test failures are not yet blocking. We need to run continuously against canary to have confidence in blocking on this.

Current problems (I don't think these are blocking for this PR):

- The manifests are out of date. I'm working on this! The tests aren't blocking though, so it shouldn't be an issue for this PR.
- If the label is added *after* the PR is created, the rspack tests won't run until you push a new revision of the PR. I discussed this with @ijjk and the solution will likely involve moving these tests into a separate workflow that can subscribe to label changes. I'll experiment with this in a follow-up PR.
2025-05-08 08:58:37 -07:00
Benjamin Woodruff 5d85a444c4 fix(CI): Avoid rebuilding native code in jobs that don't depend on native code (#78944)
The following jobs do not depend on `build-native`, but don't specify `skipNativeBuild`:

- `lint`
- `test-devlow`
- `test-next-swc-wasm`
- `test-next-swc-napi-wasi` *(currently disabled)*
- `test-unit` *(does actually appear to depend on native binaries)*

That means that they still build the native binary, but they don't wait for `build-native` to finish first, so they don't use the cached version (they run before the cache is populated), and instead each spend 5 minutes of CPU time rebuilding the native binary.
2025-05-08 10:31:01 +02:00
Benjamin Woodruff e4e45470d1 fix(CI): Remove e2e test timeout overrides from rspack & turbopack suites (#78934)
**The default timeout is 1 minute.** This PR reduces the timeouts for these tests from 4 minutes to 1 minute.

Maybe these overrides made sense at some point, but turbopack shouldn't ever be significantly slower than webpack in any test (if it is, that's a bug), so we shouldn't need larger timeouts for these.

This long 4 minute timeout has contributed to github action job timeouts we've previously experienced for the arewerspack/areweturboyet nightly jobs, so IMO it's hurting more than it's helping.

areweturboyet development tests: https://github.com/vercel/next.js/actions/runs/14893493964
areweturboyet production tests: https://github.com/vercel/next.js/actions/runs/14893499248
2025-05-08 09:48:18 +02:00
Benjamin Woodruff 8b6a0ba7ff chore(CI): Remove unused environment variables from build_and_test.yml (#78732)
See the comment added to the code.

IMO: Having these environment variables duplicated with `build_reusable.yml` is at best misleading, and at worst dangerous as you could modify the wrong file.
2025-05-05 11:47:21 -07:00
JJ Kasper 77b8f0e742 Revert "De-dupe build_and_deploy run for PRs" (#78809) 2025-05-03 11:18:04 -07:00
JJ Kasper e66de04dda De-dupe build_and_deploy run for PRs (#78792)
This aims to avoid running the `build_and_deploy` workflow twice when
pushed to the main Next.js repo and also opened as a PR.

Follow-up to https://github.com/vercel/next.js/pull/78737

Validated against:
https://github.com/vercel/next.js/actions/runs/14804173232/job/41569421246?pr=78795
2025-05-02 22:42:14 +00:00
JJ Kasper 6665d5e2f1 Update test new tests for deploy mode (#78737)
This updates our workflow for testing new tests against deploy mode to
allow running against forks as we don't want to introduce flakey tests
in this mode even if opened from forks.
2025-05-01 11:07:37 -07:00
Benjamin Woodruff 005db43079 chore(CI): Use TEST_CONCURRENCY by default in run-tests.js (#78731)
It seems too easy to accidentally not pass through `TEST_CONCURRENCY` in `build_and_test.yml`, so IMO `run-tests.js` should use it by default, still allowing overriding with `-c` or `--concurrency`.

I tested by spot-checking CI jobs for log lines like this:

```
Running tests with concurrency: 4 in test mode undefined
```

or

```
Running tests with concurrency: 1 in test mode undefined
```
2025-04-30 22:05:54 -07:00
Benjamin Woodruff 1abba59ac7 chore(CI): Re-run pnpm install after pnpm build in build_reusable.yml (#78720)
Apparently there's a chicken-and-egg problem between `pnpm install` and `pnpm build` where some packages depend on `pnpm build` being run first, but `pnpm build` can't run until after `pnpm install`.

Remove this one-off hack in `afterBuild` for `devlow-bench` and document it in `build_reusable.yml`.
2025-04-30 15:22:24 -07:00
Benjamin Woodruff e87bb28ca6 chore(CI): Line-wrap afterBuild blocks in build_and_test.yml (#78718)
As part of #76251 I rewrote the `afterBuild` job from:

```yaml
- run: /bin/bash -c "${{ inputs.afterBuild }}"
```

to

```yaml
- run: ${{ inputs.afterBuild }}
  # defaults.run.shell sets a stronger options (`-leo pipefail`)
  # Set this back to github action's weaker defaults:
  # https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
  #
  # We must use a login shell: fnm installation may modify the `.profile`
  shell: bash -le {0}
```

So it should handle escaping and line wrapping without problems now. Because we run `bash` with `-e`, failed commands should abort the entire script, so `&&` shouldn't be needed everywhere.
2025-04-30 13:24:05 -07:00
JJ Kasper c3429682aa Fix timings data for deploy tests (#78681)
This fixes an issue where deploy tests were intermittently passing when
they shouldn't have been due to jobs not being sorted consistently
across retries.
2025-04-29 21:06:34 -07:00
Jack Wilson f3f8416dea Update Nissuer to alert for vulnerability reports (#78417)
### What?
We use [Nissuer](https://github.com/balazsorban44/nissuer) to assist in
triaging new GitHub Issues. This PR updates our Nissuer config to send
alerts to a webhook endpoint if Nissuer detects a possible security
report/responsible disclosure via a public GitHub Issue.

### Why?
So we can be alerted in a timely manner to possible public disclosures
of unresolved security issues in Next.js

### How?
Nissuer performs keyword detection and sends an alert to a webhook if
any keywords are detected in a newly-raised GitHub Issue.

Note: we must also set the appropriate `NISSUER_WEBHOOK_URL` and
`NISSUER_WEBHOOK_SECRET` environmental variables on the repository for
this to be effective.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-04-29 10:32:57 -07:00
Benjamin Woodruff 03636db059 fix(CI): Reduce Rspack test retries from 2 to 0 to reduce timeouts (#78390)
![Screenshot 2025-04-21 at 4.08.49 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/9ceee071-2a13-4981-b809-cad02ce212d6.png)

Seeing a lot more timeouts recently for whatever reason. Reducing the test retries should hopefully mitigate this.

## Attempts with 1 retry:

https://github.com/vercel/next.js/actions/runs/14583128222
https://github.com/vercel/next.js/actions/runs/14583135455

Still has some timeouts 😞 

## Attempts with no retries:

https://github.com/vercel/next.js/actions/runs/14586654389
https://github.com/vercel/next.js/actions/runs/14586656222
2025-04-23 11:56:23 -07:00
JJ Kasper 166251dac4 Fix externals doc validation (#78208)
This moves the `validate-externals-doc` job to the `lint` step so it's
not skipped for docs only changes.

x-ref:
https://github.com/vercel/next.js/actions/runs/14475138181/job/40601279813
2025-04-15 11:29:39 -07:00
Benjamin Woodruff 9029928a79 chore(CI): Mention Rspack explicitly, use arewerspackyet.com domain (#77995)
- Add the domain to the `upload-turboyet-data` action so that cache invalidation can happen faster (instead of waiting 15 minutes for the TTL).
- No longer worry about putting "rspack" in PR titles.

🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀 🦀

![1bmtkrjez9981.jpg](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/5e56a860-a117-46b2-b729-00a94ead3d05.jpg)
2025-04-10 21:18:28 -07:00
Tim Neutkens 801913c92e Enable process.env.TURBOPACK when process.env.IS_TURBOPACK_TEST is set (#77894)
Handles `IS_TURBOPACK_TEST` like if you passed `--turbopack` to `next
dev` or `next build`. Doesn't set it for `next start` in order to find
bugs where Next.js relies on `process.env.TURBOPACK` at runtime.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2025-04-07 14:09:40 +02:00
Tim Neutkens 6e51845ac4 Rename process.env.TURBOPACK to process.env.IS_TURBOPACK_TEST for tests (#77892)
Preparation for removing `process.env.TURBOPACK` being added to
Turbopack tests. That way we can properly test `next start` without
`process.env.TURBOPACK` being set.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2025-04-07 14:07:55 +02:00
Jiachi Liu 38f4d6dea5 [ci] remove needs build-native for lint job (#77787)
`build-native` and `build-native-windows` were skipped for docs only
changes in #77743, removing the native from the `needs:[]` dependencies
of lint job to ensure lint will still be proceed for docs PR
2025-04-03 18:04:31 +00:00
Jiachi Liu c3b572d6b3 [ci]: skip build-windows job for docs only change (#77743)
### What

Noticed the native binaries are still built when we only change docs

<img width="400"
src="https://camo.githubusercontent.com/d78eae9e2ff385ff60be50f5f66ea612f0bcaed0afddb2eaccf26ce0987d1374/68747470733a2f2f67726170686974652d757365722d75706c6f616465642d6173736574732d70726f642e73332e616d617a6f6e6177732e636f6d2f32566b7231686a7862636c33624b366c544666372f63366538663165622d613131392d343638332d623262382d3237323264373432643334342e706e67">

Add docs-only check to skip `build-native` and `build-native-windwos`
jobs, skip swc build for docs only updates.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-04-02 21:59:21 +00:00
Jiachi Liu 8631228615 [og] fix vercel og build issue on windows (#77650)
### What

Upgrade the `@vercel/og` patch to Next.js which will resolve the build
issue on windows.

Closes NEXT-4069
Related #77164 
Related: https://github.com/nodejs/nodejs.org/issues/7438
2025-03-31 20:44:23 +00:00
Tim Neutkens 64e4ba7031 Turbopack build: Fix basepath test (#77630)
## What?

Moved the basepath e2e tests into a dedicated directory structure and
simplified the test setup:

1. Relocated `basepath-trailing-slash.test.ts` and `basepath.test.ts`
into a dedicated `basepath` directory
2. Simplified the test file setup by using `files: __dirname` instead of
explicitly referencing individual directories
3. Updated the regex patterns in the prefetch test to be more flexible
with optional characters, matching the Turbopack pattern.
4. Updated the test manifest files to reflect the new file paths
5. Fixed a previously failing test: "basePath should prefetch pages
correctly in viewport with <Link>"
2025-03-31 15:49:49 +02:00
Donny/강동윤 49b000831a chore(ci): Configure codspeed (#76884)
### What?

Configure codspeed

### Why?

To track performance changes of small functions correctly.

### How?

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
2025-03-29 11:02:29 +09:00
Benjamin Woodruff d874f0161a fix(CI build_and_deploy): Use a larger fetch-depth for build-native job (#77307)
If not supplied, this defaults to a fetch-depth of 1, which likely
explains some of the tagless version strings I've seen...

Use a fetch-depth of 100 so that we're always likely to find a previous
tag.
2025-03-20 07:06:39 -07:00
Benjamin Woodruff 7c6f6049b6 fix(CI): Re-enable retries for bundler integration tests (#77265)
These retries were breaking CI (too slow, causing timeouts) when most of
these tests were failing, but now that most of the tests are passing,
re-enable retries because many tests have some amount of flakiness.

- Development tests:
https://github.com/vercel/next.js/actions/runs/13936223704
- Production build tests:
https://github.com/vercel/next.js/actions/runs/13936225174
2025-03-19 07:11:46 -07:00
Benjamin Woodruff d4cdaa1756 fix(CI): Correctly call test/update-bundler-manifest.js script (#77000)
https://vercel.slack.com/archives/C03EWR7LGEN/p1741730241830569

> seems the manifest updating action is broken

Tested by manually triggering jobs on this branch:

- Turbopack Job: https://github.com/vercel/next.js/actions/runs/13799253102
- Rspack Job: https://github.com/vercel/next.js/actions/runs/13799251536
2025-03-12 11:45:24 -07:00
JJ Kasper a84d7476a7 Fix missing turbo command for rust-check (#76851)
Ensures we use the new turbo command for global turbo without repo
dependencies being installed.

x-ref:
https://github.com/vercel/next.js/actions/runs/13688466017/job/38277118036?pr=76849
2025-03-06 01:17:52 +00:00
Benjamin Woodruff 43697317d7 feat(CI): Revalidate vercel data cache on areweturboyet after uploading data to KV store (#76693)
Without this, you'll have to wait up to 600 seconds after merging a manifest update and waiting for the upload CI job to run, which leads to some confusion. This should make it near-instant.

Calls the endpoint defined here: https://github.com/vercel/areweturboyet/pull/20

This needs the `TURBOYET_TOKEN` secret to be configured on the repository. (Thanks @timneutkens)

Tested by running it here: https://github.com/vercel/next.js/actions/runs/13635362971/job/38112680086

![Screenshot 2025-03-03 at 9.27.10 AM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/c69fd2b9-2729-4149-8082-5c4f27709585.png)
2025-03-03 10:15:08 -08:00
Benjamin Woodruff 93a43eed02 fix(CI): Upload to areweturboyet immediately after a manifest is updated, not only on a fixed cron schedule (#76688)
I don't have a good way to test this without merging it first.
2025-02-28 14:13:32 -08:00
Sebastian "Sebbie" Silbermann 6a30eb4e94 [ci] Fix test-turbopack-integration not having any shards (#76355)
Noticed that this job was the largest contributor to wall time by far
![CleanShot 2025-02-22 at 00 25
39](https://github.com/user-attachments/assets/52ec106c-ac14-4f9d-b4ad-a90f16d7d828)


I guess this broke in [#70541
(files)](https://github.com/vercel/next.js/pull/70541/files#diff-48c0ee97c53013d18d6bbae44648f7fab9af2e0bf5b0dc1ca761e18ec5c478f2R224-R226)
which is odd because it still sharded on the PR job. Seems like GH
Actions opts out of any sharding if you try to exclude a value that
doesn't exist.

Especially odd since it currently sometimes [does
shard](https://github.com/vercel/next.js/actions/runs/13479624778/job/37663291940?pr=76384)
and sometimes [doesn't
shard](https://github.com/vercel/next.js/actions/runs/13481493569/job/37667294030?pr=76392).
2025-02-28 10:57:16 -08:00
Benjamin Woodruff 8a91d46830 refactor(CI): Merge all four bundler test manifest scripts into one (#76652)
These scripts were 95% identical, so they can just be one script that
accepts a few arguments.

```
$ node test/update-bundler-manifest.js --help
Options:
  --help        Show help                                              [boolean]
  --version     Show version number                                    [boolean]
  --bundler     The JavaScript bundler the tests were run against
                                     [required] [choices: "turbopack", "rspack"]
  --test-suite  Test group to update        [required] [choices: "dev", "build"]
  --branch      the git branch to filter CI artifacts to
                                                    [string] [default: "canary"]
  --override    Don't merge with existing test results, allowing tests to
                transition to a failed state                           [boolean]
```

Tested by running:

```
node test/update-bundler-manifest.js --bundler rspack --test-suite dev --override
node test/update-bundler-manifest.js --bundler rspack --test-suite build --override
```
2025-02-28 15:38:09 +00:00
Benjamin Woodruff d1681f2200 Revert "Run nightly bundler integration tests also with React 18" (#76640)
Reverts vercel/next.js#76606

Causes the nightly jobs to fail with:

```
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
```

because we're running two `build_reusable` jobs with the same stepName.
While I could fix this, we'd still have problems with either duplicating
tests on areweturboyet, or we'd need some logic to merge test results
across the matrix.

I like the idea of running the full matrix, but this type of thing is
rare and maybe not worth solving for (aside from catching it when the PR
goes up, which we now have logic for, thanks to @unstubbable).
2025-02-27 23:15:00 +00:00
Will Binns-Smith c929afc88d Don’t use native built-ins for additional bundler (#76577)
This opts us out of using the native built-in plugins for Rspack for now.

The existing swc plugin we use for webpack does additional work beyond just swc transformation, including validating RSC components to make sure they don’t use React APIs unavailable in that context.

In total, the native plugins result in a less than 20% performance gain which, while significant, isn’t necessary as we focus on correctness for now.

If we decide the maintenance cost of maintaining multiple plugins in parity is worth the performance gain in the future, we can selectively re-enable some or all of these plugins.

Test Plan: `pnpm test-dev-rspack test/development/acceptance/server-component-compiler-errors-in-pages.test.ts` no longer fails by missing the invalid React api messages.
2025-02-27 12:57:51 -08:00
Hendrik Liebau f81ba18cbf Run nightly bundler integration tests also with React 18 (#76606)
While #76544 doesn't hurt, this is the more important fix to ensure that
tests that were previously marked as `failed` are only promoted to
`passed` if they also pass when the test is run with React 18.
2025-02-27 16:51:30 +01:00
JJ Kasper 6647a7706f Update more global turbo CLI usage (#76576)
Continues https://github.com/vercel/next.js/pull/76532 as it seems to be
alleviating the `npm` failures so replaces some more usage of global
`npm` installing the turbo CLI.

x-ref:
https://github.com/vercel/next.js/actions/runs/13554859494/job/37886841090#step:15:25
2025-02-27 01:01:38 +00:00
Benjamin Woodruff 5d8aedcfde fix(rustdoc): Fix rustdoc warnings, block on rustdoc failures in CI (#76448)
When we break rustdoc, it causes warnings on every PR, e.g:

![Screenshot 2025-02-24 at
1.38.28 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/a368e9a5-4ca6-4b3a-913e-df68aa038b7f.png)

...so we should either not check the rustdocs at all, or block on them.
This makes them blocking.
2025-02-26 16:03:16 -08:00
JJ Kasper 78ac4e2edc Skip globally installing turbo CLI (#76532)
This aims to avoid the below error with globally installing `turbo` with
`npm` by using `pnpm dlx` the same as we are for the DataDog CLI.

```sh
Run npm i -g turbo@2.3.3 && node ./scripts/pull-turbo-cache.js x86_64-unknown-linux-musl
npm error code ENOTEMPTY
npm error syscall rename
npm error path /root/.local/share/fnm/node-versions/v[18](https://github.com/vercel/next.js/actions/runs/13537303233/job/37831195809#step:15:19).20.4/installation/lib/node_modules/turbo
```

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1740004625721209)
2025-02-26 16:18:37 +00:00
Benjamin Woodruff 9ac41a44a9 refactor(CI): Extend areweturboyet integration test jobs for all bundlers (#76361)
Use the reusable configs defined in #76251 for rspack.

Development tests:
https://github.com/vercel/next.js/actions/runs/13514384329
Production tests:
https://github.com/vercel/next.js/actions/runs/13514385828

Patch the `build-rspack-dev-tests-manifest.js` script:

```
diff --git a/test/build-rspack-dev-tests-manifest.js b/test/build-rspack-dev-tests-manifest.js
index 22f8401ef7..8cc5ed4af6 100644
--- a/test/build-rspack-dev-tests-manifest.js
+++ b/test/build-rspack-dev-tests-manifest.js
@@ -91,7 +91,10 @@ async function fetchLatestTestArtifact() {
   const res = JSON.parse(stdout)

   for (const artifact of res.artifacts) {
-    if (artifact.expired || artifact.workflow_run.head_branch !== 'canary') {
+    if (
+      artifact.expired ||
+      artifact.workflow_run.head_branch !== 'bgw/round-robin-tests'
+    ) {
       continue
     }
```

```
node test/build-turbopack-dev-tests-manifest.js
```

Inspect the generated JSON:
https://gist.github.com/bgw/35b7f9d09cd95f64087a69ff5c7f8972
2025-02-25 09:27:04 -08:00
Benjamin Woodruff 13fcfabf1b refactor(CI): Convert daily turbopack (areweturboyet) integration tests into reusable workflows (#76251)
This builds on top of work that @timneutkens did in the
`wbinnssmith/try-ci-test` branch to rebuild the integration test CI on
top of `build_reusable.yml` and work around issues with the
`next-integration-stat`, but takes it a few steps further:

- As much of the integration test logic as possible is moved into a
single re-usable workflow so that we won't need to duplicate logic
between 6 workflows going forward (turbopack dev, turbopack build,
turbopack examples, rspack dev, rspack build, rspack examples). Right
now this just ports turbopack dev and build.

- Cleaned up a ton of legacy dead/broken code in
`next-integration-stat`. We might want to revive the comment-on-PR
functionality, so I didn't completely remove it, just the very obviously
broken parts (e.g. references to a >2-year-old stale branch of the
turborepo repository).

---

Manually triggered the workflows:

Dev tests: https://github.com/vercel/next.js/actions/runs/13466611352
Prod tests: https://github.com/vercel/next.js/actions/runs/13466609857

Tested by patching the `test/build-turbopack-*-tests-manifest.js`
scripts like so:

```diff
diff --git a/test/build-turbopack-dev-tests-manifest.js b/test/build-turbopack-dev-tests-manifest.js
index bc1928cf2d..e6546e0018 100644
--- a/test/build-turbopack-dev-tests-manifest.js
+++ b/test/build-turbopack-dev-tests-manifest.js
@@ -91,7 +91,11 @@ async function fetchLatestTestArtifact() {
   const res = JSON.parse(stdout)
 
   for (const artifact of res.artifacts) {
-    if (artifact.expired || artifact.workflow_run.head_branch !== 'canary') {
+    if (
+      artifact.expired ||
+      artifact.workflow_run.head_branch !==
+        'bgw/reusable-integration-test-workflow'
+    ) {
       continue
     }
```

And then diffing the generated json manifests:
https://gist.github.com/bgw/08778b5f63861811fbe88e3f466a8679

Note that some differences are expected: These jobs have been broken for
at least 2-3 weeks.
2025-02-24 12:31:01 -08:00
Will Binns-Smith ad4977a757 Update error-recovery test snapshots for alternative bundler (#76299)
Passes an additional 4 tests for Rspack. Rspack error messages included
trailing whitespace when written to the DOM, so these are stripped out.
2025-02-22 22:42:11 +00:00
JJ Kasper 22c8bd1ad2 Update datadog job to use pnpm dlx (#76337)
This aims to alleviate an npx cache issue occurring causing datadog
script to fail to execute with `'datadog-ci' is not recognized as an
internal or external command`

x-ref:
https://github.com/vercel/next.js/actions/runs/13455042696/job/37598937307#step:36:44
2025-02-21 11:24:17 -08:00
JJ Kasper fc14d78dbe Disable turbo daemon by default (#76248)
This attempts to resolve turbo global failing to install sometimes which
current hypothesis is that the turbo process is still running preventing
the directory from being wiped/written to.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1740004625721209)
x-ref:
https://github.com/vercel/next.js/actions/runs/13423189899/job/37500545320?pr=76239
2025-02-20 11:15:57 -08:00
Jiwon Choi a89d55c011 [dev-overlay] Remove old Dev Overlay (#76256)
This PR removed the old overlay including the deprecated `buildActivity`
and `appIsrStatus` options.

Closes NDX-785
Closes NDX-855
Closes NDX-865
Closes NDX-866
Closes NDX-867
Closes NDX-868
2025-02-20 19:43:14 +09:00
JJ Kasper b76775a6cc Ensure datadog upload is skipped for forks (#76238)
Follow-up to https://github.com/vercel/next.js/pull/73180 ensures we
don't run this for forks which was dropped in the PR.

x-ref:
https://github.com/vercel/next.js/actions/runs/13422276429/job/37497537420?pr=75784
2025-02-19 14:04:34 -08:00
Sebastian "Sebbie" Silbermann f984d1f681 Report tests to Datadog from Job that executed them (#73180) 2025-02-19 12:01:25 +01:00
Benjamin Woodruff 1769fc292f fix(turbopack CI): Pin corepack version for production tests manifest update action (#75986)
Looks like this was overlooked when updating our CI configs to work around the recent corepack issue.

https://github.com/vercel/next.js/actions/runs/13279886936/job/37075996177

![Screenshot 2025-02-12 at 3.04.02 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/731e4b13-35ef-4bc5-8041-7eae8581f0fd.png)
2025-02-13 14:08:53 -08:00
Zack Tanner 1c85b755b5 [DevOverlay]: enable by default (#75882)
- `newDevOverlay: true` by default (enables experimental React builds on
canary until owner stacks progress further)
- `run-tests` now sets the env var for tests that were relying on it for
forking behavior
- PPR runners now run with the flag disabled to help catch regressions
in the old overlay until we remove it
- Fixed a number of tests that had outdated snapshots or missed forking
behavior because they weren't running in CI
- Disabled a test that was failing in Turbopack + Experimental React
that is unrelated to the overlay (see:
https://github.com/vercel/next.js/pull/75989)

---------

Co-authored-by: devjiwonchoi <devjiwonchoi@gmail.com>
2025-02-13 10:57:32 -08:00
Benjamin Woodruff 5891da2d2b fix(CI): Initialize non-existent bundler manifests (#75987)
These jobs were failing because they first attempt to open the existing file to compare, and there was no pre-existing file:

https://github.com/vercel/next.js/actions/workflows/rspack-update-tests-manifest.yml

Fixed this by running:

```
echo '{}' > /home/bgw.linux/next.js/test/rspack-dev-tests-manifest.json
echo '{}' > /home/bgw.linux/next.js/test/rspack-build-tests-manifest.json
node test/build-rspack-dev-tests-manifest.js
node test/build-rspack-build-tests-manifest.js
```

![Screenshot 2025-02-12 at 3.25.10 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/c6ee98a0-917f-447b-ac53-10996e2c7e7a.png)
2025-02-12 21:19:15 -08:00
Sebastian "Sebbie" Silbermann f2dd61da6b Stop using deprecated TURBO_REMOTE_ONLY (#75832) 2025-02-12 06:59:36 +01:00
Sam Ko a18f3ed514 chore(github): skip nissuer when Documentation issue template is used (#75802)
## Why?

Issues with the `Documentation` **Type**, which is issues opened via the `Documentation` issue template, should not be prematurely closed with **Invalid Link** from [nissuer](https://github.com/balazsorban44/nissuer).
2025-02-07 16:37:31 -08:00