Skip to content

Conversation

NeerajGartia21
Copy link
Contributor

Resolves #14669

CC: @beorn7 @charleskorn

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

Could you please add some tests that cover this change?

@beorn7
Copy link
Member

beorn7 commented Jan 29, 2025

Could you please add some tests that cover this change?

Rather than writing fairly involved tests for that right now, let's first implement #15794 .

(But I also don't want to block this PR waiting for it.)

@NeerajGartia21
Copy link
Contributor Author

Could you please add some tests that cover this change?

As of now we can only test that there is a warning. We cannot test the actual warn message. Although I can attach Screenshot of the warning message ( for a failing test ).

@beorn7
Copy link
Member

beorn7 commented Jan 29, 2025

I mean, you could write a conventional unit test for this, not using the testing framework. But I think this work should better be invested in solving #15794 .

This is not touching the actual result, it's just about an annotations. Your change is surely not making things worse, so I'm fine to merge this without test. You should probably add a comment to add an explicit test once #15794 is resolved.

(BTW: I still have to look at the actual code here. It's on my list…)

@NeerajGartia21
Copy link
Contributor Author

I mean, you could write a conventional unit test for this, not using the testing framework. But I think this work should better be invested in solving #15794 .

Ah, I forgot that conventional tests can be added as well :)

This is not touching the actual result, it's just about an annotations. Your change is surely not making things worse, so I'm fine to merge this without test. You should probably add a comment to add an explicit test once #15794 is resolved.

Yeah, I'll add a comment. Don't we need to do that for almost all the eval_warn? (to have better tests)

@beorn7
Copy link
Member

beorn7 commented Jan 30, 2025

Don't we need to do that for almost all the eval_warn? (to have better tests)

In principle yes, but this case here might be particularly important because we had a problem before.

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

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

Looks good otherwise.

Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
@beorn7 beorn7 merged commit 8be416a into prometheus:main Feb 1, 2025
26 checks passed
charleskorn added a commit to grafana/mimir that referenced this pull request Mar 12, 2025
* Upgrade mimir-prometheus

* Bring in upstream test changes

* Apply change to match prometheus/prometheus#15974

* Remove test case added in upstream in prometheus/prometheus#15975

* Add tests for case where range vector selectors and subqueries have 0 range

Brings in change from #10586

* Update `sort` and `sort_desc` behaviour to match prometheus/prometheus#15964

* Add support for native histograms to `irate` and `idelta` to match prometheus/prometheus#15853

* Adjust test cases to match support for native histograms in `irate` and `idelta`

* Change binop annotations to match behaviour in prometheus/prometheus#15895

* Ignore incompatible schemas between the first and second point in `rate` and `increase` if the second point is a reset (prometheus/prometheus#15902)

* Adjust annotation test cases to match new behaviour introduced in previous commit

* Disable tests failing due to prometheus/prometheus#16199

* Add changelog entry

* Update `TestQuerySharding_FunctionCorrectness` to reflect changes in prometheus/prometheus#15964
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.

Annotations for incompatible native histogram operations with binary operators have confusing message
3 participants