Skip to content

[test] Fix 15.5.x deploy tests - #97977

Merged
eps1lon merged 9 commits into
next-15-5from
sebbie/15-5-deploy-action-assertions
Aug 31, 2026
Merged

eps1lon merged 9 commits into
next-15-5from
sebbie/15-5-deploy-action-assertions

Conversation

@eps1lon

@eps1lon eps1lon commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

This addresses the deploy test failures from the v15.5.24 deploy run attempts (https://github.com/vercel/next.js/actions/runs/32871018966).

This PR only updates assertions. Backporting the relevant fixes is out of scope.

Assertion fixes:

  • no-server-actions: backports the test: fix actions deployment tests #87279 portion for the MPA test. The multipart POST was sent without a boundary parameter, which Vercel answers with a 405 before the request reaches the Next.js server; with boundary=test the deployed app returns the expected 404 with the x-nextjs-action-not-found header.
  • actions-unrecognized: the JS-disabled form submission with an unrecognized action id used to log a 500 on the server while Vercel returned a 405 to the client; current 15.5.x deployments return the 500 itself. The deploy branch now asserts the 500 with an updated FIXME. Canary fixed the underlying runtime 500 in c2a10f111d by responding 404
  • metadata: prerendered metadata routes are served on Vercel as static files with the platform default max-age=0, must-revalidate instead of the immutable cache header from the prerender manifest. The icons test expects that in deploy mode, with a FIXME noting the expectations unify once [metadata] update metadata routes cache headers #83215 is backported.
  • middleware-general: the nodejs middleware function bundle does not include the project package.json when deployed, so /test-node-fs fails with ENOENT (open /var/task/package.json, confirmed in function logs). The test asserts the 500 in deploy mode behind a FIXME.

Deploy skips, each due to deploy-mode flakiness or unsupported infra:

  • The whole test/e2e/app-dir/segment-cache/ directory: timeouts and act() prefetch-response mismatches move between suites from run to run against the identical published package. The suite is testing an experimental feature so coverage on an LTS release is less relevant.
  • sub-shell-generation: applies canary's own gate from disable sub shell generation test outside of adapter #91353
  • app-static force-static revalidation: already carries a TODO about a suspected ISR bug; now also skipped in deploy mode, referencing that TODO.

server-actions-redirect-middleware-rewrite is a legit bug caused by #96011.

app-custom-routes is broken due to bot challenges. Filed a ticket that hopefully resolves that issue: https://vercel.slack.com/archives/C02K2HCH5V4/p1788175011380479

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

@eps1lon eps1lon changed the title Fix server action deploy tests on next-15-5 [test] Fix 15.5.x deploy tests Aug 27, 2026
@eps1lon
eps1lon marked this pull request as ready for review August 27, 2026 12:49
@eps1lon
eps1lon requested a review from lukesandberg August 27, 2026 12:52
@eps1lon
eps1lon marked this pull request as draft August 27, 2026 18:17
@eps1lon
eps1lon changed the base branch from next-15-5 to sebbie/new-test-backport/15-5 August 28, 2026 14:18
@eps1lon
eps1lon force-pushed the sebbie/15-5-deploy-action-assertions branch from f5057c7 to da835f6 Compare August 28, 2026 14:18
Base automatically changed from sebbie/new-test-backport/15-5 to next-15-5 August 28, 2026 17:20
This backports the `no-server-actions` portion of ca831cf ("test: fix actions deployment tests", #87279) to the next-15-5 branch. The MPA test sends its multipart POST with an explicit `boundary=test` parameter; without it, Vercel answers the request with a 405 and the request never reaches the Next.js server, while with it the deployed app returns the expected 404 with the `x-nextjs-action-not-found` header, so those assertions now run unconditionally. The runtime log assertion is skipped when deployed because `next.cliOutput` does not include runtime logs there. The test file now matches canary byte for byte.
The JS-disabled form submission with an unrecognized action id used to log a 500 on the server while Vercel returned a 405 to the client. Current 15.5.x deployments return the 500 itself, matching the self-hosted behavior asserted in the same test, so the deploy branch now expects a 500 and the FIXME records the change. The 15.5 runtime's 500 for unrecognized MPA action ids is itself a known issue that canary fixed in c2a10f111d by responding 404; that runtime change is not part of this commit.
The segment cache suites for basic navigation, client-only opt-in, incremental opt-in, memory pressure, and prefetch layout sharing fail against Vercel deployments of 15.5.x with timeouts and `act()` prefetch-response mismatches that vary across retries of the same deployment. `clientSegmentCache` is an experimental-only feature on the 15.x line, and canary runs these suites green only because of runtime and router-act changes that are not being backported. Each suite now sets `skipDeployment: true`, matching the existing precedent for deploy-only divergence on this branch.
@eps1lon
eps1lon force-pushed the sebbie/15-5-deploy-action-assertions branch from da835f6 to 3d88006 Compare August 29, 2026 08:31
Every suite under `test/e2e/app-dir/segment-cache/` that uses the shared test harness now sets `skipDeployment: true`. The deploy runs on this branch keep failing on segment cache suites with timeouts and `act()` prefetch-response mismatches that move between suites from run to run: the v15.5.24 run failed five suites, and the next run failed two more (`metadata`, `search-params`) that had passed against the identical published package. Since the flakiness is a property of the whole directory in deploy mode on this branch, all of them are skipped in deploy mode; they still run in dev and start modes.
When deployed to Vercel, the prerendered metadata routes are served as static files with the platform's default `public, max-age=0, must-revalidate` cache header instead of the immutable one recorded in the prerender manifest's `initialHeaders`, so the icons test now expects that value in deploy mode and keeps the immutable expectation in dev and start modes. The FIXME references the #83215 backport, after which `max-age=0` becomes the expected value everywhere.
This applies the same gate canary added in cd49df2 (#91353) to the next-15-5 branch: the suite fails in deploy mode because the platform support for the shell behavior only exists in the new Vercel adapter and is not being backported to the CLI path these deploy tests use. The suite now sets `skipDeployment` unless `NEXT_ENABLE_ADAPTER` is set, and keeps running in dev and start modes.
The test already carries a TODO documenting frequent failures and a suspected ISR bug, and it fails in deploy mode the same way: the request after the initial one is re-rendered instead of served from the ISR cache. It now also skips in deploy mode, referencing that TODO.
When deployed to Vercel, the nodejs middleware function bundle does not include the project's package.json, so the `/test-node-fs` route fails with `ENOENT: no such file or directory, open '/var/task/package.json'` and returns a 500. The test now asserts that status in deploy mode behind a FIXME, and keeps asserting the file contents elsewhere.
@eps1lon
eps1lon force-pushed the sebbie/15-5-deploy-action-assertions branch from 3d88006 to 60f3952 Compare August 29, 2026 10:55
@eps1lon
eps1lon marked this pull request as ready for review August 30, 2026 11:17
@eps1lon
eps1lon force-pushed the sebbie/15-5-deploy-action-assertions branch from 33124d3 to 0d044d4 Compare August 31, 2026 09:27
@eps1lon
eps1lon merged commit 7f6b400 into next-15-5 Aug 31, 2026
282 of 292 checks passed
@eps1lon
eps1lon deleted the sebbie/15-5-deploy-action-assertions branch August 31, 2026 11:25
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants