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

query-frontend: inclusive results when start/end are the same #3527

Merged
merged 1 commit into from Dec 2, 2020
Merged

query-frontend: inclusive results when start/end are the same #3527

merged 1 commit into from Dec 2, 2020

Conversation

adamcstephens
Copy link
Contributor

@adamcstephens adamcstephens commented Dec 1, 2020

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

Verified same way bug report #3526 was tested. When passing start/end with the same value, results are now returned.

❯ http --follow "http://localhost:19090/api/v1/query_range?query=up&start=$(gdate +%s)&end=$(gdate +%s)&step=120" | jq '.data.result | length'
14
❯ http --follow "http://localhost:19090/api/v1/query_range?query=up&start=$(gdate --date='5 minutes ago' +%s)&end=$(gdate +%s)&step=120" | jq '.data.result | length'
14

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

Maybe @pracucci would be interested in this one since the Cortex frontend has the same issue.

pkg/queryfrontend/split_by_interval.go Outdated Show resolved Hide resolved
Signed-off-by: Adam Stephens <astephens@fastly.com>
@bwplotka bwplotka merged commit a57bbfb into thanos-io:master Dec 2, 2020
@bwplotka
Copy link
Member

bwplotka commented Dec 2, 2020

Thank you @adamcstephens and thank you @yeya24 for review. 💪

@adamcstephens adamcstephens deleted the same-start-end branch December 2, 2020 16:47
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.

None yet

3 participants