[next] Fix deploying with cached build (#9555)

This leverages the relative app dir field in the required files manifest when available so that we don't rely on absolute paths from a cached build since the cache can be restored in a separate context where the value no longer applies.

x-ref: https://github.com/vercel/next.js/pull/45864
x-ref: https://github.com/vercel/next.js/pull/46393
x-ref: https://github.com/vercel/next.js/discussions/39432#discussioncomment-4914549
x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1675821643786319)
This commit is contained in:
JJ Kasper
2023-02-24 18:46:06 -08:00
committed by GitHub
parent 3a65acfb32
commit 53cab61e88
18 changed files with 378 additions and 24 deletions

View File

@@ -283,7 +283,7 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
assert(hadTest, 'probe must have a test condition');
}
async function testDeployment(fixturePath) {
async function testDeployment(fixturePath, opts) {
const projectName = path
.basename(fixturePath)
.toLowerCase()
@@ -348,7 +348,8 @@ async function testDeployment(fixturePath) {
projectName,
bodies,
randomness,
uploadNowJson
uploadNowJson,
opts
);
const probeCtx = {};