Unverified Commit 8df0d97d authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[lts-active][test] Backport various deploy test fixes (#100114)

Backports https://github.com/vercel/next.js/pull/99891
Backports https://github.com/vercel/next.js/pull/99886
Backports test-only hunks from
https://github.com/vercel/next.js/pull/95360

---------
Co-authored-by: 's avatarBenjamin Woodruff ‮ <benjamin.woodruff@vercel.com>
parent ac9afcc3
...@@ -38,5 +38,5 @@ describe('Lazy Module Init', () => { ...@@ -38,5 +38,5 @@ describe('Lazy Module Init', () => {
$ = await next.render$('/serial-client-sync-io') $ = await next.render$('/serial-client-sync-io')
expect($('#id').text().length).toBeGreaterThan(0) expect($('#id').text().length).toBeGreaterThan(0)
}) }, 120_000) // Remote builds and deployments can exceed the default 60s.
}) })
...@@ -57,8 +57,14 @@ function getBuildError(cliOutput: string): string { ...@@ -57,8 +57,14 @@ function getBuildError(cliOutput: string): string {
.replace(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z {2}/, '') .replace(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z {2}/, '')
.trim() .trim()
// The command exit status is not compiler output. // Package-manager and Vercel command failures are not compiler output.
if (/^Error: Command .* exited with \d+$/.test(line)) break if (
/^(?:ELIFECYCLE\s|Error: (?:\[BUILD_UTILS_SPAWN_\d+\] )?Command .* exited with \d+$)/.test(
line
)
) {
break
}
if (capturing) { if (capturing) {
if (line) { if (line) {
......
...@@ -181,8 +181,15 @@ function getBuildOutput(cliOutput: string, isNextDeploy: boolean): string { ...@@ -181,8 +181,15 @@ function getBuildOutput(cliOutput: string, isNextDeploy: boolean): string {
let skipLines = true let skipLines = true
for (const line of cliOutput.split('\n')) { for (const line of cliOutput.split('\n')) {
// The command exit status and inspect metadata are not compiler output. // Package-manager command failures and inspect metadata are not compiler output.
if (isNextDeploy && /^Error: Command .* exited with \d+$/.test(line)) break if (
isNextDeploy &&
/^(?:ELIFECYCLE\s|Error: (?:\[BUILD_UTILS_SPAWN_\d+\] )?Command .* exited with \d+$)/.test(
stripAnsi(line).trim()
)
) {
break
}
if (!skipLines) { if (!skipLines) {
if (line.includes('__next_edge_ssr_entry__')) { if (line.includes('__next_edge_ssr_entry__')) {
lines.push( lines.push(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment