Repository navigation
[test] Fix 15.5.x deploy tests - #97977
Merged
Merged
Conversation
Contributor
Failing CI jobsCommit: 0d044d4 | About building and testing Next.js |
eps1lon
marked this pull request as ready for review
August 27, 2026 12:49
lukesandberg
approved these changes
Aug 27, 2026
eps1lon
marked this pull request as draft
August 27, 2026 18:17
eps1lon
changed the base branch from
next-15-5
to
sebbie/new-test-backport/15-5
August 28, 2026 14:18
eps1lon
force-pushed
the
sebbie/15-5-deploy-action-assertions
branch
from
August 28, 2026 14:18
f5057c7 to
da835f6
Compare
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
force-pushed
the
sebbie/15-5-deploy-action-assertions
branch
from
August 29, 2026 08:31
da835f6 to
3d88006
Compare
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
force-pushed
the
sebbie/15-5-deploy-action-assertions
branch
from
August 29, 2026 10:55
3d88006 to
60f3952
Compare
eps1lon
marked this pull request as ready for review
August 30, 2026 11:17
eps1lon
force-pushed
the
sebbie/15-5-deploy-action-assertions
branch
from
August 31, 2026 09:27
33124d3 to
0d044d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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; withboundary=testthe deployed app returns the expected 404 with thex-nextjs-action-not-foundheader.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 404metadata: prerendered metadata routes are served on Vercel as static files with the platform defaultmax-age=0, must-revalidateinstead 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-fsfails 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:
test/e2e/app-dir/segment-cache/directory: timeouts andact()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 #91353app-staticforce-static revalidation: already carries a TODO about a suspected ISR bug; now also skipped in deploy mode, referencing that TODO.server-actions-redirect-middleware-rewriteis a legit bug caused by #96011.app-custom-routesis broken due to bot challenges. Filed a ticket that hopefully resolves that issue: https://vercel.slack.com/archives/C02K2HCH5V4/p1788175011380479