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

ref/tests(metrics_extraction): Reduce changes when adjusting spec versions #63947

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Jan 26, 2024

We're adding a new spec version for widgets in #63774, this change will make the diff easier when adding and removing spec versions for both alerts and widgets.

@armenzg armenzg self-assigned this Jan 26, 2024
@armenzg armenzg changed the title tests(metrics_extraction): Reduce changes when adjusting spec versions ref/tests(metrics_extraction): Reduce changes when adjusting spec versions Jan 26, 2024
@armenzg armenzg force-pushed the ref/test_changes/metrics_extraction/armenzg branch from 01f39f0 to 820bdbb Compare January 26, 2024 14:59
@@ -122,14 +122,17 @@ def test_get_metric_extraction_config_single_alert(default_project: Project) ->
config = get_metric_extraction_config(default_project)

assert config
assert len(config["metrics"]) == 1
Copy link
Member Author

Choose a reason for hiding this comment

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

In this PR, I'm removing all instances of checking for the length of the metrics if we check for the contents of it right after.

@@ -122,14 +122,17 @@ def test_get_metric_extraction_config_single_alert(default_project: Project) ->
config = get_metric_extraction_config(default_project)

assert config
assert len(config["metrics"]) == 1
assert config["metrics"][0] == {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm removing accessing indices from config metrics to make diffs easier when adjusting the number of specs.

@armenzg armenzg marked this pull request as ready for review January 26, 2024 15:00
@armenzg armenzg requested a review from a team as a code owner January 26, 2024 15:00
@armenzg armenzg merged commit c3062fe into master Jan 26, 2024
46 checks passed
@armenzg armenzg deleted the ref/test_changes/metrics_extraction/armenzg branch January 26, 2024 15:22
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants