Commit graph

555 commits

Author SHA1 Message Date
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
Tobias Koppers
aabc1d9cc3
disable optimistic_updates (#49211)
### What?

disable optimistic_updates

So it no longer does that:

> If Kodiak is merging an out-of-date pull request that has running
status checks, update the pull request's branch without waiting for the
running status checks to finish.

The problem with that is that it cancels running checks and restarts
them.

Instead it waits for all running status checks before updating the PR.

### Why?

This should avoid the case where a PR is updated again and again without
yielding a result.

It also saves some CI cost

And it allows CI to finish and fill up the turborepo cache, which can
potentially used for the next run.
2023-05-04 15:45:53 +02:00
Balázs Orbán
8d9658c680
chore: simplify repo templates (#49073)
[Slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1682414178536089)

Closes NEXT-1076
2023-05-03 14:42:31 +02:00
Steven
b3afc46e1c
fix: npm publish provenance permissions (#48757)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-24 14:08:55 +00:00
Tim Neutkens
e631ab9853 Revert "Add npm package provenance on publish (#48693)"
This reverts commit 1c007cee2f.
2023-04-24 11:19:18 +02:00
Steven
1c007cee2f
Add npm package provenance on publish (#48693)
https://github.blog/2023-04-19-introducing-npm-package-provenance/
2023-04-23 02:12:53 +00:00
JJ Kasper
f779f10f38
Re-add kodiak config (#48672)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1682069797616589)
2023-04-21 11:59:52 -04:00
JJ Kasper
3a83c6b313
Update start release flow (#48634)
x-ref: [slack
thread](https://vercel.slack.com/archives/C01LN7C5QR5/p1681914697254659)
2023-04-20 15:58:36 +00:00
OJ Kwon
9f5463dc9a
build(cargo): move workspaces manifest to top level (#48198)
<!-- 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


### How?

Closes NEXT-
Fixes #

-->

### What?
This PR changes to the `root` of the cargo workspace to the root of repo
itself, allows next-swc and other rust codebase can use repo root as
workspace root.

### Why?
Currently cargo manifest for the next-swc is not placed under the root
of the repo, which makes invocation to the tool requires to change cwd /
or set cwd. Similarly needs to open editor to the root of the cargo
manifest separately to able to utilize language server kicks in. Moving
manifest to the root consolidates those, so can invoke either cli / or
editor to the same root of the repo.
2023-04-19 18:38:36 +02:00
Jan Kaifer
902bb40454
Remove unused code from test-pack turbo task (#48487)
We decided in https://github.com/vercel/next.js/pull/48308 that we won't
use `turbo` when packing packages for tests.

This PR removes all code associated with that effort. The whole thing
fas behind a flag, so it shouldn't affect anything.
fix NEXT-1025
2023-04-18 12:12:00 +00:00
Tobias Koppers
d4d779145c
refactor shared logic for turbopack-cli (#48307)
### What?

* move some shared runtime logic to turbopack
* use relative imports from internal code when possible
* move react-refresh logic to turbopack
* move benchmark code logic to turobpack

see https://github.com/vercel/turbo/pull/4553

### Why?

We want to have benchmarking again for turbopack PRs
We want to have a standalone turbopack cli (eventually)
We want to avoid duplicating the runtime code

### How?

refactoring, moving code
2023-04-13 14:54:34 +02:00
Tobias Koppers
b9618ea620
allow anyone to approve a lockfile change (#48261)
### What?

web-tooling team can approve lockfile changes

### Why?

updating turbopack requires to update the lockfile

### How?

add lockfile to code owners

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Steven <steven@ceriously.com>
2023-04-12 08:42:31 +02:00
Jiachi Liu
cd55220a6f
Update codeowner for images (#48239)
Add `@huozhi` for images and related as metadata could need them
2023-04-11 17:44:36 +02:00
Tobias Koppers
bd8d7c61f7
Speed up native dev build (#48028)
### What?

More power for the CI to build the native binary for testing

### Why?

Waiting 1 hour for the tests is just too slow

### How?

More Cores
2023-04-06 18:50:27 +02:00
Tobias Koppers
9b0af04649
update turbopack (#48006)
see #47994
2023-04-06 09:50:04 +00:00
Tobias Koppers
e643d52eb3
Run bench tests as part of CI (#47849)
### What?

enables the benchmark tests from turbopack again

### Why?

It tests common scenarios like HMR

fixes WEB-792

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
2023-04-05 14:54:08 +00:00
JJ Kasper
29ed52b01c
Add merge_group actions trigger 2023-04-04 20:52:39 -07:00
JJ Kasper
6d2856636b
Disable Kodiak for testing 2023-04-04 20:09:25 -07:00
Balázs Orbán
9d5a3e8c6b
chore: update labels (#47904)
### What?

Syncing https://github.com/vercel/next.js/labels with the bug report template.

### Why?

We've got some OS-related reports so it would be nice to be able to filter on that.

### How?

The label description is added as a select option to the template, which then matches one of the labels https://github.com/vercel/next.js/labels
2023-04-04 11:30:56 +00:00
JJ Kasper
042f4ed975
Revert "Test disabling kodiak (#47880)"
This reverts commit 9de5b7b715.
2023-04-03 21:30:08 -07:00
JJ Kasper
c05514079b
Ensure GH actions tests run for trunk branches (#47883)
We need to run for all branches for trunk to test correctly
2023-04-03 16:45:55 -07:00
JJ Kasper
9de5b7b715
Test disabling kodiak (#47880)
Testing out a new alternative
2023-04-03 15:11:57 -07:00
JJ Kasper
320ebe2d34
Update flakey tests and add Node.js setup retrying (#47871)
x-ref:
https://github.com/vercel/next.js/actions/runs/4599615812/jobs/8125278036
x-ref:
https://github.com/vercel/next.js/actions/runs/4598323624/jobs/8124618075?pr=47365
x-ref:
https://github.com/vercel/next.js/actions/runs/4598323624/jobs/8124612692?pr=47365
2023-04-03 13:37:14 -07:00
JJ Kasper
57d51b0e22
Tweak Vercel CLI installing for E2E tests (#47804)
Avoids accidentally running the CLI install twice at the same time due
to concurrency by pre-installing it before starting tests.

x-ref:
https://github.com/vercel/next.js/actions/runs/4581102424/jobs/8090565967
x-ref:
https://github.com/vercel/next.js/blob/canary/test/lib/next-modes/next-deploy.ts#L27
2023-04-01 15:36:21 -07:00
JJ Kasper
a5269cf096
Fix docs only check for test-native-integration (#47800)
x-ref:
https://github.com/vercel/next.js/actions/runs/4585187133/jobs/8097219720
x-ref:
https://github.com/vercel/next.js/actions/runs/4585188922/jobs/8097221396
2023-04-01 14:27:38 -07:00
OJ Kwon
d66236f2d8
test(turbopack): blocking CI for turbopack integration test (#47709)
<!-- 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 #

-->

- closes WEB-766.

This PR enables a new job for running tests, against turbopack. Since we
have observed some flakiness across turbopack test execution, it starts
from absolute minimum set of tests to not block any CI due to unexpected
failure.

Ran manual workflow roughly ~50 times and looks like these set of tests
are fine to make it as blocking check for the PR. In the future, depends
on the stability we'll increase number of test gradually.
2023-03-31 18:50:35 -07:00
Steven
d83f68ccf7
chore(ci): fix codemod tests (#47710)
These tests were failing with the following error:

```
Failed to fetch origin/canary Error: Command failed: git fetch origin canary
fatal: could not read Username for 'https://github.com/': No such device or address
```

https://github.com/vercel/next.js/actions/runs/4220015224/jobs/7325960064#step:5:13

- Follow up to https://github.com/vercel/next.js/pull/46068
2023-03-31 04:27:16 +00:00
Steven
af49d5098b
chore(docs): update next export to output: 'export' (#47717)
fix NEXT-927 ([link](https://linear.app/vercel/issue/NEXT-927))
2023-03-31 02:04:23 +00:00
Leah
614a14bc6c
Update CODEOWNERS to override image wildcard (#47722) 2023-03-31 00:07:22 +00:00
Tobias Koppers
ebe0686a9d
Run turbopack integration tests for next.js changes too (#47608)
### What?

Turbopack tests need to run on any change

### Why?

Next.js changes might break turbopack and we want to avoid that.

### How?

Change CI job

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-30 18:21:19 +02:00
JJ Kasper
ed156fa18f
Update pnpm version for trigger release 2023-03-29 22:01:40 -07:00
JJ Kasper
28d56ec95f
Update test create-next-app running (#47611)
This re-enables running the CNA tests for all non-docs changes as it's now ensuring we don't regress on turbopack or our default templates. 

Also fixes the main repo's package.json files from being modified during tests.
2023-03-28 17:39:00 +00:00
OJ Kwon
553cf48acb
ci(workflow): run checks for the test specific features (#47572)
This PR is minor update to ci workflow to verify test-only features are
being compilable correctly.
2023-03-27 14:31:45 -07:00
Maia Teegarden
956c562886
Add ownership of build folder to Web Tooling team (#47508)
<!-- 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 #

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-03-26 19:19:02 -07:00
Leah
9b2afe509b
add auto labeling for turbopack/the web-tooling team (#47502) 2023-03-24 16:30:51 +00:00
Balázs Orbán
a03db7545d
chore: tweak CODEOWNERS (#47491) 2023-03-24 14:00:06 +00:00
JJ Kasper
cbb6dda6a3
Tweak trigger release cloning 2023-03-23 23:07:52 -07:00
JJ Kasper
af89adbd61
Update fetch cache memory handling (#47465)
This ensures we only honor cache entries from the in memory cache for up
to 2 seconds so that revalidates can correctly propagate and also
increases max fetch cache entry size to 2 MB. The `fetchCache` export is
also being detected in this PR but not yet honored which will be done in
a follow-up.
2023-03-23 22:30:08 -07:00
JJ Kasper
2a257cef60
Fix trigger_release workflow type (#47466)
Follow-up to https://github.com/vercel/next.js/pull/47461 swapping the
workflow type
2023-03-23 16:37:53 -07:00
JJ Kasper
d0bdd8f230
Add workflow to trigger release (#47461)
As discussed this adds a publish workflow that can be triggered for
canary or stable releases which ensures we are publishing from a
consistent environment and local config doesn't affect a release.
2023-03-23 16:28:49 -07:00
Balázs Orbán
577828f71b
chore: clean up CODEOWNERS (#47451)
To manage CODOWNERS via GitHub teams, rather than tweaking this file with individual usernames.
2023-03-23 20:18:42 +00:00
Becky V
98c831f593
Update CODEOWNERS
Requested to change the access from individual usernames to a team name at the github level by Balazs and approved by Styfle.  - Becky V 3/23/23
2023-03-23 10:49:25 -07:00
JJ Kasper
84a416b5e1
Fix build spinner in TTY env (#47383)
This ensures the build spinner is correctly stopped in a TTY environment
and also adds regression tests for `app` and `pages` to ensure this
behaves as expected.

This updates our docker image to use the `jammy` tag instead of `focal`
to match the Ubuntu version to our CI.
2023-03-22 12:56:39 -07:00
Balázs Orbán
6a6977cb71
chore: tweak PR labeler pattern (#47395)
Co-authored-by: Jan Kaifer <jan@kaifer.cz>
2023-03-22 14:39:24 +01:00
Jan Kaifer
c04ca8df84
Add more spans into OTEL instrumentation to wrap all user defined functions (#47368)
- Move span wrapping rendering closer to the user code and don't add
span when we have cache-hit
- Add `getStaticProps` span
- Add spans around API handlers (pages and app)
- Add `generateMetadata` span
- Clarify naming that we use `page` for entrypoints like
`/path/[param]/page` or `/path/[param]/layout`. And `route` for
`/path/[param]`

fix NEXT-857 ([link](https://linear.app/vercel/issue/NEXT-857))
2023-03-22 12:01:33 +00:00
JJ Kasper
fed3ffa865
Skip extra swc builds (#47378)
This removes some extra swc builds which are rarely if ever used and are
also prone to breaking fairly often due to the extra configuration
required to build them.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1679434160981059)
2023-03-21 16:09:52 -07:00
Balázs Orbán
316638bc03
chore: add checkout step to issue labeler action (#47346) 2023-03-21 13:27:09 +00:00