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

Network Caching System + Octokit Version Upgrade + Node 18 Upgrade #1167

Merged
merged 7 commits into from
May 31, 2024

Conversation

nickcastel50
Copy link
Contributor

@nickcastel50 nickcastel50 commented May 2, 2024

Satisfies #1166

This PR adds a full network caching system using etags. This ended up being a bit long-winded, because there is a bug in OctoKit where, when using the If-None-Match header and passing an etag, if we are not logged in OctoKit has a bug when returning the response and will crash. Bug is here: octokit/request.js#659

Because of this, I updated to the latest OctoKit which fixed the issue. The caveat here is I also had to upgrade us to Node 18 to use the latest OctoKit, which means we should thoroughly test this before deployment. The latest OctoKit also does not have a native fetch function anymore, so node-fetch was installed as a dev dependency in order to get the jest tests working again, as the GitHub specific tests were failing.

@nickcastel50 nickcastel50 added the bug Something isn't working label May 2, 2024
@nickcastel50 nickcastel50 self-assigned this May 2, 2024
Copy link

netlify bot commented May 2, 2024

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit 5602e8c
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/665a0705c8dd860008b51bf2
😎 Deploy Preview https://deploy-preview-1167--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 17 (no change from production)
Accessibility: 91 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

Copy link

netlify bot commented May 2, 2024

Deploy Preview for bldrs-share-v2 ready!

Name Link
🔨 Latest commit 7109e3e
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share-v2/deploys/66341f66aca56b00081c3f0c
😎 Deploy Preview https://deploy-preview-1167--bldrs-share-v2.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 site configuration.

@pablo-mayrgundter
Copy link
Member

Heya, just checking that this is paused pending the new etag caching?

@nickcastel50 nickcastel50 changed the title Disable Cache on OctoKit Network Caching System May 31, 2024
@nickcastel50 nickcastel50 changed the title Network Caching System Network Caching System + Octokit Version Upgrade + Node 18 Upgrade May 31, 2024
@nickcastel50 nickcastel50 merged commit c452c0f into bldrs-ai:main May 31, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants