sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.7k stars 111 forks source link

Handle partial failure in ISR revalidation #410

Closed conico974 closed 1 month ago

conico974 commented 1 month ago

This PR improve ISR revalidation.

Right now if a revalidation of a page fails for any reason, the page will have to wait for the 5 min deduplication window before attempting any revalidation again. And in a batch if the first one fails with an exception, all the other route in the batch will also have to wait for this 5 min dedup window.

This PR handles partial failures, and if properly set in IAC, the failed route will automatically retry every 30 seconds.

This also fix an issue with HEAD request not having the fix applied for all the ISR headers in non streaming and so revalidation ISR request were cached in the CDN, which could also cause the 5 min dedup window issue

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 11:59am
changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 9174006b0a6f79ee09b6f120fd9cb9f87188a587

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ---------------- | ----- | | open-next | Patch | | app-pages-router | Patch | | app-router | Patch | | tests-unit | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR