[8.x] Remove max limit of alerting.rules.maxScheduledPerMinute (#194723) (#194826)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Remove max limit of alerting.rules.maxScheduledPerMinute
(#194723)](https://github.com/elastic/kibana/pull/194723)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Ersin
Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-03T12:11:10Z","message":"Remove
max limit of alerting.rules.maxScheduledPerMinute (#194723)\n\nResolves:
#194626\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7d29cb1a77f9a0c284d0b66d723d054460b512e7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Remove
max limit of
alerting.rules.maxScheduledPerMinute","number":194723,"url":"https://github.com/elastic/kibana/pull/194723","mergeCommit":{"message":"Remove
max limit of alerting.rules.maxScheduledPerMinute (#194723)\n\nResolves:
#194626\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7d29cb1a77f9a0c284d0b66d723d054460b512e7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194723","number":194723,"mergeCommit":{"message":"Remove
max limit of alerting.rules.maxScheduledPerMinute (#194723)\n\nResolves:
#194626\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7d29cb1a77f9a0c284d0b66d723d054460b512e7"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ersin Erdal <92688503+ersin-erdal@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-10-03 23:51:01 +10:00 committed by GitHub
parent b576a4647e
commit 2ac2f9a27e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -114,4 +114,13 @@ describe('config validation', () => {
);
});
});
test('maxScheduledPerMinute allows more than 32000', () => {
const config: Record<string, unknown> = {
rules: {
maxScheduledPerMinute: 50000,
},
};
expect(() => configSchema.validate(config)).not.toThrow();
});
});

View file

@ -39,7 +39,7 @@ const rulesSchema = schema.object({
}),
enforce: schema.boolean({ defaultValue: false }), // if enforce is false, only warnings will be shown
}),
maxScheduledPerMinute: schema.number({ defaultValue: 32000, max: 32000, min: 0 }),
maxScheduledPerMinute: schema.number({ defaultValue: 32000, min: 0 }),
overwriteProducer: schema.maybe(
schema.oneOf([
schema.literal('observability'),