Commit graph

682 commits

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