Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .agents/skills/pr-status-triage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Use this skill when the user asks about PR status, CI failures, or review commen

## Workflow

1. Run `node scripts/pr-status.js --wait` in the background (timeout 1 min), then read `scripts/pr-status/index.md`.
2. Analyze each `job-{id}.md` and `thread-{N}.md` file for failures and review feedback.
1. Run `node scripts/pr-status.js --wait` in the background (timeout 1 min), then read `scripts/pr-status/results/index.md`.
2. Analyze each `job-{id}.md` and `thread-{N}.md` file in `scripts/pr-status/results/` for failures and review feedback.
3. Prioritize blocking jobs first: build, lint, types, then test jobs.
4. Treat failures as real until disproven; check the "Known Flaky Tests" section before calling anything flaky.
5. Reproduce locally with the same mode and env vars as CI.
6. After addressing review comments, reply to the thread describing what was done, then resolve it. Use `reply-and-resolve-thread` to do both in one step, or use `reply-thread` + `resolve-thread` separately. See `thread-N.md` files for ready-to-use commands.
6. After addressing review comments, reply to the thread describing what was done, then resolve it. Use `reply-and-resolve-thread` to do both in one step, or use `reply-thread` + `resolve-thread` separately. See `scripts/pr-status/results/thread-N.md` files for ready-to-use commands.
7. When the only remaining failures are known flaky tests and no code changes are needed, retrigger the failing CI jobs with `gh run rerun <run-id> --failed`. Then wait 5 minutes and go back to step 1. Repeat this loop up to 5 times.

