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

fix: correctly disable ISR disk flushing #1190

Merged
merged 2 commits into from
Feb 3, 2022
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Feb 3, 2022

Summary

We need to patch the Next server source file because Next doesn't allow non-Vercel hosts to disable flushing of ISR pages to disk. In a recent update, the code in question was moved from next-server to base-server, meaning that the patch was not applied. This meant that ISR pages were serving the original built files rather than the updated version. This caused #1189 and possibly #1162.

This PR makes the patching process more robust, and introduces tests to ensure the patching is working in future

Test plan

  1. Visit the Deploy Preview
  2. Wait for a minute
  3. Visit deploy preview again and ensure that the time has updated to near the current time, and not reverted to the build time

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Possibly #1189 and #1162, but I'm not going to auto-close until the fix is confirmed.

capybara

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for netlify-plugin-nextjs-demo ready!

🔨 Explore the source changes: c934ad1

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/61fbc0243c301700088777e8

😎 Browse the preview: https://deploy-preview-1190--netlify-plugin-nextjs-demo.netlify.app

@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

🔨 Explore the source changes: c934ad1

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/61fbc024e461300007c51ce7

😎 Browse the preview: https://deploy-preview-1190--netlify-plugin-nextjs-static-root-demo.netlify.app

@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

🔨 Explore the source changes: c934ad1

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/61fbc02402cefb0007c49a7c

😎 Browse the preview: https://deploy-preview-1190--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app

@github-actions github-actions bot added the type: chore work needed to keep the product and development running smoothly label Feb 3, 2022
@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for netlify-plugin-nextjs-export-demo ready!

🔨 Explore the source changes: c934ad1

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/61fbc024ce42e70008ed9cc8

😎 Browse the preview: https://deploy-preview-1190--netlify-plugin-nextjs-export-demo.netlify.app

@cypress
Copy link

cypress bot commented Feb 3, 2022



Test summary

2 0 0 0


Run details

Project netlify-plugin-nextjs-nx-monorepo-demo
Status Passed
Commit bb571b6 ℹ️
Started Feb 3, 2022 11:54 AM
Ended Feb 3, 2022 11:56 AM
Duration 01:10 💡
OS Linux Ubuntu - 20.04
Browser Chrome 97

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Feb 3, 2022



Test summary

7 0 0 0


Run details

Project netlify-plugin-nextjs-static-demo
Status Passed
Commit bb571b6 ℹ️
Started Feb 3, 2022 11:55 AM
Ended Feb 3, 2022 11:56 AM
Duration 01:20 💡
OS Linux Ubuntu - 20.04
Browser Chrome 97

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Feb 3, 2022



Test summary

17 0 0 0


Run details

Project netlify-plugin-nextjs-default-demo
Status Passed
Commit bb571b6 ℹ️
Started Feb 3, 2022 11:54 AM
Ended Feb 3, 2022 11:56 AM
Duration 01:32 💡
OS Linux Ubuntu - 20.04
Browser Chrome 97

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ascorbic ascorbic changed the title chore: add blocking ISR demo fix: correctly patch source bundles Feb 3, 2022
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Feb 3, 2022
@ascorbic ascorbic removed the type: chore work needed to keep the product and development running smoothly label Feb 3, 2022
@ascorbic ascorbic self-assigned this Feb 3, 2022
@ascorbic ascorbic requested a review from tiffafoo February 3, 2022 11:52
@ascorbic ascorbic marked this pull request as ready for review February 3, 2022 11:53
@ascorbic ascorbic changed the title fix: correctly patch source bundles fix: correctly disable ISR disk flushing Feb 3, 2022
@kodiakhq kodiakhq bot merged commit e8067bf into main Feb 3, 2022
@kodiakhq kodiakhq bot deleted the mk/add-blocking-isr branch February 3, 2022 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants