Commit graph

653 commits

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