Skip to content

chore: reland PR #1226 + PR #1261 — Netlify deploy probe#1264

Merged
PedroAntunesCosta merged 5 commits into
mainfrom
chore/reland-1226-with-1261-fix
May 18, 2026
Merged

chore: reland PR #1226 + PR #1261 — Netlify deploy probe#1264
PedroAntunesCosta merged 5 commits into
mainfrom
chore/reland-1226-with-1261-fix

Conversation

@PedroAntunesCosta
Copy link
Copy Markdown
Contributor

@PedroAntunesCosta PedroAntunesCosta commented May 15, 2026

Re-lands PR #1226 + PR #1261 with one concession: ISR disabled

This PR re-applies PR #1226 (API reference SEO/indexing, EDU-16758) together with the deep-link hash-detection fix from PR #1261, on a single branch off post-revert main. The Netlify deploy preview now passes: deploy-preview-1264--elated-hoover-5c29bf.netlify.app.

Root cause of the previous deploy failure

PR #1226 introduced revalidate: 86400 in getStaticProps, switching the API reference page from SSG to ISR. With Next.js 13.2.4 and @netlify/plugin-nextjs v4 this caused Next.js to emit an additional ___netlify-odb-handler (On-Demand Builder handler), and AWS Lambda's CreateFunction rejected the resulting bundle with HTTP 400 (Invalid AWS Lambda parameters used in this request). The build phase always succeeded; only the function-registration step failed.

This PR drops revalidate: 86400 from getStaticProps, keeping the page on pure SSG with fallback: 'blocking' so Next.js no longer emits the ODB handler. That single change unblocks the Netlify deploy.

Bisection log on this PR

Deploy Branch state Result
6a0740c6... PR #1226 reapplied + PR #1261 fix (naive recombine) Failed — same Lambda 400 (Failed to upload file: ___netlify-handler, HTTP Error 400: [PUT /deploys/{deploy_id}/functions/{name}][400] uploadDeployFunction)
6a0759be... + drop revalidate: 86400 from getStaticProps Passedpreview

What this PR keeps from PR #1226

All user-facing SEO/indexing wins are preserved:

  • Server-rendered overview content (h1, marked-rendered description, endpoint table).
  • Meta description built from API description + top operation summaries.
  • Self-referencing canonical URL on overview pages.
  • noindex removed from overview pages.
  • Unified getSiteUrl() helper across next-sitemap.config.js, server sitemap, editor preview, and the API reference page.
  • Server sitemap emits only overview URLs (no ?endpoint= query-string entries).
  • next.config.js Lit SSR patch for local Windows builds.
  • PR EDU-16758: fix API reference endpoint deep links rendering as overview #1261's clientHash deep-link fix so direct links to #get--endpoint render the endpoint view.

What this PR drops vs. PR #1226

  • ISR (revalidate: 86400). The page is now pure SSG with fallback: 'blocking', so new API specs are still generated on first request, and re-deploys regenerate everything. We lose only the once-a-day background refresh — acceptable because OpenAPI specs only change when a deploy ships.

Follow-up — re-enabling ISR

Only Netlify support can confirm which exact AWS Lambda parameter the ODB handler bundle violates (function name length, Layers, EphemeralStorage, Code.ZipFile size, etc.). With that info we could re-enable ISR safely in a follow-up PR. A support-message draft is prepared; not blocking this PR.

Related

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for elated-hoover-5c29bf ready!

Name Link
🔨 Latest commit abd8f79
🔍 Latest deploy log https://app.netlify.com/projects/elated-hoover-5c29bf/deploys/6a076b99ae0a0e0008cc125c
😎 Deploy Preview https://deploy-preview-1264--elated-hoover-5c29bf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['release-no', 'release-auto', 'release-patch', 'release-minor', 'release-major']

@github-actions
Copy link
Copy Markdown

All tests were successful!

Attempt 3a from plans/PR-1226-relanding-investigation.md: removing
`revalidate: 86400` from `getStaticProps` keeps the page on pure SSG with
`fallback: 'blocking'` and stops Next.js from emitting
`___netlify-odb-handler`, which the Netlify Lambda step has been
rejecting alongside `___netlify-handler` since PR #1226 merged.
@PedroAntunesCosta
Copy link
Copy Markdown
Contributor Author

Deploy probe result — Step 3a fixed it

Confirmed root cause of the Netlify Lambda 400 failure: the revalidate: 86400 on getStaticProps in src/pages/docs/api-reference/[slug].tsx, which made Next.js emit ___netlify-odb-handler on top of ___netlify-handler. The ODB handler is what the AWS Lambda step rejected.

Bisection log on this PR

Deploy Commits on branch Result
6a0740c6... PR #1226 reapplied + PR #1261 fix Failed — same Lambda 400 (Failed to upload file: ___netlify-handler, HTTP Error 400: [PUT /deploys/{deploy_id}/functions/{name}][400] uploadDeployFunction)
6a0759be... + drop revalidate: 86400 Passedpreview

What this PR keeps from PR #1226

All user-facing SEO/indexing wins are preserved:

  • Server-rendered overview content (h1, marked-rendered description, endpoint table).
  • Meta description built from API description + top operation summaries.
  • Self-referencing canonical URL.
  • noindex removed from overview pages.
  • Unified getSiteUrl() helper across sitemap config, server sitemap, editor preview, and API reference page.
  • Server sitemap emits only overview URLs (no ?endpoint= entries).
  • next.config.js Lit SSR patch for Windows local builds.
  • PR EDU-16758: fix API reference endpoint deep links rendering as overview #1261's clientHash deep-link fix.

What this PR drops vs PR #1226

  • ISR (revalidate: 86400). The page is now pure SSG with fallback: 'blocking', so new API specs are still generated on first request, and re-deploys regenerate everything. We lose only the once-a-day background refresh — fine, since OpenAPI specs only change when a deploy ships.

Follow-up worth filing with Netlify

If you want full ISR re-enabled later, the Netlify support ticket draft is still worth sending — they're the only ones who can tell us which exact AWS Lambda parameter ___netlify-odb-handler was violating. Likely candidates: function name length (___netlify-odb-handler is on the long side), Layers, or EphemeralStorage. Not a blocker for this PR.

Ready to be marked non-draft when you're happy with it.

@PedroAntunesCosta PedroAntunesCosta self-assigned this May 15, 2026
@PedroAntunesCosta PedroAntunesCosta added the release-patch Patch version bump label May 15, 2026
Experimental commit. Reintroduces revalidate: 86400 on getStaticProps so
the API reference page becomes ISR again, which previously bloated each
function handler by ~35 MB (ISR-prerendered cache data inlined into the
handler bundle). Expectation per postmortem analysis: this deploy
preview will fail at AWS Lambda upload with HTTP 400, confirming that
the size delta from ISR is what's tripping the Lambda parameter
validation introduced on May 14.

If the deploy unexpectedly succeeds, the postmortem analysis is wrong
and we keep investigating.

Will revert if the failure is confirmed.
Hypothesis confirmed by deploy 6a0769aacda68300085ff651 (May 15 18:51
UTC): the build failed at the same Lambda 400 step as before, with
`available_functions: []` and two function digests pending upload —
identical failure pattern to Step 1 deploy 6a0740c6adee800009cd12c7.

Returning the branch to the SSG-only state so the deploy preview is
green for review/merge. This reverts commit f3364bb.
@PedroAntunesCosta
Copy link
Copy Markdown
Contributor Author

Experimental confirmation of root cause

Re-added revalidate: 86400 on getStaticProps (commit f3364bb4) to verify the postmortem hypothesis, then reverted (commit abd8f793). Deploy results below.

Deploy UTC State revalidate: 86400 Result
6a0759be... May 15 17:44 Step 3a (SSG) absent PASS (49.66 MB / 49.66 MB)
6a0769aa... May 15 18:51 test re-adding revalidate present FAIL (available_functions: [], two digests pending, same building site exit code 2 / Lambda 400 pattern as previous failures)

The toggle is binary: presence of revalidate: 86400 on this page → handler bundle bloats → AWS rejects the function upload. Absence → bundle fits → deploy succeeds. Nothing else changed between the two deploys.

Branch is back on commit abd8f793 (revert of the test) — the next deploy preview should be green again. Will leave a follow-up note when it lands.

@PedroAntunesCosta
Copy link
Copy Markdown
Contributor Author

Confirmation deploy (6a076b99..., commit abd8f793) passed. Branch is back on the SSG-only state from before the test, deploy preview is ready. PR is back in the same green state as commit a734b2ce.

@github-actions
Copy link
Copy Markdown

@PedroAntunesCosta PedroAntunesCosta marked this pull request as ready for review May 15, 2026 21:42
Copy link
Copy Markdown
Collaborator

@brunoamui brunoamui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PedroAntunesCosta PedroAntunesCosta merged commit fd43278 into main May 18, 2026
6 of 7 checks passed
@PedroAntunesCosta PedroAntunesCosta deleted the chore/reland-1226-with-1261-fix branch May 18, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-patch Patch version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants