Commit graph

901 commits

Author SHA1 Message Date
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
Steven
35f507242c
fix: next dev with edge runtime on windows (#56502)
- Reverts https://github.com/vercel/next.js/pull/44616
- Regression introduced in https://github.com/vercel/next.js/pull/51651
- Fixes https://github.com/vercel/next.js/issues/55013
2023-10-10 14:03:03 +00:00
Jimmy Lai
56fe014532
chore: bump pnpm to 8.9 (#56649)
There's allegedly a bump in performance for mac for pnpm 8.9 so upgrading it in the repo.
2023-10-10 11:23:10 +00:00
Sukka
edb92a30b5
test: speed up isolated next instance test setup (#56525) 2023-10-07 00:15:59 +02:00
Wyatt Johnson
a44b4f85b5
Dev Service (#56442)
This replaces the `(global as any)._nextDevHandlers` invocation with references to a specific service instance while also removing the module scoped `devInstances`. This ensures that correct types are used.

This was done while changing the `match` parameter in `ensurePage` to `definition` which didn't cause a typescript error (it should have).
2023-10-05 17:45:00 +00:00
JJ Kasper
a970f28439
Add code freeze GitHub actions for releasing (#56325)
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-10-02 23:10:40 +02:00
Jimmy Lai
458dab83ca
misc: update code owners (#56290)
Adding myself to the build folder config

<!-- 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-02 17:02:28 +02:00
Leah
293de45acf
feat(turbopack): port bloom filter to nexturbo (#55678)
Closes WEB-1096
2023-09-28 01:00:49 +00:00
JJ Kasper
fb04b85bb6
Decrease default test timeouts (#56116)
When tests are timing out we shouldn't wait for 4 minutes before it officially fails so this brings down the default test timeouts
2023-09-27 23:55:20 +00:00
JJ Kasper
b596de89d3
Fix invalid build-and-test workflow (#56053)
x-ref: https://vercel.slack.com/archives/C04KC8A53T7/p1695763819725649
2023-09-26 14:45:49 -07:00
Tim Neutkens
a961ec0d5f
Skip production tests for Turbopack (#56045)
As Turbopack is only focusing on dev currently. 

<!-- 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-09-26 22:30:04 +02:00
Tim Neutkens
73a6374de2
Move test/integration/production to test/production (#55981)
Moves `test/integration/production` to
`test/production/pages-dir/production` to leverage test isolation,
useful for when Turbopack runs for the test.

<!-- 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-09-26 15:38:50 +02:00
Justin Ridgewell
b0aecccaa2
Allow filtering individual test cases inside test files (#55786)
### What?

Updates `run-test.js` to allow running individual test cases inside a test file.

### Why?

So that we can dramatically increase Turbopack's test coverage. Turbopack has implemented most (but not all) necessary features from the webpack bundles. But a single failing test case would prevent us from running any case inside a test file. With case filtering, we're able to run the cases we know will pass and prevent regressions on those.

### How?

Case filtering is only exposed via the `NEXT_EXTERNAL_TESTS_FILTERS` ENV, which points to a JSON file containing a map of test files with the test cases inside those files that are known to pass.

The known-passing test cases can be updated after Turbopack's daily integration test run by running `test/build-turbopack-tests-manifest.js`, which will update the `test/turbopack-tests-manifest.json` manifest.

Closes WEB-1640

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-09-22 21:37:48 +00:00
JJ Kasper
83bea332ed
Update fnm setup for CI (#55765)
We can use the cached version if available and only install if it's missing. 

x-ref: https://github.com/vercel/next.js/actions/runs/6267098663/job/17019478099?pr=55764
2023-09-21 21:50:40 +00:00
Balázs Orbán
073123234a
chore: bump nissuer (#55723)
### What?

This introduces a weighting measurement when determining comments as unhelpful.

### Why?

Too many "same issue" comments in general, but it's hard to do an exact match with only regex.

### How?

Exact code can be found here:
b3363e7948/index.js (L203-L213)

In short, by default if a comment is less than 30% different from unhelpful words, the whole comment will be considered unhelpful.

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1695287105298299)
2023-09-21 11:04:38 +00:00
OJ Kwon
b811240602
ci(tests): enable turbopack /e2e tests (#55681)
### What?

Closes WEB-1615

I thought I couldn't grab the correct count of test suite in the datadog
as I was seeing huge count mismatches. Actually, it was because we were
not running all of the tests.

PR amends

- run all the tests under manifests
- ensure all the test list in the manifest actually exists

lastly and sadly
- disable few tests too flaky
2023-09-21 08:14:29 +02:00
LongYinan
d665c3df4d
Upgrade to latest NAPI-RS infra (#55505)
Should also resolve the msvc runtime issue: https://nextjs.org/docs/messages/failed-loading-swc#possible-ways-to-fix-it
2023-09-20 23:37:28 +00:00
Zack Tanner
0fea44654f
Run unit tests in a single job run (#55625)
These are quick so we can do it in one run

Follow up to https://github.com/vercel/next.js/pull/55621
2023-09-20 01:09:26 +00:00
Zack Tanner
7422109b8e
Run unit tests in a separate job (#55621)
This runs unit tests separate from the `test-dev` task to make it a bit more obvious these are running, and allow for an easy way to add any unit-test specific behavior in the future

[slack x-ref](https://vercel.slack.com/archives/C04DUD7EB1B/p1695150908857269)
2023-09-20 00:34:38 +00:00
Balázs Orbán
deded850c3
chore: run repro validation only on bug reports (#55610)
### What?

Continues #55525

Adding filtering for repro validation checks

### Why?

#55589 should not have been closed

### How?

ecbf8b4213
2023-09-19 20:00:06 +00:00
Balázs Orbán
d5c35a1bbb
chore: replace issue triaing actions with nissuer (#55525)
### What?

Moving maintenance to a separate repository.

### Why?

I want to make these actions reusable in other projects as they seem to work well in the Next.js repository.

### How?

The code is moved to https://github.com/balazsorban44/nissuer

I tested it on my fork, and all the following functionality is preserved: https://github.com/balazsorban44/next.js/issues/56

- [x] Close/lock/comment without a valid reproduction link
- [x] Minimize "+1"
- [x] Add labels based on user selection
- [x] Add comment based on the maintainer's label (eg.: "please add a complete reproduction")
2023-09-19 11:11:00 +00:00
OJ Kwon
f393f55678
fix(next-core): enable image extensions (#55460)
### What?

Enables the image extensions supported by turbopack.

Also fixes test fixture to assert error overlay header.


Closes WEB-1587
2023-09-18 17:30:27 +00:00
Balázs Orbán
c6c3891688
chore: remove replay from issue template (#55397)
### What?

Removes Replay.io as a valid reproduction link from our bug template.

### Why?

Based on issues https://github.com/vercel/next.js/issues/55181 and https://github.com/vercel/next.js/issues/55278 it looks like people are struggling to report the correct thing. Also, without source maps, replays are still harder to use for debugging than an actual code base

Ref: [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1694608481515339?thread_ts=1694428848.689079&cid=C04DUD7EB1B)
2023-09-18 17:05:19 +00:00
Tobias Koppers
eeba02606d
fix inconsistency with pnpm lockfile (#55440)
### What?

update pnpm in trigger-release

### Why?

It generates a slightly different lockfile than developer's tooling
does, causing unnecessary changes to the precompiled files


Closes WEB-1579
2023-09-18 08:19:31 +02:00
Zack Tanner
74c5a3e151
Update codeowners (#55355)
Adds myself to additional codeowner scopes
2023-09-14 13:42:24 +00:00
Leah
d64bc4c619
fix react-server-dom-webpack cache invalidation (#55287)
### What?
Webpack wrapped the external import in a new module, making `require.cache` invalidation impossible.

This also adds a basic fallback manifest for turbopack.

Closes WEB-1522
2023-09-13 17:20:48 +00:00
Jiachi Liu
94ae5098bd
Test with latest node@18 (#54000)
Basically revert #52894, should be able to keep testing against latest node 18
2023-09-12 21:47:51 +00:00
Tobias Koppers
f569cb1316
enable all passing turbopack tests for CI (#55100)
Closes WEB-1514

Co-authored-by: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
2023-09-08 17:30:07 +00:00
Siddharth Gaikwad
56eeedff30
Update pull_request_template.md (#55098)
just added the ")" to the documentation
2023-09-08 00:19:49 +00:00
Tobias Koppers
15980a66d4
remove --turbo, use --experimental-turbo as --turbo (#55063)
### What?

Switch the default for `--turbo` to the new `--experimental-turbo`, remove the old code in next.js

### Why?

The new approach will be used in future


Closes WEB-1506
2023-09-06 17:46:54 +00:00
Ryota Murakami
7decb13000
chore(ci): bump pnpm v8.6.11 to v8.7.1 (#54873)
My "pnpm@v8.7.0" was not working and I noticed it by accident and sent a PR.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-09-06 00:39:44 +00:00
JJ Kasper
180749c096
Update ready check for PR stats (#55022)
Looks liket his has been broken since
https://github.com/vercel/next.js/pull/54713 due to the text it watches
for being changed.
2023-09-05 11:12:43 -07:00
Jiachi Liu
fd91ac4f45
Update codeowners (#54966)
add huozhi to `next-swc` package scope
2023-09-04 11:09:12 +00:00
Balázs Orbán
7a871a9424
chore: fix autolabeler (#54916)
### What?

Follow-up of #54824

### Why?

Correctly detect the section to look for while autolabeling. The text currently being searched is not present in the issue body, just the template. Example: #54911 where "App Router" is present but was not detected.
2023-09-02 21:05:10 +00:00
Balázs Orbán
9adc7910a2
chore: update bug report template (#54824)
### What?

Follow-up of #54724

- Removed/merged some sections
- Added placeholders to hint the user what the input should be
- Reorganized the sections in terms of importance
- Made all sections but one required (we should not ask irrelevant questions to simplify the reporting process)
- Added a small guide on how to pinpoint an exact version of Next.js introducing a bug

### Why?

Clarifying the fact that a missing/invalid reproduction will result in the issue being closed to avoid confusion

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1693321920087959)

### How?

Compare the rendered issue templates:
- Before: https://github.com/vercel/next.js/issues/new?assignees=&labels=template%3A+bug&projects=&template=1.bug_report.yml
- After: https://github.com/balazsorban44/next.js/issues/new?assignees=&labels=template%3A+bug&projects=&template=1.bug_report.yml
- Autoclosing still works: https://github.com/balazsorban44/next.js/issues/52
2023-09-01 17:37:17 +00:00
Balázs Orbán
c2b3ed953e
chore: label invalid issues (#54826)
### What?

Follow-up of #54724

### Why?

Marking auto-closed issues so we can easily filter them.

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1693321920087959)
2023-08-31 15:03:29 +00:00
Balázs Orbán
0f07cf5798
chore: verify missing/invalid/private reproduction links (#54724)
### What?

This PR adds a new action that verifies if the reproduction link is correct _after_ the issue has been created. If it is not, we close the issue and comment on it with the correct steps to take. Check out the [rendered comment here](https://github.com/balazsorban44/next.js/blob/chore/gh-invalid-link-checker/.github/actions/issue-validator/repro-link/invalid-link.md).

Additionally, this PR also does some refactoring to simplify our GitHub actions related to issues.

Tests:

Issue that was supposed to be closed:
 - https://github.com/balazsorban44/next.js/issues/48
   - Issue comment: https://github.com/balazsorban44/next.js/issues/48#issuecomment-1698836121 
   - Issue opened action: https://github.com/balazsorban44/next.js/actions/runs/6023209630
   - Issue labeled action: https://github.com/balazsorban44/next.js/actions/runs/6023209629

Issue that was not supposed to be closed (closed manually afterward):
 - https://github.com/balazsorban44/next.js/issues/49
   - Issue opened action: https://github.com/balazsorban44/next.js/actions/runs/6023214256
   - Issue labeled action: https://github.com/balazsorban44/next.js/actions/runs/6023214258


### Why?

Unfortunately, GitHub is currently missing the [functionality to require a valid reproduction link](https://github.com/orgs/community/discussions/10227) in issue templates. Even if that was supported, this PR adds functionality that could not be covered with a regex validation. Namely, we check if the reproduction is a private repo or not, and potentially could also check the structure to see if it's an actual Next.js project.

### How?

If the link is not in the expected section, not a GitHub, CodeSandbox, or Replay.io link, or does not return an OK response (eg.: private repo/sandbox), the issue is closed/commented.

Related:
- https://github.com/orgs/community/discussions/4629
- https://github.com/orgs/community/discussions/10227

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-08-30 17:40:57 +00:00
Wyatt Johnson
fc48fc8c4c
Update CODEOWNERS (#54738) 2023-08-29 19:34:33 +00:00
JJ Kasper
952c536a3b
Consider cargo config in granular cache key (#54700)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1693270746110069)
2023-08-28 22:29:28 -07:00
JJ Kasper
8997ab0812
Implement granular rust caching (#54582)
This fixes our caching for the docker builds as they were missing inputs
the other jobs had also enables caching the rust target cache which
improves build times when only changing our package and the lockfile
isn't invalidated.

Tested here https://github.com/vercel/next.js/actions/runs/5987764387
2023-08-26 18:54:14 -07:00
JJ Kasper
8afd85d47f
Add missing install env for release stats (#54581)
This should fix the stalled action as it seems we aren't skipping this postinstall step when we should be which explains why it was passing for PR stats but not release stats

x-ref: https://github.com/vercel/next.js/actions/runs/5980582756/job/16227150469
2023-08-25 22:44:15 +00:00
JJ Kasper
eee137615e
Update release stats install/build executing (#54576)
Aims to make debugging the release stats failure easier as currently we
don't see the logs are the command is executing

x-ref:
https://github.com/vercel/next.js/actions/runs/5976635577/job/16221230094
x-ref: https://github.com/vercel/next.js/pull/54536
2023-08-25 12:45:58 -07:00
JJ Kasper
36b45c6f50
Break-up install and build steps for PR stats (#54536)
Breaks up these commands to track down the timeout for release stats. 

x-ref: https://github.com/vercel/next.js/actions/runs/5969590815/job/16195862006
2023-08-25 02:00:36 +00:00
JJ Kasper
2590f4931b
Update runner labels for PR stats (#54524)
Speeds up our stats generation by swapping out the underlying runner,
previously this took 13+ minutes now it's around 5 minutes.
2023-08-24 13:47:09 -07:00
JJ Kasper
e471a46a28
Enable verbose logging for turbo in CI (#54525)
Gives us more insight into turbo runs when building swc
2023-08-24 12:49:17 -07:00
Steven
f6d2aa09de
fix: minimum node version 16.14.0 (#54331)
- Fixes https://github.com/vercel/next.js/issues/54269
- Related to https://github.com/vercel/next.js/pull/54285
2023-08-22 08:58:53 +00:00
JJ Kasper
ca2785743c
Update timeout for release stats (#54363)
x-ref:
https://github.com/vercel/next.js/actions/runs/5932197432/job/16085712916
2023-08-21 17:21:04 -07:00
Steven
2bb12fc6bb
chore(ci): bump cancel-workflow-action@0.11.0 (#54246)
https://github.com/styfle/cancel-workflow-action/releases/tag/0.11.0
2023-08-18 20:29:57 +00:00
Balázs Orbán
725ddc7371
chore: skip CI run on forks (#54219)
Running the action added in #53541 on forks will result in always failing, so we can skip it.

Fixes #54210
2023-08-18 17:40:44 +00:00
Balázs Orbán
a6415c6297
chore: update lock bot wording (#54099)
Follow-up of #54048. We changed the lock action from waiting 1 month to 2 weeks, but the wording was not reflecting it.
2023-08-16 09:05:04 +00:00
OJ Kwon
61e1858241
chore(ci): small notes for the build steps (#54073)
<!-- 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?

Leaving a small note to the build steps to avoid regressions like
https://github.com/vercel/next.js/issues/54017 later.


Closes WEB-1386

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-08-15 15:26:25 -07:00
Balázs Orbán
633b553842
chore: hide "same on new version" without link (#54048)
Chat with @timneutkens

- Lock closed issues after 14 days of inactivity
- Hide comments "still happening" without a link we can verify
2023-08-15 09:44:07 +00:00
Steven
c5fb04663a
chore(ci): update codeowners with *img* (#54037)
Update codeowners with `*img*` to add `styfle`

In particular, this will match `get-img-props.ts`
2023-08-15 01:34:34 +00:00
JJ Kasper
bdc3a8e181
Move turbo outside of build for docker swc builds (#54035)
removes usage of turbo and uses the default node version inside the
image.
2023-08-14 17:37:45 -07:00
OJ Kwon
380c17f75f
ci(next-swc): print glibc version when build (#54026)
<!-- 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?

PR dumps out next-swc's glibc linkage after build completes, for easier
bisect if regression occurs.
2023-08-14 16:03:41 -07:00
JJ Kasper
3d245facea
Leverage previous swc build images (#54027)
This rolls back our build image for our swc builds as it seems to cause a GLIBC version conflict. 

x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1692049361819349?thread_ts=1692039503.188119&cid=C04KC8A53T7)
2023-08-14 21:57:44 +00:00
JJ Kasper
a7c5d8a44a
Remove extra label from runner (#54002)
All have docker available now so don't need this label to distinguish anymore.
2023-08-14 17:00:52 +00:00
JJ Kasper
6b6f0a2dd1
Update turbo env handling (#53970)
This ensures env variables are passed through as expected when building
the next-swc binaries, also removes an extra GH actions that isn't
really needed as it's just a wrapper around `docker run`.

Validated changes against run here
https://github.com/vercel/next.js/actions/runs/5851719808/job/15862899331
2023-08-13 21:39:15 -07:00
JJ Kasper
9a6ae144a9
Update swc runners config (#53939)
This fixes unexpected cache hits occurring causing latest next-swc
changes to not be built for the docker based builds. Noticed in our
turbo run summaries for these builds that no input files were detected
most likely due to older Node.js/pnpm versions being used from the old
Docker image.

This also updates to leverage new runner labels for better build perf
cutting build times down from over an hour down to around 20 min.

Fixes build issue on aarch64-linux-musl due to `TurboMalloc` not being
able to resolve. Test build done here
https://github.com/vercel/next.js/actions/runs/5850893681/job/15860929304

x-ref:
https://github.com/vercel/next.js/actions/runs/5843580924/job/15845848384

x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506858
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506925
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507067
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507135
2023-08-13 19:02:48 -07:00
Dima Voytenko
4c14482553
[chore] Upgrade playwright to 1.35.1 (#53875) 2023-08-11 23:25:01 +00:00
Leah
ddc8f50d24
enable @vercel/og support for turbopack (#53917)
### What?

Now that we have wasm support (and support for `?module`) `@vercel/og` should be supported

### Turbopack updates

* https://github.com/vercel/turbo/pull/5677 
* https://github.com/vercel/turbo/pull/5660 

Closes WEB-138
2023-08-11 22:16:41 +00:00
JJ Kasper
2312852e57
Update runner labels (#53925)
Adds a new label for distinguishing between runners, also fixes a couple flakey fixtures noticed while benchmarking.
2023-08-11 21:05:11 +00:00
Balázs Orbán
6809edccd5
chore(actions): exclude drafts from PR notificiation (#53669)
### What?

Do not count draft PRs

### Why?

These are still being worked on
2023-08-09 14:38:49 +00:00
OJ Kwon
e127c51327
test(turbo): allow to run test with --experimental-turbo (#53396)
### What?

Allows to configure test runs with --experimental turbo.
2023-08-09 05:48:54 +00:00
JJ Kasper
1283270a5b
Update env variable for fonts data workflow (#53701)
Removes temporary token in favor of permanent one also updates diffing logic.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-08-07 22:07:50 +00:00
JJ Kasper
86b0081a77
Update fonts workflow env 2023-08-06 17:31:36 -07:00
JJ Kasper
78372424f0
Add node setup for fonts workflow 2023-08-06 17:14:35 -07:00
JJ Kasper
6483903372
Add update fonts workflow (#53645)
This adds a workflow to auto update our fonts data so we can stay up to date easier. 

Closes: https://github.com/vercel/next.js/pull/53246
Closes: https://github.com/vercel/next.js/pull/53510
2023-08-07 00:11:03 +00:00
Leah
542c4fc26a
chore: update to pnpm@8.6.11 (#50923)
https://github.com/pnpm/pnpm/releases/tag/v8.0.0
2023-08-04 19:40:20 +00:00
Balázs Orbán
ca96578f0b
chore: update bug repro links (#53550)
### What?

Follow-up of #53453

### Why?

Forgot to update the link in a few places

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-08-03 16:18:26 -07:00
Balázs Orbán
3a86b30d68
chore: add GH action to notify about pending PRs (#53541)
Send us daily notifications when approved and open PRs haven't been merged yet. See [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1690610821861229) for more context.

It queries: https://github.com/search?q=repo%3Avercel%2Fnext.js%20is%3Apr%20is%3Aopen%20review%3Aapproved%20&type=pullrequests for the number of PRs, then posts a message with a link to https://github.com/vercel/next.js/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved
2023-08-03 21:40:28 +00:00
Tobias Koppers
61baae126f
fix Next.rs API (#53456)
### What?

* fixes problems in Next.rs API introduced by #52846 
* adds test infrastructure for experimental turbo testing
* adds two test cases to verify the infrastructure
* add grouping of output logs in run-tests
* simplify template loading

### Why?

### How?
2023-08-02 14:31:52 +02:00
Zack Tanner
3b1ccbf996
additional test runner refactoring (#53406)
This relocates the regex patterns that were being used for `test-dev`, `test-prod`, and `test-integration` actions to be part of `run-tests`. Also fixes e2e tests since they were expected to be found in `e2e` rather than `test/e2e`, and updated it exit with a failure code in case of no tests being found 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-08-01 00:04:45 +00:00
Zack Tanner
604681912b
ensure colocated unit tests run in CI & fix various failing tests (#53270)
Colocated unit tests (such as ones in `packages/next` and `packages/font`) weren't running in CI since `run-tests` marks the glob cwd as `<root>/tests`. This modifies the working directory to be the root so the new expanded test pattern will pick up files outside of `test/`.

Several of these tests were failing so there are updates in here to fix them. Specifically:

- Source Sans Pro font was renamed to Source Sans 3
- `fillCacheWithDataProperty` test was hitting the `bailOptimistic` code path
- `resolve-metadata` had an invalid assertion (`rel: icon` gets added as part of `IconsMetadata`)
- `resolve-opengraph` wasn't handling undefined images
- `server-patch-reducer` now use inline snapshots as one was failing since it now has a prefetchCache
2023-07-28 13:54:15 +00:00
JJ Kasper
70039c984b
Remove arbitrary timeout in pr/release stats (#53194)
Removes our arbitrary 3 minute timeout on commands in next-stats-action
which may be contributing to the recent failures for release stats to
run

x-ref:
https://github.com/vercel/next.js/actions/runs/5664570067/job/15348170497
x-ref:
https://github.com/vercel/next.js/actions/runs/5650726841/job/15307909184
x-ref:
https://github.com/vercel/next.js/actions/runs/5658309370/job/15329650002
2023-07-27 11:58:41 -07:00
JJ Kasper
e4573a0513
Add CI label (#53229)
x-ref: [slack
thread](https://vercel.slack.com/archives/C053824BELQ/p1690401578968429?thread_ts=1689880792.600909&cid=C053824BELQ)
2023-07-26 14:50:04 -07:00
Steven
48375e492b
chore(ci): fix validate-docs-links for non-PR (#53129)
This PR fixes an issue when `validate-docs-links` is run on a branch
like `canary` instead of a branch from a PR.

Example error message:


https://github.com/vercel/next.js/actions/runs/5649063425/job/15302604957
2023-07-24 14:34:45 -07:00
Steven
8729550522
chore(ci): make validate-docs-links required (#53123)
This moves the [validate-docs-links.yml](https://github.com/vercel/next.js/blob/canary/.github/workflows/validate-docs-links.yml) file into the [build_and_test.yml](https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml) file so we can mark it as required by using the `needs` property.
2023-07-24 19:35:21 +00:00
Steven
bc9d69dea4
chore(ci): always run validate-docs-links action (#53022)
We should unconditionally run this action so we can mark it as "required".

It only takes about 13 seconds for each PR so it shouldn't put too much additional load on our CI infra.

<img width="811" alt="image" src="https://github.com/vercel/next.js/assets/229881/5c8596e1-71be-4f09-ac29-e0c4a9f12253">

- Depends on the fix from https://github.com/vercel/next.js/pull/53021
2023-07-22 05:41:53 +00:00
Zack Tanner
e4b6c4e0b0
update CODEOWNERS config (#53017) 2023-07-21 18:13:47 +00:00
Steven
032e8d0eb0
chore(ci): add pnpm workspace for github actions (#52976)
This creates a monorepo for each github action and ensures they all use pnpm.

You can install and build all with the following:

```
cd .github
pnpm i
pnpm -r build
```
2023-07-21 14:29:31 +00:00
JJ Kasper
728fd7572a
Update to latest version of turborepo (#52979)
x-ref: [slack
thread](https://vercel.slack.com/archives/C03LMQZL205/p1689895062566699?thread_ts=1688753294.342269&cid=C03LMQZL205)
2023-07-21 10:04:06 +02:00
Balázs Orbán
df0330f72e
chore: add GitHub Action to manage "+1" comments (#52866)
### What?

Adds a GitHub Action that automatically marks unhelpful comments as "off-topic".

You can test it by adding off-topic comments to this issue: https://github.com/balazsorban44/next.js/issues/21

17e3ec3068/.github/actions/minus-one/src/index.mjs (L6)

### Why?

A common problem is when an issue thread receives "+1" comments, it usually encourages others to do the same. This makes the thread harder and harder for maintainers to read, without adding value to the discussion.

### How?

When an issue receives a comment, we compare it to a list that we determine as off-topic. If it matches, we hide the comment.

See: https://docs.github.com/en/graphql/reference/mutations#minimizecomment
2023-07-20 09:34:29 +00:00
JJ Kasper
ec7f6f7f0c
Update runs-on tags 2023-07-19 13:20:44 -07:00
Jiachi Liu
31453fa20e
Lock node version to 18.16 (#52894)
As we're using nodejs with latest version of 18.x on CI, there's a new behavior change of `url.fileURLToPath` that didn't join the paths as expected

locally with node 16.x or 18.16
```
/private/var/folders/mh/y8kwzkls6v3_w3_k6q384cw80000gn/T/next-install-b033b516612809c6fb0a0de77c6e50f7d7f8af34dfd3d01812b99345352dc992/node_modules/.pnpm/file+..+next-repo-7e52b07043e986127273a2d951e5c412b0dd45fb24eb34001bd372e2afff79db+packages+n_vyqu6i4c4i3efp5pqsaeaoe5s4/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf
```

in the actions runner with node 18.17 it's
```
/tmp/next-install-8efaa47c1546bed07990d8f130decceb6536e1a36146e7885cb68e3c3dea21f7/node_modules/.pnpm/file+..+next-repo-9679355e05341947e7aa0b42c994e3ac_krcuriy4thl7zawouf7sswlrgy/node_modules/next/dist/compiled/@vercel/og/index.node.js/../noto-sans-v27-latin-regular.ttf
```

You can see that `index.node.js` is still present in the path as a folder which is unexpected
```
index.node.js/../
```

x-ref: https://github.com/vercel/next.js/actions/runs/5600417148/jobs/10242827739?pr=52790
2023-07-19 16:15:58 +00:00
JJ Kasper
fc86c4123b
Update labeler config (#52844) 2023-07-18 18:12:26 +00:00
Tobias Koppers
9c055dbf33
update job concurrency (#52788)
### What?

Scale up concurrency on integration tests to be ~10min each

### Why?

This should bring down the total runtime of the CI

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-07-17 18:19:35 +02:00
Balázs Orbán
81dd7f8077
chore: add "please simplify reproduction" comment (#52631)
### What?

Adding a new label comment for "please simplify reproduction".

### Why?

During triaging, a lot of time is gone into trying to isolate the actual bug being reported. Reproductions sometimes contain unrelated code - that sometimes can be the actual cause of an issue, reported as a bug in Next.js, or require third-party services, secrets, setting up databases, and other tasks that take up much of the resources before the issue can even be verified.

### How?

Similar to the `please add a complete reproduction` and `please verify canary` labels, if a maintainer adds the `please simplify reproduction` label, an automatic comment will appear on the issue, asking for a minimal reproduction

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1685527818400339)
2023-07-14 23:30:42 +00:00
OJ Kwon
e1baffcec2
feat(turbopack): support native webp (#52285)
### What?

Closes WEB-1157. PR enables turbopack to support native webp encode / decode. There is one platform we can't support this (aarch64-linux-gnu) which disables those.
2023-07-12 19:42:41 +00:00
Jiachi Liu
bcd9136b98
ci: skip build-native for docs only change (#52571) 2023-07-12 00:08:22 +00:00
Josh Story
6839ef379b
use npm pack instead of yarn pack (#52563)
`yarn pack` does not pack the same way that `npm pack` does. There is at least one bug with how files are treated where node_modules are ignored even inside folders defined by the files config. While this is not currently used in next.js an upcoming change will rely on it. The reason this change makes sense otherwise is we use npm to publish next and during a publish the pack from npm is used. For consistency we should use the same pack for our actions and other code that does repo setup such as `create-next-install` which is used for tests

The implementation is slightly more complicated than just replacing the pack command however. `npm pack` respects gitignore files whereas `yarn pack` does not (or at least not nested ones). For some packages the `"files"` property in package.json is set which overrides any gitignore rules however the `@next/swc` package uses a gitignore to prevent the committing of native binaries but does not use files and thus npm pack does not includes native binaries when yarn pack does. To address this the PR adds a temporary rename of the `next-swc/native/.gitignore` file which allows npm pack to mimic the yarn pack behavior. The reason I did not just add `"files"` is that this package actually publishes to many different package names on npm for each architecture and I was unsure about making changes to the package.json that would potentially affect this codepath.

In addition to those changes there are 2 `.gitignore` files that appear to be outdated and unnecessary. I removed them.
2023-07-11 23:36:07 +00:00
Balázs Orbán
4ddb6fc794
chore: add label to locked threads (#52497)
[Slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1688975623048229)

Docs: https://github.com/dessant/lock-threads#inputs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-10 14:59:23 +02:00
Steven
27a252b953
chore(ci): update logging for release (#52357)
```
Error: Command failed: git clone https://github.com/vercel/next.js --single-branch --branch v13.4.NaN --depth=20 /tmp/next-statsmIAdTr/main-repo
Cloning into '/tmp/next-statsmIAdTr/main-repo'...
warning: Could not find remote branch v13.4.NaN to clone.
fatal: Remote branch v13.4.NaN not found in upstream origin
```


https://github.com/vercel/next.js/actions/runs/5480032198/jobs/9982817862#step:7:1658

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 13:46:00 +02:00
Jiachi Liu
0048908078
Remove legacy head.js in examples (#52292)
* Remove legacy `head.js` from examples and use `metadata` exports
instead
* Update the report template

---------
2023-07-05 16:42:36 -07:00
Steven
e27832665a
chore: update issue template option to "App Router" (#52287)
https://nextjs.org/docs/app
2023-07-05 22:56:43 +00:00
JJ Kasper
9151362c07
Make tests result check more accurate (#52273)
This ensures we check all statuses properly as previously only one
success was required.

x-ref: https://github.com/vercel/next.js/pull/52272
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1688573457803739)
2023-07-05 10:41:22 -07:00
Delba de Oliveira
44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00
Tobias Koppers
6cb6092e17
fix workflow needs (#52180)
### What?

I forgot to update the `needs` in the workflow
2023-07-04 15:01:33 +02:00
Tobias Koppers
b8ae8d210a
update tests list to include all passing tests (#52026)
### What?

Add all passing tests

### Why?

We enforced that they all run turbopack and these are passing.
If any of these tests would become red, that indicated a problem.
2023-07-04 07:40:50 +00:00
JJ Kasper
b4b98e84d9
Update result job condition (#52155)
Ensures when the cancelled status occurs we don't mark it as passed.
2023-07-03 16:33:22 -07:00
JJ Kasper
e477e01dbe
Update test result step (#52154)
Removes usage of custom runner on final step as it's not necessary
2023-07-03 23:07:28 +00:00
Delba de Oliveira
cc04b62f61
[Docs] link validator: log broken links for PRs from forks (#51963) 2023-07-01 19:41:46 +00:00
Delba de Oliveira
18406adf9c
Make sure DevEx can approve docs PRs / Remove Spaces (#51996) 2023-06-29 17:10:53 +00:00
Jiachi Liu
e7b9b9a816
Update codeowners (#51935)
revert to the previous version of codeowners before vercel spaces is
applied
2023-06-28 12:17:41 -07:00
JJ Kasper
1033a03d86
Update needs for build and deploy (#51731)
These don't need to wait for the build step so we can remove the "needs"
step from them to allow them to start earlier.
2023-06-23 17:14:22 -07:00
Delba de Oliveira
bb38fe5f08
[Docs] Update link validator: use checks, fail on PR from forked repo (#51706) 2023-06-23 14:39:29 +00:00
Delba de Oliveira
82abde8dd9
Revert "[Docs] Fix validator action breaking when PRs originate from … (#51674)
Nvm, it doesn't work.
2023-06-22 19:50:14 +00:00
Delba de Oliveira
487f5d6b6f
[Docs] Fix validator action breaking when PRs originate from forks (#51668) 2023-06-22 19:22:29 +00:00
Delba de Oliveira
0d7412ccc9
Move the Next.js team back to github codeowners (#51657)
Bring back the previous setting so specific team members get tagged on all PRs.
2023-06-22 17:24:09 +00:00
Alex Kirszenberg
c6313606c9
Next Build Turbo POC (2) (#51546)
Another attempt at getting https://github.com/vercel/next.js/pull/49942 in.

This time, the mold install step is gated to Linux.
2023-06-22 08:03:44 +00:00
Delba de Oliveira
a43b9ed601
[Docs] Update broken link validator (#51586)
- Add some basic error handling to the link validator action.
- Avoid unnecessarily creating a new bot comment when the validation is successful.
- Only scan .mdx files modified in the current PR for broken links.
2023-06-21 15:31:20 +00:00
Tobias Koppers
36a7aff6d6
use env var to switch next.js to turbopack mode (#51353)
### What?

this forces all tests to use turbopack independent of the way they invoke next dev

### Why?

some tests were not running turbopack

fixes WEB-1187
2023-06-21 13:52:14 +00:00
Delba de Oliveira
20047fcdbd
Migrate validate links script from next-site and setup GitHub action (#51365)
This PR migrates and adapts the [validate docs links script from `next-site`](https://github.com/vercel/front/pull/23185). This script is triggered by a GitHub action whenever a file in the `/docs` folder is updated. If broken links are found in the docs, the check fails and we post a comment on the PR with a list of broken links.

Co-authored-by: Michael Novotny <446260+manovotny@users.noreply.github.com>
2023-06-20 13:19:06 +00:00
JJ Kasper
056ab7918f
Revert "Fix pnpm ERR_INVALID_THIS on Node 20" (#51539)
Reverts vercel/next.js#51406

This pnpm bump seems to be causing lockfile issues with the react
versions which causes context issues since we need to share the same
react version in the monorepo.
2023-06-19 23:38:15 -07:00
JJ Kasper
41ce805de5
Revert "Next Build Turbo POC (#49942)" (#51538)
This reverts commit 7d0bdab83e.

This is failing all builds blocking releases so this reverts it for now
to allow further investigation async.
2023-06-19 21:54:04 -07:00
Tobias Koppers
4cc5715848
Fix native build (#51522)
CI runs with root, there is no sudo
2023-06-19 21:32:08 +02:00
Alex Kirszenberg
7d0bdab83e
Next Build Turbo POC (#49942)
This contains the original POC for `next build --turbo`. The implementation is _just enough_ to get pages building, and doesn't support the app router yet.

I'll write more details here on the implementation and what the next steps are next week.

Necessary changes on the Turbo side: https://github.com/vercel/turbo/pull/4998
2023-06-19 14:36:05 +00:00
Nick McCurdy
1602c2af25
Fix pnpm ERR_INVALID_THIS on Node 20 (#51406)
### What?

Fixes pnpm/pnpm#6424

### Why?

So users of Node 20 can contribute to Next.js

### How?

Upgrades pnpm with back compatibility to patch `ERR_INVALID_THIS` error.
If Node 14 support isn't necessary, I'd recommend upgrading to pnpm 8
for continued feature support and committing the lockfile.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-16 05:37:11 -07:00
OJ Kwon
d6952989a8
ci(workflow): upload test trace for deploy e2e (#51389)
### What?

WEB-1193.

context: https://vercel.slack.com/archives/C04DUD7EB1B/p1686873054726149

we want to observe flakyness over deploy e2e tests.
2023-06-16 12:14:43 +00:00
JJ Kasper
bdcca0ccff
Fix CSS deploy id case (#51325)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04MEB9L9RQ/p1686787663510239?thread_ts=1686770561.895939&cid=C04MEB9L9RQ)
2023-06-14 20:28:18 -07:00
JJ Kasper
b4350466c7
Update e2e deploy tests to continue (#51321)
Instead of temporarily disabling flakey or unpatched tests in deploy
mode this continues to run all tests and see all failures at once.

x-ref:
https://github.com/vercel/next.js/actions/runs/5272454654/jobs/9536161644
2023-06-14 17:00:28 -07:00
JJ Kasper
323e335b54
Ensure swc is copied for release stats (#51315)
x-ref:
https://github.com/vercel/next.js/actions/runs/5266469399/jobs/9520655185
2023-06-14 14:48:20 -07:00
JJ Kasper
3ec70a26d3
Skip cargo bench job on release (#51311)
This fails when run during a release since the new version isn't
published yet

x-ref:
https://github.com/vercel/next.js/actions/runs/5266469610/jobs/9520466217
2023-06-14 14:44:23 -07:00
JJ Kasper
99bdad4274
fix trigger release step 2023-06-13 23:45:54 -07:00
JJ Kasper
6dcc4fbc23
Increase remote cache timeout for swc builds (#51270)
These occasionally timeout and start building even when they don't need
to so this increases them a bit from the default.
2023-06-13 21:31:40 -07:00
Delba de Oliveira
3d41ccb916
Update codeowners (#51250)
Tweak code owners after some testing and feedback. 

- Move the Next.js team up to be optional global code owners (so that everyone can review but are not tagged for review). Global individuals should still be tagged if there are no specific `.vercel.approvers` files in subdirectories.
- Adds @vercel/devex to image files so there's coverage on those files for the docs
- Target specific folder and files for Styfle to get notified
- Deletes some rules in the old GitHub codeowners
2023-06-13 17:47:12 +00:00
OJ Kwon
bfbfa872fe
ci(workflow): skip test trace upload when test skips (#51190)
<!-- 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

- 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



### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

Attempt to fix workflow to skip trace upload if test skips.
2023-06-13 08:06:15 -07:00
Delba de Oliveira
e048f4ef03
[Docs] Recommend prettier-fix in PR template and contribution guide (#51237)
Recommend running `prettier-fix` before opening docs PRs to fix formatting issues. I've found that `lint-fix` is currently not fixing formatting issues. Related: https://vercel.slack.com/archives/C03S9JCH2Q5/p1686647582580629
2023-06-13 14:54:06 +00:00
OJ Kwon
bcb63f3250
ci(workflow): enable test trace upload (#51107)
### What?

WEB-1150. 

This PR is an attempt to upload next.js's test results into datadog test trace to track its status. 

Originally it tried to use automatic trace injection (dd-trace/ci/init). However, due to some of custom environments / setup we use it was not compatible out of the box. Instead, this PR injects a new test reportert to generate junit report, then upload it at once at the end of the testing pipeline.

The reporter is configured to run when necessary variables set, local run should not be affected. 

One thing to note is this report will not count retry results, as it'll create duplicated test entry with multiple results since we runts jest per individual test. This'll allow to detect flaky test easier, but also it means we'll get bit of skewed test results compare to the real world as first failure will be accounted as test fail immediately.
2023-06-12 17:14:13 +00:00
Tobias Koppers
6b0a6f0c25
add turbopack integration tests to CI (#50904)
### What?

* enable turbopack tests in new CI
* split pre-build step into native and JS builds to allow to start
native tests faster
* update swc_core to sync with turbo
* update turbopack

### Why?

Running our test suite is still important as long we don't have the full
integration test suite enabled.

### Turbopack updates

* https://github.com/vercel/turbo/pull/5215 <!-- OJ Kwon - ci(workflow):
upload benchmark results to datadog -->
* https://github.com/vercel/turbo/pull/5239 <!-- OJ Kwon -
fix(swc_plugin): use shared runtime -->
* https://github.com/vercel/turbo/pull/3090 <!-- CHEN Yuan - Docs: prior
to run testcases, add guides to install dependencies for testcases. -->
* https://github.com/vercel/turbo/pull/5264 <!-- Tobias Koppers - update
test runner -->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-12 07:47:43 -07:00
OJ Kwon
6ba6762d75
ci(workflow): consolidate bytesize upload workflow (#51110)
### What?

context: https://github.com/vercel/next.js/actions/runs/5231928600/jobs/9446394605#step:16:33

For some reason, installing datadog cli on some action runner (Windows) is unexpectedly slow: while other platform takes ~30s, windows only takes more than > 7m.

PR updates workflow logic to consolidate artifacts, and then send metrics at once on a separate ubuntu workflow.
2023-06-11 04:42:22 +00:00
JJ Kasper
d8763ca347
Fix getting last stable release stats (#51106)
Small fix ensuring we use the correct repo for getting the last stable
tag
2023-06-10 16:00:10 -07:00
JJ Kasper
efaddcda60
Fix race condition with publish (#51105)
We publish multiple packages in parallel which can cause issues with the
prepublish only script running as turbo clearing/restoring dist caches
can causing files to be missing if a publish is in progress. We also
don't need to run these as all packages are already built prior to
publishing. This also includes fixes for release stats.
2023-06-10 14:05:27 -07:00
OJ Kwon
9bc73dbc1a
ci(workflow): generate run summary for all build targets (#51057)
### What?

I noticed some deploy job fails at

https://github.com/vercel/next.js/actions/runs/5222848985/jobs/9428961695#step:15:20

when there's no summary exists by missing necessary flags for the few platform targets.
2023-06-10 00:27:44 +00:00
Steven
f1f5734e91
chore: pin to npm@9.6.7 (#51044)
This might fix the npm publish error

```
Error: Command failed with exit code 254 (Unknown system error -254): npm publish /home/runner/work/next.js/next.js/packages/next --access public --tag canary
```


https://github.com/vercel/next.js/actions/runs/5219901558/jobs/9422546478#step:11:9353
2023-06-09 07:58:32 -07:00
JJ Kasper
1be0bdd081
Add max job timeout for build workflow (#50998)
Ensures we don't allow jobs like this one back up the queue indefinitely https://github.com/vercel/next.js/actions/runs/5214838162/jobs/9411777984?pr=50904
2023-06-08 20:58:35 +00:00
JJ Kasper
45db459fe1
Add corepack env for linkPackages (#50973)
x-ref:
https://github.com/vercel/next.js/pull/50933#discussion_r1222163786
2023-06-08 07:46:19 -07:00
JJ Kasper
9a3e76377a
Fix windows build check 2023-06-08 07:38:38 -07:00
JJ Kasper
63d5cf1c1d
Fix workflow check 2023-06-08 07:16:31 -07:00
JJ Kasper
23649623d7
Only upload turbopack metrics on cache miss (#50945)
Currently this is uploading every time the job is run even if it's a
cache hit and this step can take over 3 minutes un-necessarily so this
skips it if a cache hit occurred.
2023-06-08 07:07:49 -07:00
OJ Kwon
534414d54e
ci(workflow): enable test trace again (#50817)
### What?

Another attempt to https://github.com/vercel/next.js/pull/50619 and WEB-1150, trying to apply setup guard more throughly.

I still do not know why original PR passed CI but fails to subsequent PRs after merge, but hope this could be a right guard to prevent unexpected failures.
2023-06-08 10:52:49 +00:00
Delba de Oliveira
8c2e5bd072
Update codeowners to use Vercel Spaces (#50841)
Move as much of codeowners as possible to use Vercel Spaces. 

1. Makes `@timneutkens @ijjk @shuding @huozhi @feedthejim` global owners
2. Make the `@vercel/next-js` team _optional_ owners of **/docs**,
**/errors**, and **/contributing**, makes team owners of a few packages
as per old config.
3. Make `@vercel/devex` (docs and devrel) owners of **/docs**,
**/errors**, and **/contributing**
4. Make `@vercel/devrel` (devrel only) owners of **/examples**
5. Make `@vercel/web-tooling` owners of specific files and folders (as
per old config)

Leaves @styfle as owner of **image** files on the old config since this
pattern `/**/*image*/** ` can't be used with Vercel Spaces.

Note: We cannot add * or / at the end of files.
[Docs](https://spaces-docs.vercel.sh/docs/code-owners#:~:text=Code%20Owners%20files%20are%20meant%20to%20encourage%20distributed%20ownership%20definitions%20across%20a%20codebase.)
2023-06-08 12:02:18 +02:00
Delba de Oliveira
f6ff2ef98e
[Next Docs] Update Git Workflow (#50579)
Update our git workflow in preparation for open-sourcing the content of
the docs ([linear
task](https://linear.app/vercel/issue/DX-1579/set-up-github-workflow)).

**Templates:**
- [x] Update docs issue template to encourage contributions
- [x] Update PR template to include link to new contribution guide 

**Code Owners / Reviewers:** 
- https://github.com/vercel/next.js/pull/50841

**Labels:** 
- [x] Add DevEx team to labeler.json so PRs get the "created by: DevEx
team"

**Other:** 
- [x] Remove docs manifest from CI checks as we no longer have one (keep
the manifest for errors as they live under `/pages`)
- [x] Add `unifiedjs.vscode-mdx` to the vscode extension list
2023-06-08 12:01:55 +02:00
Leah
f24d0cb030
fix rust install being skipped when it shouldn't be (#50946)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-07 20:32:19 -07:00
JJ Kasper
6ef76195a5
Update next-swc handling for PR stats (#50933)
This fixes the wasm swc build being used for PR stats unexpectedly since
pnpm pack wasn't actually including the swc binary. This also adds a
hard error preventing the wasm swc binary from being leveraged in the
future for PR stats.

x-ref:
[vercel/next.js/actions/runs/5193512579/jobs/9364168639](https://github.com/vercel/next.js/actions/runs/5193512579/jobs/9364168639)
x-ref:
https://github.com/vercel/next.js/pull/50853#issuecomment-1579055731

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-06-07 14:31:57 -07:00
Leah
ded54923a0
better rust setup in CI (#50905)
### Description

Set some environment variables that reduce size on disk and make the
build a little faster.

Also, read the toolchain from the `rust-toolchain` file, so it's not
duplicated in every workflow.

Ported over from the `turbo` repo.
2023-06-07 09:53:50 -07:00
OJ Kwon
115f927b9b
ci(workflow): loosen condtions for uploading turbopack bytesize (#50820)
### What?

It turned out the recommendation https://github.com/vercel/next.js/pull/50600/files#r1212902688 is overly strict, even if it's valid build work we skips to upload data and only triggers for the release.  This is an example workflow https://github.com/vercel/next.js/actions/runs/5182537384/jobs/9339461369 that build ran but upload skipped.

We are fine with same bytesize numbers with cache hit actually, and can filter it out in worst cases - so loosening conditions for now.
2023-06-06 18:44:39 +00:00
JJ Kasper
65e996b70f
Optimize cloning for PR stats (#50859)
Follow-up to https://github.com/vercel/next.js/pull/50853 this optimizes
how we clone the branches for generating stats.

Before:
https://github.com/vercel/next.js/actions/runs/5191059058/jobs/9358459062
21min

After:
https://github.com/vercel/next.js/actions/runs/5191282140/jobs/9358934393?pr=50859
11min
2023-06-06 10:17:47 -07:00
JJ Kasper
ea74ad0431
Update PR stats workflow (#50853)
Updates to re-use our build workflow so turbo remote cache is leveraged
and updates re-usable workflow reference to be the same branch instead
of main.
2023-06-06 09:57:09 -07:00
JJ Kasper
43fb7249b6
Add turbo summary artifact for swc builds (#50857)
This adds uploading the turbo run summaries for our publish builds so we
can debug cache misses there easier the same as the new build_reusable
workflow.
2023-06-06 09:06:12 -07:00
Kiko Beats
ecf59365ac
add auto labeling for edge team (#50842) 2023-06-06 14:34:41 +00:00
JJ Kasper
44d453f77c
Update PR stats next-swc build (#50824)
This is still using the dev build of `next-swc` which uses up more disk
space so adds the free-up disk space step from previous workflow.

x-ref:
https://github.com/vercel/next.js/actions/runs/5183623872/jobs/9341729073?pr=50820
x-ref:
https://github.com/vercel/next.js/actions/runs/5179335311/jobs/9332066554?pr=50615
2023-06-05 22:23:06 -07:00
OJ Kwon
419246c71e
ci(workflow): upload Turbopack bytesize to datadog pipeline (#50600)
### What?

This PR updates existing CI worfklow for building Turbopack (`@next/swc`), and report its bytesize per target triple as additional metrics. It will be included in datadog's pipeline execution traces.

It would be better to track this per-PR, or per-commits but building all native binaries per each commit is too expensive. For now, tracking it when we deploy and actually build new release binaries.
2023-06-05 22:34:16 +00:00
OJ Kwon
38f7c3bd1b
Revert "ci(workflow): enable datadog traces for the tests" (#50815)
Reverts vercel/next.js#50619

Seeing some weird failure supposed to not occur since we never enabled this 

https://github.com/vercel/next.js/actions/runs/5181685987/jobs/9337538270?pr=50600

Investigating after reverting.
2023-06-05 22:13:06 +00:00
OJ Kwon
2b1f0d9351
ci(workflow): enable datadog traces for the tests (#50619)
### What?

This PR attempts to enable datadog trace integrations to the next.js integration tests if env is configured. With this, datadog can observe each test suite's results and detect some meaningful information (i.e flaky) for us.

However, I wasn't able to verify this works with next.js repo since for some reason CI worker does not pick up the api key in the env (https://vercel.slack.com/archives/C04KC8A53T7/p1685597124894539). Still this won't affect existing workflow, and once enabled I can test it over vercel/turbo repo instead.

Partially resolved WEB-1150.
2023-06-05 20:28:22 +00:00
OJ Kwon
18d112fb5c
ci(workflow): allow to trigger native builds manually (#50703)
### What?

This PR allows to trigger subset of build-and-deploy workflow manually via gh actions UI.

### Why?

Turbopack time to time requires to validate its changes against all of the platforms we build. Adding manual workflow allows to test it easier.

It tries to guard release check `isRelease` only if it comes from normal event (non manual dispatch) to avoid accidental publish workflow.
2023-06-02 19:56:10 +00:00
JJ Kasper
38d9d2efee
Ensure swc builds are triggered eagerly (#50632)
Ensures we continue pre-building binaries on merge to canary and ensures
we are testing against the maintenance Node.js version also adds turbo
summarize for all swc builds.
2023-06-01 03:43:09 -07:00
JJ Kasper
fa076a3a69
Fix required check job (#50620)
x-ref:
https://github.com/vercel/next.js/actions/runs/5138467619/attempts/1
2023-05-31 18:38:53 -07:00
JJ Kasper
a89d58af06
Ensure final workflow job always runs (#50589)
Makes sure we either fail or succeed the single required job correctly
2023-05-31 06:51:13 -07:00
JJ Kasper
ecd4ba0836
Update test concurrency (#50588) 2023-05-31 13:15:18 +00:00
JJ Kasper
56f09a56c7
Remove old CI workflow (#50584)
x-ref: https://github.com/vercel/next.js/pull/50436
2023-05-31 11:46:47 +00:00
JJ Kasper
29c2e89bd1
Break up large test suites (#50458)
This breaks up some of our longest running tests which allows more
parallelizing of the tests. This also moves turbopack tests filtering
back to an allow list as it is running a lot of unrelated tests
currently which isn't ideal. We should only be running against tests
that are explicitly testing turbopack e.g. build tests should not be
duplicated in the turbopack group.

```sh
test/integration/css/test/group-1.test.js: 762.655
test/integration/edge-runtime-module-errors/test/index.test.js: 695.309
test/integration/css/test/group-2.test.js: 671.848
test/integration/i18n-support/test/index.test.js: 518.173
test/integration/scss-modules/test/index.test.js: 451.704
test/integration/css-features/test/index.test.js: 417.318
test/integration/css-modules/test/index.test.js: 403.405
test/integration/eslint/test/index.test.js: 381.563
test/integration/500-page/test/index.test.js: 371.134
test/integration/telemetry/test/index.test.js: 367.691
test/development/acceptance-app/ReactRefreshLogBox.test.ts: 335.878
test/integration/create-next-app/templates.test.ts: 334.01
test/integration/scss/test/group-2.test.js: 327.255
test/integration/scss/test/group-1.test.js: 318.574
test/integration/edge-runtime-configurable-guards/test/index.test.js: 313.834
test/e2e/instrumentation-hook/instrumentation-hook.test.ts: 294.618
test/development/acceptance-app/error-recovery.test.ts: 283.355
test/e2e/app-dir/app/vercel-speed-insights.test.ts: 278.242
test/integration/create-next-app/index.test.ts: 272.442
```
2023-05-28 13:59:41 -07:00
JJ Kasper
5d8d18161a
Update env in new workflow 2023-05-27 23:29:08 -07:00
JJ Kasper
105ac170b8
Update workflow cancel handling (#50442)
The built-in cancel handling doesn't have our desired behavior so this
disables it
2023-05-27 22:57:45 -07:00
JJ Kasper
d0c1edd9b0
Update build and test workflow branch 2023-05-27 21:04:05 -07:00
JJ Kasper
a3ab542630
Add new build and test workflow (#50436)
This adds new `build and test` and `build and deploy` workflows in favor
of the existing massive `build, test, and deploy` workflow. Since the
new workflows will use `pull_request_target` this waits to remove the
existing workflow until the new one is tested.

While testing this new workflow flakey behavior in tests have also been
addressed. Along with the new workflow we will also be leveraging new
runners which allow us to run tests against the production binary of
`next-swc` so this avoids slight differences in tests we've seen due to
running against the dev binary.

Furthermore we will have a new flow for allowing workflow runs on PRs
from external forks which will either require a comment be checking a
box approving the run after each change or a label added by the team.

The new flow also no longer relies on `actions/cache` or similar which
have proven to be pretty unreliable.

Tests runs with the new workflow can be seen here
https://github.com/vercel/next.js/actions/runs/5100673508/jobs/9169416949
2023-05-27 21:02:31 -07:00
Tobias Koppers
187d1bff40
remove allowlist, only use denylist, enable newly passing tests (#50325)
### What?

* remove allowlist
* add script to print enabled test cases
* enable test suites that turbopack is newly passing
2023-05-25 15:37:28 +02:00
Tobias Koppers
06f505c78b
Parallelize Turbopack CI tests (#50292)
### What?

Parallel jobs

### Why?

Timeouts otherwise


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-05-25 07:46:02 +00:00
Tobias Koppers
bf7a556204
enable more test cases for turbopack (#50154)
### What?

Enable more test cases to run with turbopack

### Why?

These test suites are passing and are not flaky.
2023-05-23 20:21:56 +02:00
Jiachi Liu
ad79fed1a2
ci: update github token (#50216)
[slack-thread](https://vercel.slack.com/archives/C01LN7C5QR5/p1684849596794369?thread_ts=1684428058.764599&cid=C01LN7C5QR5)
2023-05-23 07:29:58 -07:00
OJ Kwon
2fc0160a26
test(turbopack): run next.js integration tests with denylist (#50172)
<!-- 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 or adding/fixing 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



### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

WEB-1086.

This PR flips the way running next.js integration test with Turbopack,
instead of using allowlist to run selectively enabled test now uses
denylists. The immediate effect is now any new test being added (as a
new file) will be executed with Turbopack by default, and should be
manually excluded if it fails.

Still, the number of tests we run remains same.
2023-05-23 10:55:33 +02:00
OJ Kwon
dd85daaf4e
test(turbopack): script to sync latest test lists (#50008)
<!-- 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 or adding/fixing 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 #

-->

This PR adjusts manifests for the next.js test with Turbopack, as I
found upstream test keep changing and need to sync its latests state
into the manifest.

Manifest is now .js file contains 2 arrays, one for the enabled, and
others for the disabled. Disabled doesn't mean it's always failing
though.
2023-05-19 09:10:29 +02:00
JJ Kasper
9b0af737b8
Suggest a replay in the bug issue template (#50022)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1684457147422049)
2023-05-18 19:54:15 -07:00
Donny/강동윤
5aaa6ff65e
fix: Disable tracing/release_max_level_off for wasm, too (#49639)
### What?

Along with https://github.com/swc-project/plugins/pull/182, this PR will
allow using trace-level logging for debugging turboapck.

### Why?

Requested by @sokra 

x-ref: https://vercel.slack.com/archives/C03EWR7LGEN/p1683738076476839

### How?

Closes WEB-1035
2023-05-15 16:16:12 +02:00
Donny/강동윤
54ea0d95a0
feat: Allow trace-level logging for non-published release builds (#49564)
### What?

Disable `tracing/release_max_level_info` for non-published release
builds. I modified CI script to strip out logging for published
binaries.

### Why?

x-ref: https://vercel.slack.com/archives/C03EWR7LGEN/p1683621374204959

It's required to print logging for turbopack.

### How?

Closes WEB-1032

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-10 14:50:36 +02:00
Tobias Koppers
f55359ffb6
Avoid skipping the required Test Codemods job (#49589)
A required CI check can't be skipped. Otherwise this leads to kodiak
stalling forever on these PRs:

<img width="515" alt="image"
src="https://github.com/vercel/next.js/assets/1365881/142f0f77-1fe1-445c-bdff-1cf7957ebe3e">
2023-05-10 13:19:39 +02:00
OJ Kwon
0dce75f642
ci(test): enable turbopack test (#49466)
<!-- 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 or adding/fixing 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



### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

closees WEB-1019.

As discussed, this PR enables running a set of next.js integration tests
with turbopack as blocking CI check. The tests listed as `enabled` is
considered as stable, that should not fail in any case except upstream
test flakyness.

Current approach is simple as we have only small set of tests and does
not consider it becomes a bottleneck. Adding a test under
https://github.com/vercel/next.js/pull/49466/files#diff-fdc68d6039dbe36607cda253b318cd3598a09a94ccb8994f3695aa1d9e1e404bR2
will makes run with turbopack in the CI. in the future, I'll revise test
suite itself so runner, or test case can mark & execute test with
existing test group / scheduling.
2023-05-09 10:46:54 -07:00
JJ Kasper
7a1bc235f5
Update start release workflow inputs (#49492)
Uses the choice input type instead of requiring manually typing the
values.
2023-05-08 17:26:33 -07:00