Commit graph

778 commits

Author SHA1 Message Date
Leah
15215d4c96
ci: report daily turbo integration test results from this repo (#58965)
### What?

A follow up for #58267 and #58394.

We no longer need the git branch for history it's stored in datadog now
and we also decided that we no longer need slack reporting.


Closes PACK-2039

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-12-04 16:18:42 +01:00
Zack Tanner
511867ceec
fix variable name in release workflow (#59135)
Follow up to https://github.com/vercel/next.js/pull/59134
2023-11-30 15:19:46 -08:00
Zack Tanner
f241f44b38
skip release if no new commits (#59134)
Prevents publishing canaries if there are no changes

Closes NEXT-1748
2023-11-30 15:07:05 -08:00
Leah
956636c86f
ci: don't retry or notify on failures from forks (#59118)
### Why?

For some reason the retry action can be triggered if there's a PR from
the canary branch of a fork.
https://github.com/vercel/next.js/actions/runs/7040561852/attempts/3



Closes PACK-2062
2023-11-30 13:03:44 +00:00
Jimmy Lai
e17b368760
misc: delete kodiak (#59082)
We don't need the auto merging from kodiak since Github has one.

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

-->


Closes NEXT-1753
2023-11-29 19:38:33 +01:00
Leah
7ce4a02bdc
ci: don't try to upload to datadog for docs only changes (#59068) 2023-11-29 19:25:01 +01:00
JJ Kasper
5b94850d97
Update checkout step (#59079)
When jobs are cancelled we can end up with a bad `.git` tree so this
updates to have a fresh checkout step to avoid this

x-ref:
https://github.com/vercel/next.js/actions/runs/7036193103/job/19148358339?pr=59076
2023-11-29 10:07:22 -08:00
Jimmy Lai
9e33bf6ab9
misc: disable automerge (#59077)
Disabling the auto merging behaviour from kodiak. You can queue stuff up
by adding an automerge label though.

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

-->


Closes NEXT-1751
2023-11-29 18:19:00 +01:00
Balázs Orbán
d6d41dc66d
chore: bump nissuer (issue validator) (#59060)
### What?

Bumping the issue validator action [`nissuer`](https://github.com/balazsorban44/nissuer)

### Why?

It introduces two new features:

- Comments made by members of the Vercel organization are never hidden to avoid hiding useful information. Example: https://github.com/vercel/next.js/actions/runs/6780069984/job/18428144215
- A new option was added to do not allow `https://github.com/vercel/next.js.*` URLs as valid reproductions, as they are non-modified versions. We should require the reporter to go through the process of creating an isolated reproduction that we can clone and verify easily.

### How?

See https://github.com/balazsorban44/nissuer/releases/tag/1.8.0
2023-11-29 14:35:26 +00:00
Zack Tanner
809164d776
Enable PPR tests for test suites (#59030)
Cherry-picks #58708 without the dependency on https://github.com/vercel/next.js/pull/58779

Co-authored-by: Wyatt Johnson <633002+wyattjoh@users.noreply.github.com>
2023-11-29 03:22:45 +00:00
JJ Kasper
05f2c68b7a
Increase default timeout for swc build (#59035)
x-ref:
https://github.com/vercel/next.js/actions/runs/7022943529/attempts/3
2023-11-28 12:15:35 -08:00
Leah
2a8f7ae1b1
Update Turbopack test manifest from GitHub Actions artifact (#58394)
### What?
We can use the GitHub actions artifact (which is already produced right
now) instead of a separate git branch to get the latest test results.

This also means we don't have a dependency back to the turbo repo for
the daily tests.


Closes PACK-1951
2023-11-24 16:48:12 +01:00
Leah
f6babb4273
fix(CI): retry-test action can't use env in if (#58838) 2023-11-23 20:02:41 +01:00
Zack Tanner
0cb1c40400
ci: disable deployment protection for e2e test project (#58830)
Since we reset the test project on every e2e CI run, deployment protection is automatically enabled by default.

This adds an option to the reset project workflow to disable deployment protection. Our test runners need to be able to hit these pages from an unauthenticated browser in order for the tests to work. 

Verified tests are running properly in [this run](https://github.com/vercel/next.js/actions/runs/6971348806/job/18971225559) (fixing any failing tests themselves are out of scope for this PR; will evaluate once the run finishes)

Closes NEXT-1732
2023-11-23 09:41:34 -08:00
Zack Tanner
cbcd59889c
ci: unify reset project script (#58829)
We have identical `resetProject` code used in `bench/vercel` and our e2e workflow action -- this updates the `resetProject` script to side-effects free (hence removing the env var) and shared between bench & e2e

Closes NEXT-1731
2023-11-23 09:40:48 -08:00
Leah
d53ac4efee
chore(CI): add action to auto retry tests on canary and report failures after retries (#58774)
### What?

Due to flaky tests CI will sometimes fail on canary, we want to retry
before reporting them as broken on slack


Closes PACK-2022
2023-11-23 17:45:12 +01:00
Leah
8bdda745fb
chore(CI): improve datadog reporting (#58267) 2023-11-23 15:18:03 +01:00
Tobias Koppers
bcd0cb8948
fix branch name (#58132)
fix the branch name of the workflow
2023-11-14 11:23:02 +01:00
JJ Kasper
dc59d3cca9
Update CLI version for deploy examples job (#58318)
Fixes:
https://github.com/vercel/next.js/actions/runs/6830557044/job/18578715963
2023-11-13 11:36:51 -08:00
Maia Teegarden
a6a8c8422c
Update turbopack label creation (#58214) 2023-11-08 18:33:44 +00:00
Tim Neutkens
53b815547d
Refactor repo-setup.js (#58131)
Doesn't make any functional changes. Going through the current setup for isolated tests to figure out a better way to cache the repository setup, so that we don't have to wait ~30s+ when running tests locally.
2023-11-07 13:01:12 +00:00
Justin Ridgewell
030021234b
Adjust update-turbopack-test-manifest.yml to run once per day (#58104)
The workflow is creating and closing PRs ever hour, which is too much.
2023-11-06 14:51:35 -05:00
Justin Ridgewell
26d9343419
Fix update-turbopack-test-manifest.yml workflow (#58097)
https://github.com/vercel/next.js/actions/runs/6774028544/job/18410200888#step:4:35
2023-11-06 12:31:11 -05:00
Zack Tanner
54a0e05309
tweak stats action to pull in runtime sizes (#58005)
This wasn't working previously so updated the glob & script to properly track changes to our bundled next runtimes

Should now be appended to the bottom of the PR stats action, eg:
![CleanShot 2023-11-03 at 13 49 58@2x](https://github.com/vercel/next.js/assets/1939140/54319a42-5a32-4e39-90c2-6ec07442ec73)
2023-11-03 23:39:37 +00:00
OJ Kwon
6f8c580386
feat(turbopack): Experimental wasm build (#57906)
### What?

continuation of https://github.com/vercel/next.js/pull/57851, since it is from a remote branch that I don't have access to write.

Co-authored-by: Maia Teegarden <2865858+padmaia@users.noreply.github.com>
Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2023-11-02 21:00:54 +00:00
Steven
be618048fe
chore(test): run unit tests on node 18 and 20 (#57199)
Since we separated unit tests into its own job in PR https://github.com/vercel/next.js/pull/55621, we can now run unit tests against Node.js 18 and Node.js 20 (maintenance and lts) using a matrix.
2023-11-02 10:43:18 +00:00
Zack Tanner
811e5c4fd5
move release undraft step until after canary is fully published (#57324)
Currently we publish a release in GitHub before it's actually fully published to npm. This moves the undraft step until after the publish is finished
2023-10-31 18:37:06 +00:00
Zack Tanner
a6844e1eae
cleanup PR labeler config (#57827)
Removes some usernames that our PR labeler webhook shouldn't apply to
2023-10-31 18:17:45 +00:00
Maia Teegarden
c90c75fabe
Update teamname in codeowners (#57775)
@vercel/web-tooling -> @vercel/turbopack
2023-10-31 12:33:13 +00:00
Justin Ridgewell
79511317f6
Automatically update Turbopack test manifest (#57778)
### What?

This PR adds an hourly workflow that will update the test manifest used when testing with Turbopack.

### Why?

To ensure we don't regress any test suites.

### How?

I use the existing `scripts/update-fonts-data-workflow.js` workflow script which will execute a script, then create a PR with the current working tree. If any pending automated PRs exist, they will be closed when a new one is opened.
2023-10-31 02:06:48 +00:00
JJ Kasper
676d1ee4ce
Remove extra CI step and lock Node.js version (#57769)
Seems this command is causing intermittent issues and we don't actually need this information so removes it
2023-10-30 18:03:48 +00:00
Maia Teegarden
f412c8a991
Remove wasm target (#57437)
This PR removes the wasm target for the next-swc build for the next major version.  The main motivation is that Turbopack does not support targeting wasm yet, and it would be a significant amount of work to add. We plan to make Turbopack the default zero-config experience in a minor version, possibly before we are able to support a wasm target, so we need to make this breaking change now. We also plan to make more improvements to the webpack experience with shared Rust code, which we have so far been blocked from implementing because of the current wasm restrictions. We would like to support a wasm target again in the future, but cannot say at this time when that would be.


Closes WEB-1865
2023-10-26 02:29:07 +00:00
Tobias Koppers
462b8585b6
enable e2e tests with turbopack (#57432)
Closes WEB-1862

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-25 19:46:31 +02:00
JJ Kasper
02fad82933
Revert "Increase build-native CI job timeout (#57314)" (#57325)
This reverts commit 003ec7a15b.

Re-adding this as a safe guard as the stalling was a real issue
2023-10-24 06:19:28 +00:00
Zack Tanner
56d74f42f4
bundle analyzer artifacts (#57307)
This uploads bundle analyzer artifacts during CI
2023-10-24 05:48:41 +00:00
JJ Kasper
003ec7a15b
Increase build-native CI job timeout (#57314)
This is currently timing out so this increases the timeout for Windows
specifically
2023-10-23 20:52:39 -07:00
JJ Kasper
639bc3af10
Increase concurrency for turbopack test run (#57290)
Aims to reduce run time by leveraging more concurrency

x-ref: https://github.com/vercel/next.js/actions/runs/6618039974/job/17975622987
2023-10-23 21:27:17 +00:00
JJ Kasper
191faf392c
Import turbo daily integration test workflows (#57083)
As discussed this imports our daily turbo integration tests workflow
into the Next.js repo
2023-10-23 11:48:38 -07:00
Ryo Matsukawa
9a8b14632c
chore: Add condition to skip update-fonts workflow on forks (#57165)
<!-- 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 #

-->

### What?
Added a condition to skip the update-fonts workflow for forked
repositories.

### Why?
To optimize CI resources and prevent extra runs on forks.

### How?
By checking the repository name and comparing it with the main
repository before executing the workflow.
2023-10-21 00:50:36 -07:00
JJ Kasper
888c3a7439
Reduce e2e deploy concurrency (#57142)
Attempting to reduce our time outs for this job by reducing concurrency
2023-10-20 19:56:13 +00:00
JJ Kasper
a8bc1a1cf2
Update runner for e2e deploy tests (#57089)
This attempts to fix our tests timing out from an obscure lost
connection to runner message


![CleanShot 2023-10-19 at 16 29
50@2x](https://github.com/vercel/next.js/assets/22380829/594b21c4-4df9-418b-afbb-5e290020d25d)
2023-10-19 17:34:18 -07:00
Quentin
abe8b1e0a8
Improve performance of String.prototype.split uses (#56746)
This PR adds the optional `limit` parameter on String.prototype.split uses.

> If provided, splits the string at each occurrence of the specified separator, but stops when limit entries have been placed in the array. Any leftover text is not included in the array at all.

[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split#syntax)

While the performance gain may not be significant for small texts, it can be huge for large ones.

I made a benchmark on the following repository : https://github.com/Yovach/benchmark-nodejs

On my machine, I get the following results:
`node index.js`
> normal 1: 570.092ms
> normal 50: 2.284s
> normal 100: 3.543s

`node index-optimized.js`
> optmized 1: 644.301ms
> optmized 50: 929.39ms
> optmized 100: 1.020s

The "benchmarks" numbers are : 
- "lorem-1" file contains 1 paragraph of "lorem ipsum"
- "lorem-50" file contains 50 paragraphes of "lorem ipsum"
- "lorem-100" file contains 100 paragraphes of "lorem ipsum"
2023-10-19 00:25:15 +00:00
Balázs Orbán
523474c8be
chore: lower Node.js version requirement (#56943) 2023-10-17 23:15:31 +02:00
Balázs Orbán
1ff7f07875
feat: drop Node.js 16 (#56896)
### What?

BREAKING CHANGE: Bump the minimum required Node.js version.

### Why?

Node.js 16 has reached end-of-life in September.

Bumped to `18.18.2` since it contained some security-related patches: https://nodejs.org/en/blog/vulnerability/october-2023-security-releases

### How?

Bumped `engines` where needed, upgraded the workflows.

This will allow us to remove quite a few polyfills, I'll open separate PRs for those.
2023-10-16 21:41:38 +00:00
JJ Kasper
329cd71f66
Skip artifact download for test e2e deploy workflow (#56807)
x-ref: https://github.com/vercel/next.js/actions/runs/6502354559
2023-10-13 20:00:34 +00:00
JJ Kasper
5004c8c50c
Trigger canary release nightly (#56758)
Follow-up to https://github.com/vercel/next.js/pull/56755 this updates to trigger at least one canary nightly before we run our E2E deploy tests.
2023-10-12 17:12:24 +00:00
JJ Kasper
0a6c60cec6
Break out E2E deploy test workflow to its own (#56755)
As discussed with @feedthejim this breaks our E2E deploy tests workflow into it's own so it can be triggered on cron/manually easier. 

One thing we'll need to consider with the cron/manual workflow is if a canary isn't published yet and Next.js relies on swc changes it will fail since this doesn't pack/publish a fresh built swc binary currently.
2023-10-12 16:34:27 +00:00
Jimmy Lai
ebebb6a96a
CI: add manual workflow for running e2e on prod (#56738)
This PR adds a job to the `build-and-deploy` workflow so that we run e2e
tests on production/vercel if the job was dispatched manually.

This is useful if you need to double-check your PR since we don't run
them on production for every PRs.

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

-->
2023-10-12 10:55:52 +02:00
Jimmy Lai
35a99232c0
misc: tweak stats github action (#56694)
This PR adds a few tweaks to our Github actions PR:
- expand by default the main section
- add some heuristics to not show hash/id changes in the diff view
- add some heuristics to not show increase/decrease size when it's too small (100 bytes is noise most often)
- add rendering runtimes to the list of tracked files


after vs before

![CleanShot 2023-10-11 at 14 56 36@2x](https://github.com/vercel/next.js/assets/11064311/548781bc-e893-45d1-aca4-de73b2b30299)

![CleanShot 2023-10-11 at 14 57 11@2x](https://github.com/vercel/next.js/assets/11064311/8e1c77e3-bed5-46ec-a756-62496df6729e)
2023-10-12 08:27:44 +00:00
Will Binns-Smith
d73b8366af
Use node:fs instead of fs-extra in .github/actions (#56536)
Test Plan: Stats for this PR?


Closes WEB-1730
2023-10-11 00:52:55 +00:00