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

Reject queries without a time range #3395

Merged
merged 6 commits into from
Jul 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fail if start or end are missing
Co-authored-by: Anton Kolesnikov <anton.e.kolesnikov@gmail.com>
  • Loading branch information
bryanhuhta and kolesnikovae authored Jul 2, 2024
commit 185f1517b6f832f2ea2ed6d37d4bf7aa282a458a
2 changes: 1 addition & 1 deletion pkg/validation/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ type ValidatedRangeRequest struct {
}

func ValidateRangeRequest(limits RangeRequestLimits, tenantIDs []string, req model.Interval, now model.Time) (ValidatedRangeRequest, error) {
if req.Start == 0 && req.End == 0 {
if req.Start == 0 || req.End == 0 {
return ValidatedRangeRequest{}, NewErrorf(QueryMissingTimeRange, QueryMissingTimeRangeErrorMsg)
}

Expand Down
Loading