Commit Graph

1130 Commits

Author SHA1 Message Date
Sebastian "Sebbie" Silbermann 7a09a67d32 Fix auth preflight check when triggering Front sync (#81166) 2025-07-08 18:55:49 +02:00
Benjamin Woodruff ff5707b95e fix(CI): Update llvm when building native musl targets (#81392)
Tested locally with

```
podman run --platform=linux/amd64 -t -i ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2023-09-17-alpine bash
```

We must ensure llvm16 is removed before installing llvm20 and
llvm20-dev, as there's a file conflict between llvm16 and llvm20-dev.

Full build-and-deploy run:
[https://github.com/vercel/next.js/actions/runs/16128142342](https://github.com/vercel/next.js/actions/runs/16128189670)
2025-07-07 16:32:41 -07:00
Zack Tanner e938366489 chore: cleanup unused workflows (#81391)
Cleans up unused workflows & scripts

- bankrupt workflow is superseded by the [stale
workflow](https://github.com/vercel/next.js/blob/canary/.github/workflows/issue_stale.yml)
- filtering issues by version hasn't been used in 9 months and can be
accomplished with a GH search
- the AI triaging tool has largely been more noise than signal. the
existing alerts that have been surfaced in the triage channel have been
sufficient
2025-07-07 21:39:11 +00:00
Sebastian "Sebbie" Silbermann be0cc7ade5 [sync-react] Set correct PR author (#81369)
Follow-up to https://github.com/vercel/next.js/pull/81134

We checkout and commit with nextjs-bot but then opened the PR as vercel-release-bot. Now we use nextjs-bot for both.
2025-07-07 17:04:33 +02:00
JJ Kasper fb9334d0db Ensure default run name is correct for deploy tests (#81255)
Looks like when the retry workflow is triggered from the release
workflow it doesn't have the default input like it should so this adds
the fallback inline for the run-name.
2025-07-03 12:41:50 -07:00
JJ Kasper c66739e60f Fix if condition in retry workflow (#81211)
Fixes: https://github.com/vercel/next.js/actions/runs/16040442318
2025-07-02 20:07:42 -07:00
JJ Kasper 2db64b485e Skip alert as well for non-canary e2e deploy (#81210)
Follow-up to https://github.com/vercel/next.js/pull/81207
2025-07-02 19:57:07 -07:00
JJ Kasper ca8a066235 Only retry deploy tests for canary (#81207)
This avoids retrying/alerting if triggering the deploy tests with a
custom next tarball. The `run_name` is available as `display_title` [per
docs
here](https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_run:~:text=The%20event%2Dspecific%20title%20associated%20with%20the%20run%20or%20the%20run%2Dname%20if%20set%2C%20or%20the%20value%20of%20run%2Dname%20if%20it%20is%20set%20in%20the%20workflow)

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1751485507582049)
2025-07-02 19:46:25 -07:00
Niklas Mischkulnig cd3f86815f Disable Turbopack manifest (#81170)
- Don't create update PRs anymore for the manifests
- Don't read the manifest when running tests
2025-07-02 14:47:33 +02:00
Maia Teegarden 3cb2f2737a Remove unneccesary step that's making workflow fail (#81164)
This step was causing the front-sync job to fail. I'm not totally sure
how it was working before, some other workflow must have logged logged
in at some point. This is just a debug step anyway, so I think we can
delete it. **I confirmed that the next step worked just fine.** We could
also add a step that runs `gh login` if we think it would actually be
useful.
2025-07-01 20:48:16 -07:00
Maia Teegarden 573e31d0c1 Run front-sync after deployment tests finish (#81023)
The front-sync job has been running directly have new versions are
published, but deployment tests only run after a release as well. This
PR runs the front-sync job after the deployment tests. There is a new
input on the workflow the front-sync triggers to immediately close the
PR that gets opened in that repo that will get set to true if the tests
fail. It is still beneficial to open a PR so we can more easily bisect
problematic releases.

See thread for discussion:
https://vercel.slack.com/archives/C08V7CU57E1/p1751053430834889

<!-- 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 #

-->

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-07-01 11:36:48 -07:00
JJ Kasper fb319ce1bf Update nextjs-bot config (#81138)
Follow-up from https://github.com/vercel/next.js/pull/81134 updating the
email used in commit messages as well.
2025-07-01 10:43:14 -07:00
JJ Kasper 890c11996a Update workflows for nextjs-bot (#81134)
This updates to use the new bot account specific for Next.js which we've
already been using for stale issues for a bit.
2025-07-01 10:23:05 -07:00
Donny/강동윤 2a81cef7e7 test(codspeed): Make codspeed concurrent on canary branch (#80928)
### What?

Apply same changes as https://github.com/swc-project/swc/pull/10711 to next.js/turbopack. We now run benchmark on `canary` branch in parallel.

### Why?

`codspeed` says `New benchmark` quite frequently, but it's not. This PR should fix it
2025-06-26 15:14:05 +09:00
Sebastian "Sebbie" Silbermann b2d6b36145 Fix preview builds for forks (#80833) 2025-06-25 11:38:52 +02:00
Luke Sandberg 5c15979bcc [turbopack] Enable debug assertions in CI (#80739)
## Enable debug assertions in CI

### What?
Build using `--profile release-with-assertions` for all tests in CI.  A previous PR (https://github.com/vercel/next.js/pull/80511) enabled them for unit tests, this completes the effort for e2e tests run in CI.

There is one exception. The production tests currently have a failing assertion for duplicate modules, so a new env var (`TURBOPACK_TEMP_DISABLE_DUPLICATE_MODULES_CHECK`) is introduced to disable that exact check to allow this to be landed.

### Why?
Debug assertions help catch bugs early by validating assumptions in the code. By enabling them in tests, we can improve quality

### How?
- Added a new `rustBuildProfile` parameter to the reusable build workflow to control the build profile
- Created a new `build-native-release-with-assertions` script in next-swc to set the cargo profile
- Updated the turbopack production tests to set the opt out variable

Part-of PACK-4578
2025-06-24 09:10:43 -07:00
Luke Sandberg 7acb9b6b5a [turbopack] Update Napi CLI to the latest 2x release (#80697)
## What
Update the napi cli to the latest 2x build 2.18.4

## Why
This will make it easy to pass custom cargo profiles to napi, which will make it easier to enable debug assertions, which will happen in a followup.   

Part-of PACK-4578
2025-06-23 00:30:21 -07:00
Benjamin Woodruff 2502c0a40c chore(swc-wasm): Fix and clean up various issues with swc-wasm tests (#80471)
- Follow the naming conventions of other environment variables and prefix `TEST_WASM` with `NEXT_TEST_WASM` so that there's less chance of conflicts with user code
- Remove the logic in `setup-wasm.mjs` that modifies the repository (not great for running tests locally) and instead try to match the environment-variable-override behavior used for native (non-wasm) bindings via `NEXT_TEST_WASM_DIR`.
- Hard-fail if `NEXT_TEST_WASM` is set and we fail to load wasm bindings instead of silently using fallback logic that loads native bindings instead.
- We don't need to install `wasm-pack` with `curl | sh` for tests: `pnpm` already installs it (and pins a specific version).
- The whole dance of renaming the directory from `pkg` to `pkg-nextjs` is a hack we use when publishing the package, as we're building both "web" and "nextjs" targets. We don't need to do that for tests.
- Fix handling of `undefined` values in SWC options objects.
- Remove hacks for Next v12.2
2025-06-20 13:14:43 -07:00
Donny/강동윤 8e0c32228b test(turbopack): Make HMR benchmark less flaky (#80488)
### What?

Retry HMR benchmarks, but make it less flaky. 

This PR

- Removes flaky benchmarks (`hmr_initial_compilation`, `hmr_subscription`)
- Moves flaky parts (`benchmark_initial_compilation`) out of the iteration loop by moving them to the setup phase.

### Why?

We need a stable benchmark for dev performance.
2025-06-13 18:32:04 +00:00
Donny/강동윤 50d6dd0332 test(turbopack): Remove flaky benchmark (#80465)
### What?

Remove a flaky benchmark.

### Why?

https://github.com/vercel/next.js/pull/80414#issuecomment-2963529621

This PR is not supposed to change performance greatly.
2025-06-12 22:31:06 +00:00
Donny/강동윤 51092ee3c1 test(turbopack): Configure HMR benchmark (#80219)
### What?

Configure HMR benchmark. I'm not sure if this benchmark would be stable enough, but let's try.

I'll remove this from the automated benchmark later this week if it turns out to be flaky.

### Why?

x-ref: https://vercel.slack.com/archives/C06PPGZ0FD3/p1748943158878159


### How?

Closes PACK-4758
2025-06-12 14:46:32 -04:00
Sebastian "Sebbie" Silbermann 924b5ab40f [test] Only run build_and_deploy once for PRs from upstream (#80329) 2025-06-09 23:15:59 +00:00
Donny/강동윤 a8ed882c0b chore(turbopack/ci): Make codspeed stable (#80323)
### What?

Removes `benchmark-tiny` which _was_ stable at the time of introduction, but is not stable anymore.

### Why?

It makes interpreting the performance difference harder
2025-06-09 14:50:46 +00:00
Donny/강동윤 8bd41593d9 chore(turbopack): Use label for large benchmark (#80114)
### What?

Use the `benchmark` label along with the workflow dispatch.

### Why?

It's more convenient.


### How?

Closes PACK-4759
2025-06-04 14:18:18 +00:00
Donny/강동윤 f191efeeb0 chore(ci): Disable flaky turbopack benchmarks (#80058)
### What?

Disable flaky benchmarks for turbopack.

### Why?

Those benchmarks are very flaky even on local.

<img width="873" alt="image"
src="https://github.com/user-attachments/assets/f3146200-7f48-4264-847f-7bd84db9a514"
/>


### How?
2025-06-02 15:34:58 +00:00
Donny/강동윤 48ac8ceea2 chore(ci): Run turbopack benchmark from custom runners (#79979)
### What?

User the custom runner for turbopack benchmarks

### Why?

Turbopack is very parallel so it's better to use custom runners which has more CPU cores.
2025-05-30 14:34:58 -07:00
Donny/강동윤 cc3c42f864 chore(ci): Configure small benchmark for builds (#79796)
### What?

We can use codspeed for profiling the build performance, considering that these apps are very small.

### Why?

We need an  e2e benchmark.
2025-05-29 21:32:57 +00:00
Jiwon Choi f639f2a9a7 [release-new] fix: slack notification only if is a publish workflow (#79933)
The Slack notification workflow didn't have if condition, so it was
notified on every `build_and_deploy` job.

x-ref: [slack
thread](https://vercel.slack.com/archives/C0668R2391V/p1748475689878939)
2025-05-29 21:27:43 +02:00
Donny/강동윤 6f07684afc chore(ci): Add large benchmark (#79793)
### What?

Configure a large benchmark for turbopack.

### Why?

We may want to run a full benchmark for some PRs.
2025-05-28 12:02:12 -07:00
Donny/강동윤 6e80e56bfc chore(ci): Configure automated benchmark for turbopack (#79791)
### What?

This PR configures an automated benchmark for turbopack. We can run small benchmarks for all turbopack PRs, and I'll add more benchmarks with follow-up PRs.


### Why?

We need a way to track performance consistently.
2025-05-28 11:20:39 -07:00
Sebastian "Sebbie" Silbermann 257c3f8c51 Enable preview builds for forks (#79648) 2025-05-27 15:30:15 +00:00
Sebastian "Sebbie" Silbermann 522793548a Enforce consistency between packages in preview builds (#79610) 2025-05-27 09:37:01 +02:00
Jiwon Choi 8268575c24 [release-new] move "add label to pr" workflow from publish to trigger (#79619)
It _does work_ but it is more natural to put the "add a label to pr"
workflow after the "create pr" workflow.
2025-05-26 15:08:18 +02:00
Jiwon Choi e5f2e0f9c1 [release-new] fix: release pr commit contains (#number) at last (#79611)
When the "Version Packages" PR is merged, the created commit is the
format of "Version Packages (#number)". Therefore, the
check-is-release.js script won't match the current regex. Also, I
modified the workflows that use the `check-is-release.js` to consider
the new release as a release workflow as well.
2025-05-26 14:02:49 +02:00
Jiwon Choi 2219ba0da9 [release] fix: correctly set tag during publish (#79548)
### Why?

The `process.env.RELEASE_TYPE` handling was set incorrectly. It
should've been set to the "trigger" workflow, but instead, it was set to
the "publish" workflow. Therefore, the "publish" workflow needs to know
which dist tag to set for publish.

---------

Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>
2025-05-26 12:12:24 +02:00
Jiwon Choi 734754760f [release] fix: GITHUB_TOKEN is needed to open release pr (#79609)
To open a "Version Packages" PR, the Action requires a `GITHUB_TOKEN`
token.

Discovered while testing:

![CleanShot 2025-05-25 at 13 38
56@2x](https://github.com/user-attachments/assets/91d6b4b6-0f13-4cf1-85d7-fa309ca3aaa0)
2025-05-25 16:04:58 +02:00
Zack Tanner adc81abd89 report build-and-deploy failures only after retries (#79574)
In #75749 we made a single failure for `build-and-deploy` alert. However
as seen there can be transient failures
([ex1](https://github.com/vercel/next.js/actions/runs/15218556449/job/42809569102),
[ex2](https://github.com/vercel/next.js/actions/runs/15198747807/job/42748740308))

This updates the logic to treat both workflows the same, and alert after
3 retries.
2025-05-24 07:45:48 -07:00
JJ Kasper 50ffa681fb Add final build job to validate (#79570)
This adds a job we can require so we can see catch the failure before
merging a PR https://github.com/vercel/next.js/pull/79569
2025-05-23 13:30:37 -07:00
JJ Kasper b11a172b15 Fix build and deploy workflow (#79569)
Fix syntax error introduced in
https://github.com/vercel/next.js/pull/79409

This error is hidden on the workflows page unfortunately so isn't seen
on the PR itself

https://github.com/vercel/next.js/actions/runs/15216527935?pr=79563
2025-05-23 13:22:00 -07:00
Jiwon Choi 56c3ae8191 [release] notify release status via slack (#79409)
This PR adds a step to send Slack notifications of the status of the
release.

---------

Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
2025-05-23 17:04:35 +02:00
Jiwon Choi d8be11a62b [release] use changesets/action for release-candidate (#79039)
Best to be reviewed with "Hide whitespace".

This PR added release candidate handling and used a switch case to
ensure the correct release type was given.

---------

Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-05-23 15:34:02 +02:00
JJ Kasper 6440778d60 Update test E2E deploy workflow to accept version (#79420)
This allows us to run the E2E deploy tests against a custom tarball or
version without triggering a canary release.
2025-05-20 13:21:18 -07:00
Jiwon Choi fb09687774 [release] fix: use correct step id when publishing (#79408)
<!-- 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-05-20 18:15:16 +02:00
Jiwon Choi 85c6b3a03d [release] use changesets/action for canary release (#79038)
This PR uses `changesets/action` to handle the canary release. Since the
action creates a Version Packages PR by default, I added a GH Action
that checks if the PR is released from the correct release workflow. It
triple-verifies via the user login (`vercel-release-bot`), PR title
(`Version Packages (canary)`), and a label (`created-by: CI`) to ensure
the opened PR is not trying to spoof.

After the validation, the PR bypasses required checks, is merged into
the canary branch, and proceeds with the rest of the release process.

### Testing Plan

Try running `ci:version` and `ci:publish` locally, and handle the
release type via env `RELEASE_TYPE`.

Confirmed the CI force merge on
https://github.com/devjiwonchoi/lab-releases/pull/13

---------

Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
2025-05-19 19:48:41 +02:00
Jiwon Choi 5333dda84f [release] add new ci to use changesets/action for stable release (#79037)
This PR added `.github/workflows/trigger_release_new.yml`, which is a port of `.github/workflows/trigger_release.yml` and modified [publishRelease](https://github.com/vercel/next.js/blob/8223eb86925e575cd641b55626b4bbc4a4d788c6/.github/workflows/build_and_deploy.yml#L529) to use the `changesets/action` to publish to NPM and GitHub Release.

This workflow uses [changesets/action](https://github.com/changesets/action) to publish NPM and GitHub Release. The main difference is that the GitHub Release will be published per package.

### Testing Plan

Try running `ci:version` and `ci:publish` locally.
2025-05-19 18:43:16 +02:00
Donny/강동윤 6ba4290d42 build: Update swc_core to v24.0.0 (#79103)
### What?

Retry of https://github.com/vercel/next.js/pull/79092

The latest build: https://github.com/vercel/next.js/actions/runs/15001005940

---

Update swc_core to v24.0.0.

ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v23.1.0...swc_core%40v24.0.0

### Why?


To apply 

 - https://github.com/swc-project/swc/pull/10452 - Fix for `jest`
 - https://github.com/swc-project/plugins/pull/451 - Fix for debug assertions

### How?

 - Closes SWC-652
 - Closes PACK-4376
2025-05-13 10:23:59 -07:00
Benjamin Woodruff 3f9f403a04 chore(CI): Split basepath test suite into smaller and more parallel test suites (#78892)
Same basic idea as https://github.com/vercel/next.js/pull/78787

This test suite has a lot of timeouts with rspack, which causes it to take a long time to run (though not quite long enough that it breaks the job).

In general, large test suites are good to break up, because they benefit from parallelism.
2025-05-12 14:56:45 -07:00
Benjamin Woodruff 6113729d53 chore(CI): Add back test retries (again) to arewerspackyet tests (#79014)
Test retries are important because of our high test flakiness. Without
this, we may get false-positive failures detected in the manifests and
the arewerspackyet dataset.

We had to disable test retries for arewerspackyet tests because we were
suffering from timeouts in CI. Since then we've fixed this in a number
of ways:

- I broke 5 large test suites that were contributing most to long job
execution duration when timing out into smaller test suites that can run
in parallel.
- I reduced the per-test timeout from 4 minutes back down to 1 minute
(same as the webpack tests use) for both Rspack and Turbopack.
- The Rspack team fixed the underlying regressions that were causing
increased test failures in our CI. 🙏
- Going forward, I'm working on running Rspack CI in more places, so a
regression on tests is will be much less likely in the first place.

Rspack test runs are taking <20 minutes (with a 90 minute timeout), so
it seems safe to add back the default 2 retries!

This only impacts the nightly arewerspackyet CI runs, so the CI capacity
hit from retries shouldn't be too significant.
2025-05-12 18:07:03 +00:00
JJ Kasper d13912e548 Revert "build: Update swc_core to v24.0.0" (#79102)
This seems to be failing to build on darwin still x-ref:
https://github.com/vercel/next.js/actions/runs/14978295541/job/42077365728

Reverts vercel/next.js#79092
2025-05-12 10:59:48 -07:00
Donny/강동윤 4748daf08e build: Update swc_core to v24.0.0 (#79092)
### What?

Update swc_core to v24.0.0.

ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v23.1.0...swc_core%40v24.0.0

### Why?


To apply 

 - https://github.com/swc-project/swc/pull/10452 - Fix for `jest`
 - https://github.com/swc-project/plugins/pull/451 - Fix for debug assertions

### How?

 - Closes PACK-4376
2025-05-12 17:09:19 +00:00