Skip to content

promtool: Set test group interval default to evaluation interval#13011

Merged
dgl merged 1 commit intoprometheus:mainfrom
rgroothuijsen:issue-12871
Oct 20, 2023
Merged

promtool: Set test group interval default to evaluation interval#13011
dgl merged 1 commit intoprometheus:mainfrom
rgroothuijsen:issue-12871

Conversation

@rgroothuijsen
Copy link
Copy Markdown
Contributor

The interval field for test_group is marked as required by the documentation, but the application neither enforces this requirement nor sets a default, leading to a default of 0 and unexpected behavior in some cases. In issue #12871 the idea was proposed to instead make the field optional and set evaluation_interval as a default if no interval is specified. This may break some existing tests, though these would likewise break if the application started considering an unspecified interval as an error.

Fixes #12871

Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
@rgroothuijsen rgroothuijsen requested a review from dgl as a code owner October 19, 2023 21:39
@bboreham bboreham changed the title Set test group interval default to evaluation interval promtool: Set test group interval default to evaluation interval Oct 20, 2023
Copy link
Copy Markdown
Member

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, though I'm not familiar with this area of the code.

@dgl
Copy link
Copy Markdown
Member

dgl commented Oct 20, 2023

Thanks, this is what I proposed on the bug. (Somehow the original GitHub email for the PR didn’t make it to me.)

@dgl dgl merged commit 122f950 into prometheus:main Oct 20, 2023
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.

promtool test rules: default value of test group "interval" is zero

3 participants