Skip to content
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

Set default_granularity properly for nested metrics #304

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Jul 3, 2024

Description

Previously, this transformation was not setting default granularity properly for metrics with input metrics (i.e., derived & ratio metrics). This is because Metric.measure_references only gets the top-level measures, not nested measures from input metrics. This PR fixes that bug by utilizing PydanticMetric.all_input_measures_for_metric() instead.
Note that this feature (default_granularity) has not been released yet so no customers should be impacted by this bug.

Checklist

Copy link
Contributor

@WilliamDee WilliamDee left a comment

Choose a reason for hiding this comment

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

Should we make it so that that method shows all measures for derived metrics? I would think it might break something tho

@courtneyholcomb
Copy link
Contributor Author

Should we make it so that that method shows all measures for derived metrics? I would think it might break something tho

@WilliamDee 🤔 doesn't it do that already?? That's why this fix worked!

@WilliamDee
Copy link
Contributor

Should we make it so that that method shows all measures for derived metrics? I would think it might break something tho

@WilliamDee 🤔 doesn't it do that already?? That's why this fix worked!

nvm i mixed it with the other function (all_input_measures_for_metric) you created!

@courtneyholcomb courtneyholcomb merged commit 7e65636 into main Jul 3, 2024
22 checks passed
@courtneyholcomb courtneyholcomb deleted the court/default-grain-nested branch July 3, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants