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

HTTP API: Support duration and float formats for step parameter #1355

Merged
merged 3 commits into from
Dec 3, 2019
Merged

HTTP API: Support duration and float formats for step parameter #1355

merged 3 commits into from
Dec 3, 2019

Conversation

danieldabate
Copy link
Contributor

What this PR does / why we need it:
To have an http interface more compliant with Prometheus specification we should support both duration and float formats for the step parameter. See https://prometheus.io/docs/prometheus/latest/querying/api/

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

Special notes for your reviewer:
I don't code in Go frequently, so please let me know if I can improve this PR.
Although it's not necessary I kept a test for integer format to support backwards compatibility.

Checklist

  • Documentation added
  • Tests updated

@claassistantio
Copy link

claassistantio commented Dec 3, 2019

CLA assistant check
All committers have signed the CLA.

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

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@cyriltovena
Copy link
Contributor

/cc @slim-bean The build should pass and we should get that for 1.1.

@cyriltovena cyriltovena merged commit df89859 into grafana:master Dec 3, 2019
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.

Query range step does not support duration string.
3 participants