-
Notifications
You must be signed in to change notification settings - Fork 82
fix(cloudflare): avoid fetching settings when inferring zone id #1159
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
Conversation
WalkthroughThe Cloudflare zone module has been refactored to introduce a new public Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (4)📚 Learning: 2025-10-19T21:10:23.073ZApplied to files:
📚 Learning: 2025-10-19T21:10:23.073ZApplied to files:
📚 Learning: 2025-10-19T21:10:23.073ZApplied to files:
📚 Learning: 2025-10-19T21:15:05.076ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
Comment |
commit: |
|
Review me please @coderabbitai |
|
@john-royal I'll review the changes in this PR right away! ✅ Actions performedReview triggered.
|
🚀 Website Preview DeployedYour website preview is ready! Preview URL: https://76e494c9-alchemy-website.alchemy-run.workers.dev This preview was built from commit 625169e 🤖 This comment will be updated automatically when you push new commits to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is AWESOME, I was thinking of making all the Resources that take in a Zone to derive Zone ID, to also be able to infer it from domain name, but I was concerned about too many or too large of API requests for inference
The
getZoneByDomainfunction currently also fetches the zone settings after fetching the zone. This can cause errors when using an OAuth token for authentication — we can read zones but not zone settings for some reason.It turns out that we don't actually need the zone settings to be returned by
getZoneByDomain— the function is only referenced byinferZoneIdFromPattern:Summary by CodeRabbit
Breaking Changes
undefinedinstead ofnullfor non-existent zones.Refactor