-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ResponseOps][Rules] Create the rule params package #196971
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --update'
oas_docs/bundle.json
Outdated
@@ -2413,7 +2414,6 @@ | |||
"consumer", | |||
"schedule", | |||
"actions", | |||
"params", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it get removed from the required
? What is it because it has a defaultValue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd would think it's because of the default value, yes. You could try removing it and checking the bundle by yourself. Just follow the instructions in x-pack/plugins/alerting/docs/openapi/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add the defaultValue? Shouldn't it throw if it's missing in the request?
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
History
cc @cnasikas |
Starting backport for target branches: 8.x |
## Summary This PR creates a package containing the schema of the params of all rule types. It starts as `schema.recordOf(schema.string(), schema.maybe(schema.any()))` which is the current one. In subsequent PRs, the schema will be updated to `schema.oneOf([apmRuleType, esQueryRuleType, ....])`. I also substituted the definition of `params` in the alerting plugin with the `params` exported from the package. Towards: elastic#187356 Fixes: elastic#195183 ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit a7a81c2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…197367) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Rules] Create the rule params package (#196971)](#196971) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-23T06:44:38Z","message":"[ResponseOps][Rules] Create the rule params package (#196971)\n\n## Summary\r\n\r\nThis PR creates a package containing the schema of the params of all\r\nrule types. It starts as `schema.recordOf(schema.string(),\r\nschema.maybe(schema.any()))` which is the current one. In subsequent\r\nPRs, the schema will be updated to `schema.oneOf([apmRuleType,\r\nesQueryRuleType, ....])`. I also substituted the definition of `params`\r\nin the alerting plugin with the `params` exported from the package.\r\n\r\nTowards: https://github.com/elastic/kibana/issues/187356\r\nFixes: https://github.com/elastic/kibana/issues/195183\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"a7a81c28973fd9b5bfc585b8e9b3cb7c5a86eb0b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","Feature:Alerting/RulesFramework","backport:prev-minor","v8.17.0"],"title":"[ResponseOps][Rules] Create the rule params package","number":196971,"url":"https://github.com/elastic/kibana/pull/196971","mergeCommit":{"message":"[ResponseOps][Rules] Create the rule params package (#196971)\n\n## Summary\r\n\r\nThis PR creates a package containing the schema of the params of all\r\nrule types. It starts as `schema.recordOf(schema.string(),\r\nschema.maybe(schema.any()))` which is the current one. In subsequent\r\nPRs, the schema will be updated to `schema.oneOf([apmRuleType,\r\nesQueryRuleType, ....])`. I also substituted the definition of `params`\r\nin the alerting plugin with the `params` exported from the package.\r\n\r\nTowards: https://github.com/elastic/kibana/issues/187356\r\nFixes: https://github.com/elastic/kibana/issues/195183\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"a7a81c28973fd9b5bfc585b8e9b3cb7c5a86eb0b"}},"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/196971","number":196971,"mergeCommit":{"message":"[ResponseOps][Rules] Create the rule params package (#196971)\n\n## Summary\r\n\r\nThis PR creates a package containing the schema of the params of all\r\nrule types. It starts as `schema.recordOf(schema.string(),\r\nschema.maybe(schema.any()))` which is the current one. In subsequent\r\nPRs, the schema will be updated to `schema.oneOf([apmRuleType,\r\nesQueryRuleType, ....])`. I also substituted the definition of `params`\r\nin the alerting plugin with the `params` exported from the package.\r\n\r\nTowards: https://github.com/elastic/kibana/issues/187356\r\nFixes: https://github.com/elastic/kibana/issues/195183\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"a7a81c28973fd9b5bfc585b8e9b3cb7c5a86eb0b"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Christos Nasikas <[email protected]>
Summary
This PR creates a package containing the schema of the params of all rule types. It starts as
schema.recordOf(schema.string(), schema.maybe(schema.any()))
which is the current one. In subsequent PRs, the schema will be updated toschema.oneOf([apmRuleType, esQueryRuleType, ....])
. I also substituted the definition ofparams
in the alerting plugin with theparams
exported from the package.Towards: #187356
Fixes: #195183
For maintainers