Skip to content

V2: Query API incompatibility around missing time windows #4016

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

Open
simonswine opened this issue Mar 18, 2025 · 2 comments
Open

V2: Query API incompatibility around missing time windows #4016

simonswine opened this issue Mar 18, 2025 · 2 comments

Comments

@simonswine
Copy link
Contributor

Describe the bug

A clear and concise description of what the bug is.

When using the v2 mode, the API behaves directly, it seems to treat the time window as required:

$ curl -H "content-type: application/json"  -d '{"label_names":["__profile_type__"]}' "http://v1/querier.v1.QuerierService/Series"
{"labelsSet":[{"labels":[...]}]}

$ curl -H "content-type: application/json"  -d '{"label_names":["__profile_type__"]}' "http://v2/querier.v1.QuerierService/Series"
{"code":"invalid_argument","message":"missing time range in the query"}%

Expected behavior

Follow the same API behaviour, with and without v2

@kolesnikovae
Copy link
Collaborator

kolesnikovae commented Mar 19, 2025

Good catch! This was intentional: I consider queries without the time range invalid, and I'd like to avoid bug-to-bug compatibility. Please clarify if there's a known case where we do rely on this behaviour.

@simonswine
Copy link
Contributor Author

I guess I am not aware of any frontend/cli tool from us relying on it.

But my curl history, is using that a lot as it is easier than working out the timestamps.

We should update this:

// Milliseconds since epoch. If missing or zero, only the ingesters will be
// queried.

At worst, if it turns out someone is relying on this we can reinstate a form of old behaviour.

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

No branches or pull requests

2 participants