hotfix: restore internal tutorials on /developers/tutorials/#18165
Merged
Conversation
`unstable_cache` with a finite `revalidate` opts every consuming page into ISR. App-router pages that also read `public/content/` (e.g. the developers hub, blog listing) then break on Netlify when the serverless re-render runs without those files in the function bundle, silently caching empty data. Drop the revalidating `getGitHubContributors` wrapper and route `getAppPageContributorInfo` through `getStaticGitHubContributors`. The upstream Trigger.dev job refreshes contributor data weekly, so the daily revalidate was overhead anyway -- contributors now refresh on deploy.
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Guard against the regression where ISR re-renders the page in Netlify's serverless runtime, fs.readFile of public/content/ fails, and internalTutorials silently collapses to []. External tutorials would keep rendering from their static JSON, so the test asserts both sources independently. When this suite runs against a deploy preview (PLAYWRIGHT_TEST_BASE_URL set in .github/workflows/tests.yml), it exercises the same serverless render path that hides the bug locally.
58aed09 to
8570abc
Compare
wackerow
approved these changes
May 11, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
The internal tutorials list on https://ethereum.org/developers/tutorials/ is empty in production — the SSR HTML ships
\"internalTutorials\":[]. Same on staging and dev.Root cause
getTutorialsData(src/lib/utils/md.ts) switched from dynamicimport()tofsp.readFile(public/content/...)in #b8af05174d (Apr 1) to keep Turbopack from tracing 143k locale markdown files.app/[locale]/developers/tutorials/page.tsx) also callsgetAppPageContributorInfo, which goes throughgetGitHubContributors— wrapped withunstable_cache+revalidate: 1 day. That opts the page into ISR.public/content/is not innetlify.toml[functions] included_files, sofsp.readFilethrows ENOENT for every tutorial slug. Thecatchblock swallows it and returnsnull→ filter strips them → empty array → silently cached for the next 24h.This is the exact failure mode documented in
docs/solutions/integration-issues/netlify-isr-404-async-server-components.md. The pre-Apr-1 dynamicimport()baked markdown into webpack chunks, masking the ISR/public/contentmismatch.Fix
Drop the revalidating
getGitHubContributorswrapper and routegetAppPageContributorInfothroughgetStaticGitHubContributors(norevalidate). Pages stay statically rendered with tutorial content baked in at build time. The upstream Trigger.dev job refreshes contributor data weekly, so daily revalidation was overhead anyway — contributors now refresh on deploy.Cherry-picked from
d841f7a3c9(originally on draft PR #18146).E2E run: https://github.com/ethereum/ethereum-org-website/actions/runs/25671352238
Test plan
/developers/tutorials/shows internal tutorials (the bug is invisible innext devandnext start— only the serverless re-render path exposes it)\"internalTutorials\":[…]is non-empty in the SSR payload/developers/tutorials/,/developers/,/apps/, etc.