[Rules migration] Allow partial RuleResponse object to be passed to RuleOverviewTab#204318
Conversation
… `RuleOverviewTab`
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
cc @e40pud |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7601[✅] Security Solution Rule Management - Cypress: 100/100 tests passed. |
nikitaindik
left a comment
There was a problem hiding this comment.
IMO, the change to Partial<RuleResponse> in RuleOverviewTab is fine since underlying section components already use Partial<RuleResponse>.
maximpn
left a comment
There was a problem hiding this comment.
@e40pud I agree with @nikitaindik. RuleOverviewTab was already prepared for partial rule data.
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12350482824 |
… `RuleOverviewTab` (elastic#204318) ## Summary These changes allow `Partial<RuleResponse>` to be used as a parameter for `RuleOverviewTab` component. We re-use this component for "SIEM Migrations" feature to display translated state of the rule which has just a few fields that represent the `RuleResponse` object. The set of fields used in `RuleMigration` object is a minimum set of fields enough for the rule creation. Right now, `RuleOverviewTab` component requires the complete `RuleResponse` object to be passed even though internally each section (`RuleAboutSection`, `RuleDefinitionSection`, `RuleScheduleSection` and `RuleSetupGuideSection`) of the rule's overview expects `Partial<RuleResponse>`. To be able to use this component we force type casting at the moment and would like to get rid of it. @elastic/security-detection-rule-management do you have objects regarding this change in `RuleOverviewTab` intefrace? ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - Rule management cypress tests ([100 ESS & 100 Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7601)) (cherry picked from commit c92899e)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… to be passed to `RuleOverviewTab` (#204318) (#204353) # Backport This will backport the following commits from `main` to `8.x`: - [[Rules migration] Allow partial `RuleResponse` object to be passed to `RuleOverviewTab` (#204318)](#204318) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2024-12-16T10:15:52Z","message":"[Rules migration] Allow partial `RuleResponse` object to be passed to `RuleOverviewTab` (#204318)\n\n## Summary\r\n\r\nThese changes allow `Partial<RuleResponse>` to be used as a parameter\r\nfor `RuleOverviewTab` component.\r\n\r\nWe re-use this component for \"SIEM Migrations\" feature to display\r\ntranslated state of the rule which has just a few fields that represent\r\nthe `RuleResponse` object. The set of fields used in `RuleMigration`\r\nobject is a minimum set of fields enough for the rule creation.\r\n\r\nRight now, `RuleOverviewTab` component requires the complete\r\n`RuleResponse` object to be passed even though internally each section\r\n(`RuleAboutSection`, `RuleDefinitionSection`, `RuleScheduleSection` and\r\n`RuleSetupGuideSection`) of the rule's overview expects\r\n`Partial<RuleResponse>`. To be able to use this component we force type\r\ncasting at the moment and would like to get rid of it.\r\n\r\n@elastic/security-detection-rule-management do you have objects\r\nregarding this change in `RuleOverviewTab` intefrace?\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Rule management cypress tests ([100 ESS & 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7601))","sha":"c92899e142c3edf8318d0a7a13c15ff7cfb3a0f4","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat Hunting","Team: SecuritySolution","Team:Detection Rule Management","backport:prev-minor"],"title":"[Rules migration] Allow partial `RuleResponse` object to be passed to `RuleOverviewTab`","number":204318,"url":"https://github.com/elastic/kibana/pull/204318","mergeCommit":{"message":"[Rules migration] Allow partial `RuleResponse` object to be passed to `RuleOverviewTab` (#204318)\n\n## Summary\r\n\r\nThese changes allow `Partial<RuleResponse>` to be used as a parameter\r\nfor `RuleOverviewTab` component.\r\n\r\nWe re-use this component for \"SIEM Migrations\" feature to display\r\ntranslated state of the rule which has just a few fields that represent\r\nthe `RuleResponse` object. The set of fields used in `RuleMigration`\r\nobject is a minimum set of fields enough for the rule creation.\r\n\r\nRight now, `RuleOverviewTab` component requires the complete\r\n`RuleResponse` object to be passed even though internally each section\r\n(`RuleAboutSection`, `RuleDefinitionSection`, `RuleScheduleSection` and\r\n`RuleSetupGuideSection`) of the rule's overview expects\r\n`Partial<RuleResponse>`. To be able to use this component we force type\r\ncasting at the moment and would like to get rid of it.\r\n\r\n@elastic/security-detection-rule-management do you have objects\r\nregarding this change in `RuleOverviewTab` intefrace?\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Rule management cypress tests ([100 ESS & 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7601))","sha":"c92899e142c3edf8318d0a7a13c15ff7cfb3a0f4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204318","number":204318,"mergeCommit":{"message":"[Rules migration] Allow partial `RuleResponse` object to be passed to `RuleOverviewTab` (#204318)\n\n## Summary\r\n\r\nThese changes allow `Partial<RuleResponse>` to be used as a parameter\r\nfor `RuleOverviewTab` component.\r\n\r\nWe re-use this component for \"SIEM Migrations\" feature to display\r\ntranslated state of the rule which has just a few fields that represent\r\nthe `RuleResponse` object. The set of fields used in `RuleMigration`\r\nobject is a minimum set of fields enough for the rule creation.\r\n\r\nRight now, `RuleOverviewTab` component requires the complete\r\n`RuleResponse` object to be passed even though internally each section\r\n(`RuleAboutSection`, `RuleDefinitionSection`, `RuleScheduleSection` and\r\n`RuleSetupGuideSection`) of the rule's overview expects\r\n`Partial<RuleResponse>`. To be able to use this component we force type\r\ncasting at the moment and would like to get rid of it.\r\n\r\n@elastic/security-detection-rule-management do you have objects\r\nregarding this change in `RuleOverviewTab` intefrace?\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- Rule management cypress tests ([100 ESS & 100\r\nServerless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7601))","sha":"c92899e142c3edf8318d0a7a13c15ff7cfb3a0f4"}}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
… `RuleOverviewTab` (elastic#204318) ## Summary These changes allow `Partial<RuleResponse>` to be used as a parameter for `RuleOverviewTab` component. We re-use this component for "SIEM Migrations" feature to display translated state of the rule which has just a few fields that represent the `RuleResponse` object. The set of fields used in `RuleMigration` object is a minimum set of fields enough for the rule creation. Right now, `RuleOverviewTab` component requires the complete `RuleResponse` object to be passed even though internally each section (`RuleAboutSection`, `RuleDefinitionSection`, `RuleScheduleSection` and `RuleSetupGuideSection`) of the rule's overview expects `Partial<RuleResponse>`. To be able to use this component we force type casting at the moment and would like to get rid of it. @elastic/security-detection-rule-management do you have objects regarding this change in `RuleOverviewTab` intefrace? ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - Rule management cypress tests ([100 ESS & 100 Serverless](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7601))
Summary
These changes allow
Partial<RuleResponse>to be used as a parameter forRuleOverviewTabcomponent.We re-use this component for "SIEM Migrations" feature to display translated state of the rule which has just a few fields that represent the
RuleResponseobject. The set of fields used inRuleMigrationobject is a minimum set of fields enough for the rule creation.Right now,
RuleOverviewTabcomponent requires the completeRuleResponseobject to be passed even though internally each section (RuleAboutSection,RuleDefinitionSection,RuleScheduleSectionandRuleSetupGuideSection) of the rule's overview expectsPartial<RuleResponse>. To be able to use this component we force type casting at the moment and would like to get rid of it.@elastic/security-detection-rule-management do you have objects regarding this change in
RuleOverviewTabintefrace?Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.