Skip to content

Comments

feat(nimbus): add weekly metric view to popout card#14209

Merged
moibra05 merged 1 commit intomainfrom
14056
Dec 18, 2025
Merged

feat(nimbus): add weekly metric view to popout card#14209
moibra05 merged 1 commit intomainfrom
14056

Conversation

@moibra05
Copy link
Contributor

Because

  • Metric popout cards were missing weekly metric views

This commit

  • Adds a dropdown showing the weekly results of metrics that provide this information

Fixes #14056

@moibra05
Copy link
Contributor Author

image image

@mozcloud-preview-environments

Preview environment has been deployed.

Preview URL: https://pr14209-experimenter.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

@mozcloud-preview-environments

Preview environment has been deployed.

Preview URL: https://pr14209-experimenter.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

1 similar comment
@mozcloud-preview-environments

Preview environment has been deployed.

Preview URL: https://pr14209-experimenter.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

Copy link
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

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

Thank you @moibra05 tested on pr preview, great job, some minor suggestions

Comment on lines 1505 to 1518
window_metric_data[slug] = branch_metrics

return window_metric_data

metric_data = {
"overall": get_window_metric_data(
reference_branch,
self.get_window_results(analysis_basis, segment, "overall"),
"overall",
),
"weekly": get_window_metric_data(
reference_branch,
self.get_window_results(analysis_basis, segment, "weekly"),
"weekly",
Copy link
Contributor

Choose a reason for hiding this comment

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

@moibra05 is there a way we can break it down in smaller methods?

Copy link
Contributor Author

@moibra05 moibra05 Dec 16, 2025

Choose a reason for hiding this comment

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

I broke up the method into several smaller ones and I intend to eventually move them all into their own file. created an issue for this #14212

Comment on lines +1621 to +1630
def get_weekly_dates(self):
weekly_dates = []
if not self.is_rollout:
if self._enrollment_end_date:
date = self._enrollment_end_date
while (date + datetime.timedelta(days=7)) <= self.computed_end_date:
weekly_dates.append((date, date + datetime.timedelta(days=7)))
date += datetime.timedelta(days=7)

return weekly_dates
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah like this clean small method

@mozcloud-preview-environments

Preview environment has been deployed.

Preview URL: https://pr14209-experimenter.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

1 similar comment
@mozcloud-preview-environments

Preview environment has been deployed.

Preview URL: https://pr14209-experimenter.preview.mozilla.cloud

It may take up to 5 minutes for the environment to become available.
If the link doesn't work immediately, please wait a few moments and try again.

You can monitor deployment status in Argo CD.

Copy link
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

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

Thank you @moibra05 logic is in models property, clear breakdown. great job

Comment on lines 753 to 809
@@ -803,6 +801,9 @@ def get_context_data(self, **kwargs):
)

context["relative_metric_changes"] = relative_metric_changes
context["all_weekly_metric_data"] = experiment.get_weekly_metric_data(
analysis_basis, selected_segment, selected_reference_branch
)

return context

Copy link
Contributor

Choose a reason for hiding this comment

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

yes complete simple view

@moibra05 moibra05 added this pull request to the merge queue Dec 18, 2025
Merged via the queue into main with commit 09f0eb2 Dec 18, 2025
18 checks passed
@moibra05 moibra05 deleted the 14056 branch December 18, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-preview preview Create Preview Environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add weekly metric view to popout cards

2 participants