fix(activity-sidebar): remove UAA parity logging#4719
Conversation
WalkthroughThe feed flow now uses UAA file activities directly when enabled, skips V2 feed API calls, removes parity logging, updates sidebar feature-flag wiring, and replaces the removed parity metric with explicit metric constants and types. ChangesUAA Feed Flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ActivitySidebar
participant FeedAPI
participant UAAFileActivities
ActivitySidebar->>FeedAPI: call feedItems with UAA flags
FeedAPI->>UAAFileActivities: fetch file activities
UAAFileActivities-->>FeedAPI: return activities
FeedAPI->>FeedAPI: parse and handle feed items
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…ions service traffic
1596889 to
6a95178
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/api/Feed.js (1)
614-627: 🚀 Performance & Scalability | 🔵 TrivialVerify the traffic reduction before rollout.
Confirm in preview and post-deployment metrics that legacy annotation, comment, task, app-activity, and version requests remain absent for UAA-enabled loads, while
file_activitiessuccess rates remain healthy.As per PR objectives, preview validation and post-deployment traffic verification remain pending.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/api/Feed.js` around lines 614 - 627, Validate the UAA request gating around annotationsPromise, commentsPromise, tasksPromise, appActivityPromise, versionsPromise, and currentVersionPromise in preview and after deployment: confirm these legacy requests are absent for UAA-enabled loads, and verify file_activities success rates remain healthy before completing rollout.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/api/Feed.js`:
- Around line 614-627: Validate the UAA request gating around
annotationsPromise, commentsPromise, tasksPromise, appActivityPromise,
versionsPromise, and currentVersionPromise in preview and after deployment:
confirm these legacy requests are absent for UAA-enabled loads, and verify
file_activities success rates remain healthy before completing rollout.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: af7cc76a-a6fb-452a-b983-1a8628d07132
📒 Files selected for processing (7)
src/api/Feed.jssrc/api/__tests__/Feed.test.jssrc/common/types/logging.jssrc/constants.jssrc/elements/common/logger/Logger.jssrc/elements/content-sidebar/ActivitySidebar.jssrc/elements/content-sidebar/__tests__/ActivitySidebar.test.js
💤 Files with no reviewable changes (3)
- src/constants.js
- src/elements/content-sidebar/ActivitySidebar.js
- src/elements/content-sidebar/tests/ActivitySidebar.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
- src/elements/common/logger/Logger.js
Merge Queue Status
This pull request spent 11 seconds in the queue, including 1 second running CI. Required conditions to merge
|
Summary
compareV2AndUaaFeedItemsparity check that fired the full legacy v2 API fan-out (comments, annotations, tasks, versions, app activity) on every preview load when UAA was enabled, solely for comparison logging!shouldUseUAAso they are never fired when the UAA/file_activitiesendpoint is in useMETRIC_TYPE_UAA_PARITY_METRICconstant and associated logging infrastructure (logAPIParity, Logger special case)Context
When
activityFeed.uaaIntegration.enabledis on, the sidebar renders from the UAA response but still fired ~6 legacy API calls per preview load for parity validation. This added ~12.6MgetCommentscalls/day to the annotations service (~2x its total volume). Parity has been validated and is no longer needed.The original PR which added UAA parity logging is: #3629
Test plan
yarn test src/api/__tests__/Feed.test.js— 138 tests passyarn test src/elements/content-sidebar/__tests__/ActivitySidebar.test.js— 133 tests passyarn test src/elements/common/logger/__tests__/Logger.test.js— 10 tests passyarn flow checkpasses on modified filesSummary by CodeRabbit