-
Notifications
You must be signed in to change notification settings - Fork 87
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: data plane events buffer on load option flag #1997
base: develop
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request introduces refactoring in two key analytics-related classes: Changes
Possibly related PRs
Suggested reviewers
📜 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 (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1997 +/- ##
===========================================
+ Coverage 61.36% 61.37% +0.01%
===========================================
Files 478 478
Lines 16393 16398 +5
Branches 3239 3242 +3
===========================================
+ Hits 10060 10065 +5
- Misses 5100 5127 +27
+ Partials 1233 1206 -27 ☔ View full report in Codecov by Sentry. |
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: 0
🧹 Nitpick comments (1)
packages/analytics-js/src/components/eventRepository/EventRepository.ts (1)
125-130
: Consider a more descriptive variable name.The variable
shouldBufferDpEvents
could be more descriptive to better reflect its specific purpose.- const shouldBufferDpEvents = bufferEventsUntilReady && hybridDestExist; + const shouldBufferForHybridDestinations = bufferEventsUntilReady && hybridDestExist;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/analytics-js/src/components/core/Analytics.ts
(2 hunks)packages/analytics-js/src/components/eventRepository/EventRepository.ts
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Security and code quality checks
- GitHub Check: Unit Tests and Lint
- GitHub Check: Bundle size checks
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
packages/analytics-js/src/components/eventRepository/EventRepository.ts (3)
119-121
: LGTM! Appropriate condition for starting data plane events queue.The condition correctly initiates the data plane events queue when pre-consent buffering is not required.
Line range hint
124-152
: LGTM! Well-structured queue management implementation.The method effectively consolidates the data plane events queue management logic with appropriate buffering conditions and safety timeout mechanism.
156-164
: LGTM! Consistent use of centralized queue management.The resume method correctly uses the new startDpEventsQueue method while maintaining existing queue clearing logic.
packages/analytics-js/src/components/core/Analytics.ts (2)
294-296
: LGTM! Good extraction of active destinations setup.The code organization is improved by moving the active destinations setup to a dedicated method.
304-312
: LGTM! Well-encapsulated active destinations setup.The new method effectively encapsulates the plugin invocation logic for setting active destinations, promoting code reuse and maintainability.
size-limit report 📦
|
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
|
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
PR Description
Please include a summary of the change along with the relevant motivation and context.
Linear task (optional)
https://linear.app/rudderstack/issue/SDK-2862/buffer-data-plane-events-until-ready
Cross Browser Tests
Please confirm you have tested for the following browsers:
Sanity Suite
Security
Summary by CodeRabbit