Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: deploy tests fixes #69621

Draft
wants to merge 19 commits into
base: 14-2-1
Choose a base branch
from
Draft

Conversation

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. tests labels Sep 3, 2024
@lubieowoce lubieowoce requested a review from ztanner September 3, 2024 14:36
@lubieowoce lubieowoce force-pushed the backport-14-3-0/deploy-tests branch 5 times, most recently from f22965d to 7ae6030 Compare September 3, 2024 19:47
@ijjk ijjk added the type: next label Sep 3, 2024
@ijjk
Copy link
Member

ijjk commented Sep 3, 2024

Tests Passed

@ztanner ztanner force-pushed the backport-14-3-0/deploy-tests branch 9 times, most recently from 428c830 to d967bbc Compare September 4, 2024 01:20
ztanner and others added 11 commits September 4, 2024 17:20
[Test
Run](https://github.com/vercel/next.js/actions/runs/9471783416/job/26095882422)

Changes:

- Add a setup step that clears the project so it doesn't happen in each
runner
- Run when a release is published rather than on cron
- Notify via Slack when a failure occurs
- Leverage build_reusable for the test runner to match the
build_and_test workflow
- Fixes to `next-deploy` script: not properly logging/catching errors
- Adds manifest to ignore known issues
- Split into 6 runners with 2 concurrency (12 deploys at a time)
- Adds some logging so we know what's happening
- Disable Playwright trace mode (it kept failing to find a trace file
and cluttering the output. Don't think we need it here anyway)

<details>
- <summary>Removed noisy output</summary>

![CleanShot 2024-06-10 at 14 08
05@2x](https://github.com/vercel/next.js/assets/1939140/f227e71c-95b4-4859-90de-a23c88c55ea8)

</details>

<!-- 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:

- 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

- 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

- 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

- 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

- 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

Closes NEXT-
Fixes #

-->
Make sure this doesn't get skipped
[x-ref

](https://github.com/vercel/next.js/actions/runs/9472800340/job/26098835283)
<!-- 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 #

-->
This disables tests that should not be run in a deployed environment,
because they use incompatible APIs or there's no reason to test them
outside of `next start`. Specifically disables for things like:

- Using `next.patchFile`, `next.renameFile`, etc.
- Attempting to use `next.cliOutput` to query runtime logs. When
deployed, these are only build-time logs.

[Latest Run](https://github.com/vercel/next.js/actions/runs/9483807368)
I missed that this was used by the comment webhook when I removed it in
#66721. This restores the existing code and adds a better comment
explaining why it's there.
- remove fail fast so we can get a full picture of what's failing
- remove alerting/retrying to existing job

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Splitting these workflows up to improve readability & control the
`workflow_run` condition a bit better.
lubieowoce and others added 8 commits September 4, 2024 17:20
`vercel logs` now retrieves runtime logs in watch mode. This causes the
`createNext` step to hang as it never resolves.

These logs are intended to be build logs, which is available under
`vercel inspect --logs`. I removed some arguments that are no longer
valid for that CLI function.

Separately, it looks like we're able to add runtime logs to
`next.cliOutput`, which I'll do in a future PR.

Related:
- vercel/vercel#11788

[Failure
example](https://github.com/vercel/next.js/actions/runs/10012728881/job/27679225925)

["Success"
example](https://github.com/vercel/next.js/actions/runs/10013211758/job/27680965374?pr=67971)
This particular test was failing because build logs were being piped to
stderr, despite being successful. This ensures `next.cliOutput` captures
both `stdout` and `stderr`.
...instead of doing the opposite

before this PR:
- `skipNativeInstall: 'yes'` sets `NEXT_SKIP_NATIVE_POSTINSTALL=''`
- `skipNativeInstall: 'no'` sets `NEXT_SKIP_NATIVE_POSTINSTALL=true`

after this PR:
- `skipNativeInstall: 'yes'` sets `NEXT_SKIP_NATIVE_POSTINSTALL='1'`
- `skipNativeInstall: 'no'` sets `NEXT_SKIP_NATIVE_POSTINSTALL=''`
@lubieowoce lubieowoce force-pushed the backport-14-3-0/deploy-tests branch from 5ba0710 to 0818dbb Compare September 4, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants