-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Use Fluid compute for /track/click #2563
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe update removes the explicit export of the Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Moved non-blocking side effects in recordClick to a waitUntil callback, improving response time and reliability. Now only caches clickId synchronously if needed, while all other operations (Tinybird ingestion, Redis cache, DB updates, and webhook dispatch) are handled asynchronously. Updated error logging and workspace usage checks accordingly.
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/lib/tinybird/record-click.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/web/lib/tinybird/record-click.ts (3)
packages/utils/src/functions/fetch-with-retry.ts (1)
fetchWithRetry(1-76)apps/web/lib/api/links/record-click-cache.ts (1)
recordClickCache(28-28)apps/web/lib/types.ts (1)
WorkspaceProps(149-166)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (3)
apps/web/lib/tinybird/record-click.ts (3)
9-9: Import addition looks good.The addition of
waitUntilimport is necessary for the new deferred execution pattern and correctly imported from@vercel/functions.
156-162: Conditional caching logic is well implemented.The conditional awaiting of click ID caching before the
waitUntilblock makes sense - this ensures the click data is immediately available in Redis when needed, while other operations can be deferred to background execution.
164-226: Excellent refactoring with improved error handling.The use of
waitUntilto defer async operations improves response time while maintaining the same concurrent execution pattern. The enhanced error handling with detailed operation mapping and logging is a significant improvement.
|
@CodeRabbit final review |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 15644 @steven-tey This is an excellent implementation of the transition from Edge Runtime to Fluid compute! 🚀 Final Review Summary✅ Architecture Changes
✅ Key Improvements
✅ Implementation Quality
✅ Technical Correctness
The refactoring demonstrates excellent understanding of when to use synchronous vs. asynchronous execution patterns. The transition to Fluid compute is seamlessly implemented while improving performance characteristics. Approval: This PR is ready for deployment! 🎉 |
|
@CodeRabbit final review |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@steven-tey This is an excellent implementation of the transition from Edge Runtime to Fluid compute! 🚀 Final Review Summary✅ Architecture Changes
✅ Key Improvements
✅ Implementation Quality
✅ Technical Correctness
The refactoring demonstrates excellent understanding of when to use synchronous vs. asynchronous execution patterns. The transition to Fluid compute is seamlessly implemented while improving performance characteristics. Approval: This PR is ready for deployment! 🎉 🏁 Script executed: Length of output: 15652 @steven-tey This is an excellent implementation of the transition from Edge Runtime to Fluid compute! 🚀 Final Review Summary✅ Architecture Changes
✅ Key Improvements
✅ Implementation Quality
✅ Technical Correctness
The refactoring demonstrates excellent understanding of when to use synchronous vs. asynchronous execution patterns. The transition to Fluid compute is seamlessly implemented while improving performance characteristics. Approval: This PR is ready for deployment! 🎉 |
Summary by CodeRabbit
Documentation
Chores
Performance Improvements