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

Preserve interval parameter when splitting queries by time #5622

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

chaudum
Copy link
Contributor

@chaudum chaudum commented Mar 14, 2022

What this PR does / why we need it:

This PR fixes the incorrect behaviour where the interval parameter from a query range request is ignored in case the query is internally split by time, and therefore returning much more results than expected.

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

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

@chaudum chaudum requested a review from a team as a code owner March 14, 2022 19:53
chaudum added a commit that referenced this pull request Mar 14, 2022
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
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.

LGTM

@chaudum
Copy link
Contributor Author

chaudum commented Mar 16, 2022

Adding @slim-bean as reviewer, since the interval parameter was initially added by him. The parameter is experimental and the use-cases are questionable, however users seem to use it.
@cyriltovena was questioning whether we should drop the parameter entirely.

Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena
Copy link
Contributor

Just need to resolve conflict I enable auto merge.

@cyriltovena cyriltovena enabled auto-merge (squash) March 17, 2022 08:27
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
@cyriltovena cyriltovena merged commit 95b8856 into main Mar 17, 2022
@cyriltovena cyriltovena deleted the chaudum/issue-5613 branch March 17, 2022 12:27
@slim-bean slim-bean added the backport release-2.5.x Tag a PR with this label to create a PR which cherry pics it into the release-2.5.x branch label Apr 7, 2022
grafanabot pushed a commit that referenced this pull request Apr 7, 2022
* Preserve interval parameter when splitting queries by time

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add tests for interval param on Loki downstream requests

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add changelog entry for #5622

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit 95b8856)
slim-bean pushed a commit that referenced this pull request Apr 7, 2022
…5815)

* Preserve interval parameter when splitting queries by time

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add tests for interval param on Loki downstream requests

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add changelog entry for #5622

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit 95b8856)

Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
splitice pushed a commit to X4BNet/loki that referenced this pull request May 21, 2022
) (grafana#5815)

* Preserve interval parameter when splitting queries by time

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add tests for interval param on Loki downstream requests

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>

* Add changelog entry for grafana#5622

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit 95b8856)

Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.5.x Tag a PR with this label to create a PR which cherry pics it into the release-2.5.x branch size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: query_range interval parameter broken when query contains filter expressions
4 participants