## Quick Commands
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/pr-status-triage/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ Or do both in one step:
node scripts/pr-status.js reply-and-resolve-thread <threadNodeId> "Done -- <description of changes>"
```

The ready-to-use commands with the correct thread IDs are at the bottom of each `thread-N.md` file in `scripts/pr-status/`.
The ready-to-use commands with the correct thread IDs are at the bottom of each `thread-N.md` file in `scripts/pr-status/results/`.

**Important:** Always reply with a description of the actions taken before resolving. This gives the reviewer context about what changed.
2 changes: 0 additions & 2 deletions .config/eslintignore.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export default globalIgnores([
'packages/next-codemod/**/*.d.ts',
'packages/next-env/**/*.d.ts',
'packages/create-next-app/templates/**/*',
'test/integration/eslint/**/*.js',
'test/integration/script-loader/**/*.js',
'test/development/basic/legacy-decorators/**/*.js',
'test/production/emit-decorator-metadata/**/*.js',
'!test/**/*.test.*',
Expand Down
241 changes: 10 additions & 231 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,59 +388,6 @@ jobs:
stepName: 'test-turbopack-dev-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-turbopack-integration:
name: test turbopack integration
needs:
[
'optimize-ci',
'changes',
'build-native',
'build-next',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group:
- 1/13
- 2/13
- 3/13
- 4/13
- 5/13
- 6/13
- 7/13
- 8/13
- 9/13
- 10/13
- 11/13
- 12/13
- 13/13
# Empty value uses default
# TODO: Run with React 18.
# Integration tests use the installed React version in next/package.json.
# We can't easily switch like we do for e2e tests.
# Skipping this dimension until we can figure out a way to test multiple React versions.
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 20.9.0
afterBuild: |
export IS_TURBOPACK_TEST=1
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
export RUST_BACKTRACE=1

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type integration
testTimingsArtifact: 'test-timings'
stepName: 'test-turbopack-integration-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-turbopack-production:
name: test turbopack production
needs:
Expand Down Expand Up @@ -523,52 +470,6 @@ jobs:
stepName: 'test-rspack-dev-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-rspack-integration:
name: test rspack development integration
needs:
[
'optimize-ci',
'changes',
'build-next',
'build-native',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }}
strategy:
fail-fast: false
matrix:
group: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
# Empty value uses default
# TODO: Run with React 18.
# Integration tests use the installed React version in next/package.json.
# We can't easily switch like we do for e2e tests.
# Skipping this dimension until we can figure out a way to test multiple React versions.
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 20.9.0
afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-dev-tests-manifest.json"
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true

# rspack flags
export NEXT_RSPACK=1
export NEXT_TEST_USE_RSPACK=1

# HACK: Despite the name, this environment variable is only used to gate
# tests, so it's applicable to rspack
export TURBOPACK_DEV=1

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type integration
testTimingsArtifact: 'test-timings'
stepName: 'test-rspack-integration-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-rspack-production:
name: test rspack production
needs:
Expand Down Expand Up @@ -611,52 +512,6 @@ jobs:
stepName: 'test-rspack-production-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-rspack-production-integration:
name: test rspack production integration
needs:
[
'optimize-ci',
'changes',
'build-next',
'build-native',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' && needs.changes.outputs.rspack == 'true' }}
strategy:
fail-fast: false
matrix:
group: [1/7, 2/7, 3/7, 4/7, 5/7, 6/7, 7/7]
# Empty value uses default
# TODO: Run with React 18.
# Integration tests use the installed React version in next/package.json.
# We can't easily switch like we do for e2e tests.
# Skipping this dimension until we can figure out a way to test multiple React versions.
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 20.9.0
afterBuild: |
export NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/rspack-build-tests-manifest.json"
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true

# rspack flags
export NEXT_RSPACK=1
export NEXT_TEST_USE_RSPACK=1

# HACK: Despite the name, this environment variable is only used to gate
# tests, so it's applicable to rspack
export TURBOPACK_BUILD=1

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type integration
testTimingsArtifact: 'test-timings'
stepName: 'test-rspack-production-integration-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-next-swc-wasm:
name: test next-swc wasm
needs: ['optimize-ci', 'changes', 'build-next']
Expand Down Expand Up @@ -795,7 +650,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1/5, 2/5, 3/5, 4/5, 5/5]
group: [1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10]

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -807,7 +662,7 @@ jobs:
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName: 'test-new-tests-dev-${{matrix.group}}'
timeout_minutes: 60 # Increase the default timeout as tests are intentionally run multiple times to detect flakes
timeout_minutes: 120 # Increase the default timeout as tests are intentionally run multiple times to detect flakes

secrets: inherit

Expand All @@ -821,7 +676,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1/5, 2/5, 3/5, 4/5, 5/5]
group: [1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10]

uses: ./.github/workflows/build_reusable.yml
with:
Expand All @@ -833,7 +688,7 @@ jobs:
--group ${{ matrix.group }} \
--preview-builds-base-url "${{ vars.PREVIEW_BUILDS_BASE_URL }}"
stepName: 'test-new-tests-start-${{matrix.group}}'
timeout_minutes: 60 # Increase the default timeout as tests are intentionally run multiple times to detect flakes
timeout_minutes: 120 # Increase the default timeout as tests are intentionally run multiple times to detect flakes
secrets: inherit

test-new-tests-deploy:
Expand Down Expand Up @@ -969,15 +824,16 @@ jobs:
with:
nodeVersion: 20.9.0
afterBuild: |
export NEXT_TEST_MODE=start
export IS_WEBPACK_TEST=1
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true
node run-tests.js \
node run-tests.js --type production \
--concurrency 4 \
test/production/pages-dir/production/test/index.test.ts \
test/integration/css-client-nav/test/index.test.ts \
test/integration/rewrites-has-condition/test/index.test.ts \
test/integration/create-next-app/index.test.ts \
test/integration/create-next-app/package-manager/pnpm.test.ts
test/e2e/css-client-nav/css-client-nav.test.ts \
test/e2e/rewrites-has-condition/rewrites-has-condition.test.ts \
test/production/create-next-app/index.test.ts \
test/production/create-next-app/package-manager/pnpm.test.ts
stepName: 'test-integration-windows'
runs_on_labels: '["windows-latest-8-core-oss"]'
buildNativeTarget: 'x86_64-pc-windows-msvc'
Expand Down Expand Up @@ -1040,58 +896,6 @@ jobs:
stepName: 'test-prod-react-${{ matrix.react }}-${{ matrix.group }}'
secrets: inherit

test-integration:
name: test integration
needs:
[
'optimize-ci',
'changes',
'build-native',
'build-next',
'fetch-test-timings',
]
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

strategy:
fail-fast: false
matrix:
group:
- 1/13
- 2/13
- 3/13
- 4/13
- 5/13
- 6/13
- 7/13
- 8/13
- 9/13
- 10/13
- 11/13
- 12/13
- 13/13
# Empty value uses default
# TODO: Run with React 18.
# Integration tests use the installed React version in next/package.json.
# We can't easily switch like we do for e2e tests.
# Skipping this dimension until we can figure out a way to test multiple React versions.
react: ['']
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 20.9.0
afterBuild: |
export IS_WEBPACK_TEST=1
export NEXT_TEST_REACT_VERSION="${{ matrix.react }}"
export __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true

node run-tests.js \
--timings \
--require-timings \
-g ${{ matrix.group }} \
--type integration
testTimingsArtifact: 'test-timings'
stepName: 'test-integration-${{ matrix.group }}-react-${{ matrix.react }}'
secrets: inherit

test-firefox-safari:
name: test firefox and safari
needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
Expand Down Expand Up @@ -1125,28 +929,6 @@ jobs:
stepName: 'test-firefox-safari'
secrets: inherit

# Manifest generated via: https://gist.github.com/wyattjoh/2ceaebd82a5bcff4819600fd60126431
test-cache-components-integration:
name: test cache components integration
needs: ['optimize-ci', 'changes', 'build-native', 'build-next']
if: ${{ needs.optimize-ci.outputs.skip == 'false' && needs.changes.outputs.docs-only == 'false' }}

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 20.9.0
afterBuild: |
export __NEXT_CACHE_COMPONENTS=true
export __NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS=true
export __NEXT_EXPERIMENTAL_APP_NEW_SCROLL_HANDLER=true
export NEXT_EXTERNAL_TESTS_FILTERS="test/cache-components-tests-manifest.json"
export IS_WEBPACK_TEST=1

node run-tests.js \
--timings \
--type integration
stepName: 'test-cache-components-integration'
secrets: inherit

test-cache-components-dev:
name: test cache components dev
needs:
Expand Down Expand Up @@ -1356,11 +1138,9 @@ jobs:
'test-next-config-ts-native-ts-prod',
'test-dev',
'test-prod',
'test-integration',
'test-firefox-safari',
'test-cache-components-dev',
'test-cache-components-prod',
'test-cache-components-integration',
'test-node-streams-cache-components-dev',
'test-node-streams-cache-components-prod',
'test-node-streams-dev',
Expand All @@ -1370,7 +1150,6 @@ jobs:
'rustdoc-check',
'test-next-swc-wasm',
'test-turbopack-dev',
'test-turbopack-integration',
'test-new-tests-dev',
'test-new-tests-start',
'test-new-tests-deploy',
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ test/e2e/app-dir/server-source-maps/fixtures/default/internal-pkg/sourcemapped.j
test/e2e/app-dir/server-source-maps/fixtures/default/external-pkg/sourcemapped.js
test/development/mcp-server/fixtures/default-template/app/build-error/page.tsx
test/development/mcp-server/fixtures/compilation-errors-app/app/syntax-error/page.tsx
# Tested against auto-generated content that isn't formatted
test/integration/typescript-app-type-declarations/next-env.strictRouteTypes.d.ts

# turbopack crates, disable for some tests and precompiled dependencies.
/turbopack/crates/*/js/src/compiled
Expand Down Expand Up @@ -91,8 +89,6 @@ readme.md
test/development/app-dir/hmr-symlink/app/symlink-chain/page.tsx
test/development/app-dir/hmr-symlink/app/symlink-link/page.tsx
test/development/app-dir/ssr-in-rsc/node_modules/random-react-library
test/integration/build-trace-extra-entries/app/node_modules/pkg-behind-symlink
test/integration/edge-runtime-configurable-guards/node_modules/lib
test/production/app-dir/symbolic-file-links/src/i18n.ts
test/production/app-dir/symbolic-file-links/src/app/layout.tsx
test/production/app-dir/symbolic-file-links/src/app/page.tsx
Expand Down
6 changes: 6 additions & 0 deletions crates/next-api/src/next_server_nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ enum ServerNftType {

#[turbo_tasks::function]
pub async fn next_server_nft_assets(project: Vc<Project>) -> Result<Vc<OutputAssets>> {
if *project.next_config().is_using_adapter().await? {
// When using an adapter, we don't need to generate any server NFTs as build-complete
// doesn't use them at all.
return Ok(Vc::cell(vec![]));
}

let has_next_support = *project.ci_has_next_support().await?;
let is_standalone = *project.next_config().is_standalone().await?;

Expand Down
Loading
Loading