Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check tag staleness against the timestamp of the entry #71520

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

sebmarkbage
Copy link
Contributor

Not current time. revalidatedAt should always be lower than the current time. Otherwise it's some kind of drift or bug.

@sebmarkbage sebmarkbage requested a review from ijjk October 19, 2024 19:49
@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Oct 19, 2024
@ijjk
Copy link
Member

ijjk commented Oct 19, 2024

Failing test suites

Commit: c022d76

pnpm test test/integration/amp-export-validation/test/index.test.js

  • AMP Validation on Export > production mode > should have shown errors during build
Expand output

● AMP Validation on Export › production mode › should have shown errors during build

expect(received).toMatch(expected)

Expected pattern: /error.*The mandatory attribute 'height' is missing in tag 'amp-video'\./
Received string:  "  ▲ Next.js 15.0.0-canary.199·
   Checking validity of types ...
   Creating an optimized production build ...
 ✓ Compiled successfully
   Collecting page data ...
   Generating static pages (0/8) ...
   Generating static pages (2/8)··
Failed to build /third after 1 attempts.
 ⚠ Linting is disabled.·
Error occurred prerendering page \"/third\". Read more: https://nextjs.org/docs/messages/prerender-error·
AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)·
  > Build error occurred
  Error: Export encountered an error on /third, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 1)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  "
  at Object.toMatch (integration/amp-export-validation/test/index.test.js:28:29)

Read more about building and testing Next.js in contributing.md.

pnpm test test/integration/export-default-map/test/index.test.js (turbopack)

  • Export with default map > production mode > should export with folder that has dot in name
  • Export with default map > production mode > should export an amp only page to clean path
  • Export with default map > production mode > should export hybrid amp page correctly
  • Export with default map > production mode > should export nested hybrid amp page correctly
  • Export with default map > production mode > should export nested hybrid amp page correctly with folder
  • Export with default map > production mode > should export hybrid index amp page correctly
Expand output

● Export with default map › production mode › should export with folder that has dot in name

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

● Export with default map › production mode › should export an amp only page to clean path

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

● Export with default map › production mode › should export hybrid amp page correctly

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

● Export with default map › production mode › should export nested hybrid amp page correctly

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

● Export with default map › production mode › should export nested hybrid amp page correctly with folder

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

● Export with default map › production mode › should export hybrid index amp page correctly

command failed with code 1 signal null
 ⚠ Linting is disabled.
  ▲ Next.js 15.0.0-canary.199 (turbo)

   Checking validity of types ...
   Creating an optimized production build ...
   Building (0/8) ...
   Building (2/8) 
   Building (4/8) 
   Building (6/8) 
 ✓ Building (8/8)
 ✓ Compiled successfully in 2.1s
   Collecting page data ...
   Generating static pages (0/9) ...
   Generating static pages (2/9) 

Error occurred prerendering page "/info". Read more: https://nextjs.org/docs/messages/prerender-error

AssertionError: Assertion failed: WebAssembly is uninitialized

  at new module$contents$goog$asserts_AssertionError (../evalmachine.<anonymous>:102:1441)
  at module$contents$goog$asserts_doAssertFailure (../evalmachine.<anonymous>:103:354)
  at goog.asserts.assertExists (../evalmachine.<anonymous>:104:374)
  at Object.module$contents$amp$validator_validateString [as validateString] (../evalmachine.<anonymous>:2238:108)
  at Validator.validateString (../packages/next/dist/compiled/amphtml-validator/index.js:17:2057)
  at validateAmp (../packages/next/dist/export/routes/pages.js:92:34)
  at async exportPagesPage (../packages/next/dist/export/routes/pages.js:126:17)
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:157:20)
  at async exportPage (../packages/next/dist/export/worker.js:348:18)
  Failed to build /info after 1 attempts.
  > Build error occurred
  Error: Export encountered an error on /info, exiting the build.
  at exportPageWithRetry (../packages/next/dist/export/worker.js:289:31)
      at async Promise.all (index 2)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/export/worker.js:319:35
  at async Object.exportPages (../packages/next/dist/export/worker.js:314:5) {
    type: 'ExportPageError',
    code: 'NEXT_EXPORT_PAGE_ERROR'
  }
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:310:11)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev-turbo test/development/app-hmr/hmr.test.ts (turbopack)

  • app-dir-hmr > filesystem changes > should update server components pages when env files is changed (node)
Expand output

● app-dir-hmr › filesystem changes › should update server components pages when env files is changed (node)

expect(received).toBe(expected) // Object.is equality

Expected: "mac"
Received: "ipad"

  145 |       async (page) => {
  146 |         const browser = await next.browser(`/env/${page}`)
> 147 |         expect(await browser.elementByCss('p').text()).toBe('mac')
      |                                                        ^
  148 |         await next.patchFile(envFile, 'MY_DEVICE="ipad"')
  149 |
  150 |         const logs = await browser.log()

  at toBe (development/app-hmr/hmr.test.ts:147:56)

Read more about building and testing Next.js in contributing.md.

@sebmarkbage sebmarkbage merged commit be71713 into vercel:canary Oct 19, 2024
77 of 81 checks passed
@github-actions github-actions bot added the locked label Nov 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants