Skip to content

Conversation

jugal-chauhan
Copy link
Collaborator

Description

This PR adds a new CaptureReplayDashboard class in capture-replay-dashboard.ts to encapsulate CloudWatch dashboard logic. It enables dynamic loading of dashboard configurations from migrationassistant-capture-replay-dashboard.json, allowing modifications without code changes. It implements stage parameter injection to filter metrics based on the deployment stage, defaulting to 'dev'. It introduces error handling to ensure a fallback to a default configuration if the JSON file is missing or invalid. Additionally, it updates migration-assistance-stack.ts to deploy the dashboard conditionally based on the trafficReplayerServiceEnabled flag in cdk.context.json, supporting more flexible deployment scenarios.

Issues Resolved

MIGRATIONS-2133

Testing

Work in Progress

Check List

  • New functionality includes testing
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@jugal-chauhan
Copy link
Collaborator Author

PR is still under 'work in progress'
Require more clarity on testing this change

Copy link
Collaborator

@lewijacn lewijacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check my comments, I mentioned some ways to minimize the code here and keep a consistent pattern

@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 664a58f to daeaf92 Compare March 6, 2025 22:48
@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from daeaf92 to 2c5e785 Compare March 6, 2025 23:51
@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 2c5e785 to 22ee56b Compare March 6, 2025 23:58
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.91%. Comparing base (342d7df) to head (7f8b731).
Report is 74 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1322      +/-   ##
============================================
+ Coverage     79.45%   79.91%   +0.46%     
+ Complexity     3224     2977     -247     
============================================
  Files           459      443      -16     
  Lines         16837    16217     -620     
  Branches       1109     1087      -22     
============================================
- Hits          13377    12960     -417     
+ Misses         2790     2617     -173     
+ Partials        670      640      -30     
Flag Coverage Δ
unittests 79.91% <ø> (+0.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 22ee56b to 7b50f93 Compare March 7, 2025 00:22
@jugal-chauhan
Copy link
Collaborator Author

Tested the dashboard on my account with a simple end to end migration. Screenshots attached below.
Please do review these widgets
CnRDashboard_ss1
CnRDashboard_ss2

Copy link
Collaborator

@lewijacn lewijacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for simplifying this, added a couple more comments for things I noticed

@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 07068af to bf53f8e Compare March 10, 2025 17:24
Signed-off-by: Jugal Chauhan <[email protected]>
Copy link
Collaborator

@lewijacn lewijacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a couple checks are failing, one for CDK tests and one for Jenkins deployment. The fix I mentioned should help with Jenkins deployment but CDK tests will probably need to be updated

@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 99a315d to 5c766a3 Compare March 19, 2025 18:17
@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 5c766a3 to 91bb697 Compare March 19, 2025 18:18
@jugal-chauhan
Copy link
Collaborator Author

The Capture and Replay Dashboard upon CDK deployment looks like this. Screenshots have been pasted below.
capture-replay-dashboard-ss1
capture-replay-dashboard-ss2

Signed-off-by: Jugal Chauhan <[email protected]>
@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 91bb697 to 7fad58b Compare March 19, 2025 18:35
Signed-off-by: Jugal Chauhan <[email protected]>
@jugal-chauhan jugal-chauhan force-pushed the feature/capture-replay-dashboard branch from 94753ce to 7f8b731 Compare March 19, 2025 21:22
Copy link
Collaborator

@lewijacn lewijacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for all the changes!

@jugal-chauhan jugal-chauhan merged commit cb34d83 into opensearch-project:main Mar 19, 2025
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants