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

Add Error method for step evaluators #2223

Merged
merged 1 commit into from
Jun 18, 2020

Conversation

adityacs
Copy link
Contributor

@adityacs adityacs commented Jun 16, 2020

What this PR does / why we need it:
Adds Error method for step evaluators

Which issue(s) this PR fixes:
Fixes #2208

Checklist

  • Tests updated

@adityacs
Copy link
Contributor Author

@cyriltovena Kindly review this. I will add the tests if the changes made are fine.

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2020

Codecov Report

Merging #2223 into master will increase coverage by 0.06%.
The diff coverage is 73.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2223      +/-   ##
==========================================
+ Coverage   62.14%   62.21%   +0.06%     
==========================================
  Files         154      154              
  Lines       12457    12493      +36     
==========================================
+ Hits         7741     7772      +31     
- Misses       4108     4113       +5     
  Partials      608      608              
Impacted Files Coverage Δ
pkg/logql/sharding.go 59.79% <50.00%> (-0.65%) ⬇️
pkg/logql/step_evaluator.go 66.66% <66.66%> (-2.57%) ⬇️
pkg/logql/evaluator.go 92.10% <84.61%> (-0.62%) ⬇️
pkg/logql/engine.go 91.39% <100.00%> (+1.39%) ⬆️
pkg/logql/matrix.go 100.00% <100.00%> (ø)
pkg/logql/range_vector.go 97.70% <100.00%> (+0.05%) ⬆️
pkg/logql/series_extractor.go 94.59% <100.00%> (+0.30%) ⬆️
pkg/querier/queryrange/downstreamer.go 95.87% <0.00%> (-2.07%) ⬇️
... and 2 more

@cyriltovena
Copy link
Contributor

Yep looks good ! I need just one single test for this. Basically a regression test, something that create an engine with a fake querier.

The querier iterator should return an error and verify that the engine exec also return an error, no need to be fancier than that.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jun 17, 2020
@adityacs adityacs force-pushed the 2208_step_evaluator_error branch 3 times, most recently from f5a7f88 to 584f2ec Compare June 18, 2020 05:41
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

Awesome work ! Thank you !

@cyriltovena cyriltovena merged commit 1729592 into grafana:master Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StepEvaluator swallow iteration error.
3 participants