Commit graph

722 commits

Author SHA1 Message Date
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