-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: UsagePulse initialisation flow #38555
Conversation
Warning Rate limit exceeded@hetunandu has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 25 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThis pull request introduces a comprehensive enhancement to the application's analytics state management. The changes span multiple files, focusing on adding new action creators, Redux constants, reducers, and selectors related to segment initialization. The modifications enable more granular tracking of analytics events, specifically around the initialization state of segment tracking, with improved error handling and state management. Changes
Sequence DiagramsequenceDiagram
participant User
participant App
participant FeatureFlags
participant SegmentTracker
User->>App: Initiates Application
App->>FeatureFlags: Fetch Feature Flags
FeatureFlags-->>App: Feature Flags Loaded
App->>SegmentTracker: Initialize Tracking
alt Successful Initialization
SegmentTracker-->>App: Segment Init Success
App->>App: Dispatch segmentInitSuccess
else Uncertain Initialization
SegmentTracker-->>App: Segment Init Uncertain
App->>App: Dispatch segmentInitUncertain
end
Possibly related PRs
Suggested Labels
Suggested Reviewers
Poem
Finishing Touches
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
Documentation and Community
|
/build-deploy-preview |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/12687719287. |
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.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/client/src/actions/analyticsActions.ts
(1 hunks)app/client/src/ce/constants/ReduxActionConstants.tsx
(1 hunks)app/client/src/ce/reducers/index.tsx
(2 hunks)app/client/src/ce/reducers/uiReducers/index.tsx
(2 hunks)app/client/src/ce/sagas/userSagas.tsx
(4 hunks)app/client/src/reducers/uiReducers/analyticsReducer.ts
(1 hunks)app/client/src/selectors/analyticsSelectors.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-lint / client-lint
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-prettier / prettier-check
- GitHub Check: client-build / client-build
🔇 Additional comments (9)
app/client/src/selectors/analyticsSelectors.ts (1)
1-4
: LGTMThe selector function is correctly implemented.
app/client/src/actions/analyticsActions.ts (1)
1-8
: LGTMThe action creators are properly defined.
app/client/src/reducers/uiReducers/analyticsReducer.ts (2)
4-13
: LGTM! Clean type definitions and state structure.The type definitions and initial state setup follow Redux best practices with proper TypeScript types.
15-34
: LGTM! Well-structured reducer handlers.The handlers correctly maintain immutability and properly update the segment state.
app/client/src/ce/reducers/uiReducers/index.tsx (2)
42-42
: LGTM! Clean import statement.The analytics reducer import is properly placed with other reducer imports.
52-52
: LGTM! Proper reducer integration.The analytics reducer is correctly added to the UI reducer object.
app/client/src/ce/reducers/index.tsx (2)
67-67
: LGTM! Proper type import.The AnalyticsReduxState type import is correctly placed.
98-98
: LGTM! Clean state interface update.The analytics state is properly typed in the AppState interface.
app/client/src/ce/constants/ReduxActionConstants.tsx (1)
1219-1220
: LGTM! Clear action type definitions.The segment initialization action types follow the established naming convention and are properly placed in the AnalyticsActionTypes object.
🔴🔴🔴 Cyclic Dependency Check: This PR has increased the number of cyclic dependencies by 2, when compared with the release branch. Refer this document to identify the cyclic dependencies introduced by this PR. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Deploy-Preview-URL: https://ce-38555.dp.appsmith.com |
🔴🔴🔴 Cyclic Dependency Check: This PR has increased the number of cyclic dependencies by 2, when compared with the release branch. Refer this document to identify the cyclic dependencies introduced by this PR. |
1 similar comment
🔴🔴🔴 Cyclic Dependency Check: This PR has increased the number of cyclic dependencies by 2, when compared with the release branch. Refer this document to identify the cyclic dependencies introduced by this PR. |
@hetunandu i am able to see the usage pulse when i am try to access it anonymously but for the logged in user i am unable to see the usage pulse in deployed mode |
This looks good we can go ahead |
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.
nicely done
We are going to fix the increase of cycle dependencies in another PR #38559 |
Description
Ensures we wait for correct events before we send the usage pulse.
Fixes https://github.com/appsmithorg/cloud-services/issues/1839
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12687921698
Commit: 63be981
Cypress dashboard.
Tags:
@tag.Sanity
Spec:
Thu, 09 Jan 2025 11:27:39 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Release Notes
New Features
Technical Improvements
Performance