Repository navigation
Normalize default durations - #3308
Conversation
|
Thank you! |
|
@wiardvanrij @brancz This breaks the API which has these defaults set implicitly. No matter if documented or not, in my opinion. Breaking e.g. for alert-rules which currently uses a range-duration Why not instead documenting the current released defaults instead? This commit isn't part of a release, yet. So, a revert would be quite easy. |
|
If the This commit removes some assumptions on Setting/using alert rules, I don't see this as breaking as it's per your own configuration. What I'm trying to say is that I would rather force people to check their scrape_interval's and think about it, rather than keeping it explicit and somewhat hidden. I would agree that in a release, this would be noted as possibly breaking. In such extend that people actually are aware of this setting (and its default). Yet I also want to quote the first line on the readme:
So, eventually that was my reason to make this PR. P.s. I'm in no way maintainer or anything, this is just merely my 2 cents and I'm happy with any solution ;) |
|
Thanks for your quick and detailed answer.
Who ignores the Actually, I stumbled upon this PR in figuring out what is the default
If it's somewhere ignored, I agree. But then, in the end, Prometheus uses defaults. Just re-checked it's
Easier setting/maintaining "own configuration" is one main purpose of this project, IMO. So the API shouldn't break sth. like this or it should at least be backward-compatible, as you linked to the Readme, too 👍
Then the better way would be to make both settings mandatory in the
Yes. But documenting "Default:
Me too. This are my 2 cents, too. To avoid negative surprises or annoyances. |
|
My apologies, we should have indeed thought this through a bit more. How do you suggest we proceed @Dominik-K? Do you think reverting this is best and doing a patch release? Do you think making it more explicit in the changelog/release notes would be better? |
|
@brancz No problem. I'm happy you're answering quickly 👍 The commit a7e60b2 (from July, 1st) isn't released yet (latest release So I suggest to revert this PR-commit and create an extra PR which either
The decision is up to you. I don't know your overall design on this enough. @wiardvanrij Are you ok with this? |
|
Yes, I'm fine with a revert to come up with a solid solution that helps everyone. For the exact solution I'm uncertain. It feels documenting a default value, which is not the same as Prometheus itself makes it overcomplicated. The Prometheus documentation is really solid. I would really suggest honouring those specs. |
|
There are a couple of odd behaviors that we have collected over time, it's just how software grows. We were thinking of one day doing a release that would be "a bit more breaking", that would do changes like this. I would suggest for now we revert this, and put this on a "breaking release" issue. What do you think? |
|
TL;DR: Revert and make the settings mandatory instead of changing defaults. @brancz
At the first moment, I was uncertain, too. Because in general I fully support this argument. In the search for a decisive argument pro/contra changing the default values: Who are the affected users we're talking about? Meaning who didn't explicitly set
The others should have set the values explicitly, i.e. they're not affected. (If I missed a group, then it would be even more severe.) So, I guess that many users of Prometheus-Operator fall into the two groups (we have 1 project with Another aspect would be to look at how users upgrade a project like this. Knowing that Prometheus has a very well and long track of not breaking things (esp. database; my impression), you may shed the light on the Prometheus-Operator as well :-) So, you may just increase the version number and see from error-messages if something is wrong. Without looking at release-notes or whatsoever before, for sure. Long story, short: I vote for don't change the default values. So, either you could leave the values like before. Or you make them mandatory. This would bring both groups to think about these intervals again (or for the first time at all). And it would lead to better practice. I could create PR for it after we've settled the decision. |
|
I think you make a lot of sense so I agree :) Cheers. As for a possible change, rather than making the setting mandatory, perhaps we could just add extra information. Information on start-up in case I'm also fine with just only a doc/api 'info update'. |
|
What you're saying makes sense, but we cannot break things at API level, and making a field mandatory would be exactly that. In any case it seems that we agree on reverting this :) |
Both scrapeInterval and evaluationInterval are on 30s. This commit changes this to 1m and updates the tests included with it.
Reason: