-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Move metric rule params schema to package #205492
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
* The schema defined in response-ops-rule-params cannot import all types from the plugins | ||
* so the executor will expect slight differences with the type InventoryMetricThresholdParams. | ||
*/ | ||
// @ts-ignore |
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.
This was inevitable without a major refactor of the types in x-pack/solutions/observability/plugins/infra/common/alerting/metrics/types.ts
.
I tried changing InventoryMetricThresholdParams
to TypeOf<typeof metricInventoryThresholdRuleParamsSchema>;
but it was not possible without a major refactor.
The schema is not seen as exactly the same as InventoryMetricThresholdParams
because the response-ops-rule-params package cannot import from '@kbn/metrics-data-access-plugin/common'
so some types are mismatched(although they are technically the same.
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 think this file gives packages/kbn-repo-packages/package-map.json
lint error. we probably don't need to commit this file.
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.
LGTM, only obs-ux-infra-services changes
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
cc @adcoelho |
Starting backport for target branches: 8.x |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…ic#205492) Connected with elastic#195189 ## Summary - Moved params of duration metric inventory threshold rule type to `/response-ops/rule_params/metric_inventory_threshold/` - Moved params of metric threshold rule type to `/response-ops/rule_params/metric_threshold/` **I did NOT move the corresponding type to the rule_params package due to the recursive imports it would create.** --------- Co-authored-by: kibanamachine <[email protected]>
…ic#205492) Connected with elastic#195189 - Moved params of duration metric inventory threshold rule type to `/response-ops/rule_params/metric_inventory_threshold/` - Moved params of metric threshold rule type to `/response-ops/rule_params/metric_threshold/` **I did NOT move the corresponding type to the rule_params package due to the recursive imports it would create.** --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 4873fa1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…205492) (#205912) # Backport This will backport the following commits from `main` to `8.x`: - [[ResponseOps][Rules] Move metric rule params schema to package (#205492)](#205492) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Antonio","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-08T09:50:26Z","message":"[ResponseOps][Rules] Move metric rule params schema to package (#205492)\n\nConnected with #195189\r\n\r\n## Summary\r\n\r\n- Moved params of duration metric inventory threshold rule type to\r\n`/response-ops/rule_params/metric_inventory_threshold/`\r\n- Moved params of metric threshold rule type to\r\n`/response-ops/rule_params/metric_threshold/`\r\n\r\n**I did NOT move the corresponding type to the rule_params package due\r\nto the recursive imports it would create.**\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"4873fa18d70142c5c2e6633d51648c45f6f481cb","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor"],"number":205492,"url":"https://github.com/elastic/kibana/pull/205492","mergeCommit":{"message":"[ResponseOps][Rules] Move metric rule params schema to package (#205492)\n\nConnected with #195189\r\n\r\n## Summary\r\n\r\n- Moved params of duration metric inventory threshold rule type to\r\n`/response-ops/rule_params/metric_inventory_threshold/`\r\n- Moved params of metric threshold rule type to\r\n`/response-ops/rule_params/metric_threshold/`\r\n\r\n**I did NOT move the corresponding type to the rule_params package due\r\nto the recursive imports it would create.**\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"4873fa18d70142c5c2e6633d51648c45f6f481cb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205492","number":205492,"mergeCommit":{"message":"[ResponseOps][Rules] Move metric rule params schema to package (#205492)\n\nConnected with #195189\r\n\r\n## Summary\r\n\r\n- Moved params of duration metric inventory threshold rule type to\r\n`/response-ops/rule_params/metric_inventory_threshold/`\r\n- Moved params of metric threshold rule type to\r\n`/response-ops/rule_params/metric_threshold/`\r\n\r\n**I did NOT move the corresponding type to the rule_params package due\r\nto the recursive imports it would create.**\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"4873fa18d70142c5c2e6633d51648c45f6f481cb"}}]}] BACKPORT-->
…ic#205492) Connected with elastic#195189 ## Summary - Moved params of duration metric inventory threshold rule type to `/response-ops/rule_params/metric_inventory_threshold/` - Moved params of metric threshold rule type to `/response-ops/rule_params/metric_threshold/` **I did NOT move the corresponding type to the rule_params package due to the recursive imports it would create.** --------- Co-authored-by: kibanamachine <[email protected]>
Connected with #195189
Summary
/response-ops/rule_params/metric_inventory_threshold/
/response-ops/rule_params/metric_threshold/
I did NOT move the corresponding type to the rule_params package due to the recursive imports it would create.