Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDocument and maybe consolidate duration parameter format #1883
Comments
grobie
added
component/config
kind/friction
labels
Aug 10, 2016
This comment has been minimized.
This comment has been minimized.
|
I was of the impression that we'd already done all of that. |
This comment has been minimized.
This comment has been minimized.
|
Flags are still using vanilla Go duration. A problem is that PromQL and config durations are not a superset of the Go durations. The former supports d, w, y. The latter can do mixed units like 5m30s. |
This comment has been minimized.
This comment has been minimized.
|
Do you think we actually need mixed units in flags? I can't think of a On Mon, Aug 15, 2016 at 2:50 AM Björn Rabenstein notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
I'm fine with not allowing mixed units. But it could break existing setups, and that's why we didn't just flip the switch. If we allowed mixed units, we would have a non-breaking upgrade path. |
This comment has been minimized.
This comment has been minimized.
|
I think we're okay with switching to not having mixed units for the sake of consistency, and such a breaking change is permitted within 1.0. |
This comment has been minimized.
This comment has been minimized.
|
I don't think we can break the existing usage. We explicitly promised On Mon, Aug 15, 2016 at 2:05 PM Brian Brazil notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
That wording must have changed at some point, it used to be that we wouldn't remove flags. It would be valid to ignore such invalid flags. |
This comment has been minimized.
This comment has been minimized.
|
Do we need to reconsider this for 2.0? |
This comment has been minimized.
This comment has been minimized.
|
Yes, in case we still have time duration flags left. I didn't do it due to my concerns about compatibility. |
This comment has been minimized.
This comment has been minimized.
|
So the plan would to to switch to our single unit while supporting days, weeks, and years? Where does this need changes. So far I got:
Anything I missed? |
This comment has been minimized.
This comment has been minimized.
|
@fabxc I'm counting 7 DurationVars. |
This comment has been minimized.
This comment has been minimized.
|
So do we make this change only to those flags requiring long intervals or to all I am talking about:
|
This comment has been minimized.
This comment has been minimized.
|
+1 to all.
…On Fri, Jun 16, 2017 at 3:01 PM Goutham Veeramachaneni < ***@***.***> wrote:
So do we make this change only to those flags requiring long intervals or
to all Duration flags for consistency?
I am talking about:
--query.lookback-delta
--query.timeout
--web.read-timeout
--alertmanager.timeout
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1883 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAANaE68_A8X2lwoyLBZokZP9v5pTwslks5sEnydgaJpZM4Jhaar>
.
|
This comment has been minimized.
This comment has been minimized.
|
Yea, that came to my mind as well. But all seems saner and I cannot really see a use for mixed units. |
brian-brazil
removed
the
kind/friction
label
Jul 14, 2017
brian-brazil
added this to the v2.x milestone
Jul 14, 2017
brian-brazil
added
priority/P2
kind/cleanup
labels
Jul 14, 2017
gouthamve
added
the
dev-2.0
label
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil @grobie Is only documenting it left as we moved all the flags? Or do we need to change anything in promql? |
This comment has been minimized.
This comment has been minimized.
|
It's not about promql, it's about flags. I don't know what the current state is in 2.0, but in 1.x we have for example |
This comment has been minimized.
This comment has been minimized.
|
Then I think this can be closed as it is now in 2.0:
|
This comment has been minimized.
This comment has been minimized.
|
Cool, the acceptance criteria is basically: all duration flags should use
our PromQL style duration format and not the golang style one. Feel free to
close if that's the case! Thanks for checking.
…On Thu, Jul 27, 2017 at 2:49 PM Goutham Veeramachaneni < ***@***.***> wrote:
Then I think this can be closed as it is now in 2.0:
➜ prometheus git:(dev-2.0) ✗ ./prometheus --storage.tsdb.retention=15d
INFO[0000] Starting prometheus (version=, branch=, revision=) source="main.go:202"
INFO[0000] Build context (go=go1.8.3, user=, date=) source="main.go:203"
INFO[0000] Host details (darwin) source="main.go:204"
INFO[0000] Starting tsdb source="main.go:216"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1883 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAANaDyBRT5IHfhURaH8OpmpnMgMATTLks5sSIdAgaJpZM4Jhaar>
.
|
This comment has been minimized.
This comment has been minimized.
|
Fixed in #2844 |
gouthamve
closed this
Aug 1, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
grobie commentedAug 10, 2016
The prometheus server accepts a couple of time duration parameters. These currently only allow the golang time.Duration units, with
hbeing the largest one. On the other side, promql also accepts d/w/y etc.So far, the valid format is not document anywhere, neither in the usage nor on prometheus.io. We should at least document that.
I'd also vote to consolidate the formats and accept the same format everywhere. There are arguments that any unit larger than hour can be ambiguous due to leap seconds/days. Personally I'd argue a leap seconds and days don't matter when someone specifies large retention intervals.