[Response Ops][Rules] Add New Rule Form to Stack Management#194655
[Response Ops][Rules] Add New Rule Form to Stack Management#194655cnasikas merged 14 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
| const { data, isLoading, isFetching, isInitialLoading } = useQuery({ | ||
| queryKey: ['useLoadConnectors', includeSystemActions], | ||
| queryFn, | ||
| cacheTime: 0, |
There was a problem hiding this comment.
What is the purpose of changing the cache time (garbage collection) to zero? Will this change affect other parts of the app?
There was a problem hiding this comment.
should be fine, nothing else is using this
There was a problem hiding this comment.
Yes, but why do we need to set it to 0? What does it do and what issue does it solve?
There was a problem hiding this comment.
Ok, I spoke with @umbopepato, and help me understand. I made the hooks parameterized because they can be used in the future by other parts of the application and we may not want the caching to be set to zero.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Missing monitoring dataThere are two options hidden that in the flyout show up the first time "save" is clicked. In the rules page the create button is disabled and these hidden options are not shown Flyout recording showing how two options show when save is clickedScreenshot.4.mov |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@elasticmachine merge upstream |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
I can verify that all the bugs mentioned here #194655 (comment) are fixed. I found the following ones:
and I can save the rule if I want. Should we do something similar on the new rule form?
Should we do something similar on the new rule form (cancel or return button)?
|
yctercero
left a comment
There was a problem hiding this comment.
Codeowner changes packages/kbn-rule-data-utils/src/routes/stack_rule_paths.ts LGTM.
|
In my last commit (cb8f068 I addressed the following:
|
|
maryam-saeidi
left a comment
There was a problem hiding this comment.
Changes LGTM!
I tested the issue that I mentioned after this commit, and I was able to see the page.
pheyos
left a comment
There was a problem hiding this comment.
x-pack/test_serverless/functional/config.base.ts changes LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11344036469 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…194655) ## Summary Enables and adds the new rule form to stack management. We are only going to turn this on for stack management for now until we are confident that this is fairly bug free. ### To test: 1. Switch `USE_NEW_RULE_FORM_FEATURE_FLAG` to true 2. Navigate to stack management -> rules list 3. Click "Create rule" 4. Assert the user is navigated to the new form 5. Create rule 6. Assert the user is navigated to the rule details page 7. Click "Edit" 8. Edit rule 9. Assert the user is navigated to the rule details page 10. Try editing a rule in the rules list and assert everything works as expected We should also make sure this rule form is not enabled in other solutions. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co> (cherry picked from commit 5c2df63) # Conflicts: # x-pack/test_serverless/functional/config.base.ts
…94655) (#196290) # Backport This will backport the following commits from `main` to `8.x`: - [[Response Ops][Rules] Add New Rule Form to Stack Management (#194655)](#194655) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jiawei Wu","email":"74562234+JiaweiWu@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-15T10:17:59Z","message":"[Response Ops][Rules] Add New Rule Form to Stack Management (#194655)\n\n## Summary\r\n\r\nEnables and adds the new rule form to stack management. We are only\r\ngoing to turn this on for stack management for now until we are\r\nconfident that this is fairly bug free.\r\n\r\n### To test:\r\n\r\n1. Switch `USE_NEW_RULE_FORM_FEATURE_FLAG` to true\r\n2. Navigate to stack management -> rules list\r\n3. Click \"Create rule\" \r\n4. Assert the user is navigated to the new form\r\n5. Create rule\r\n6. Assert the user is navigated to the rule details page\r\n7. Click \"Edit\"\r\n8. Edit rule\r\n9. Assert the user is navigated to the rule details page\r\n10. Try editing a rule in the rules list and assert everything works as\r\nexpected\r\n\r\nWe should also make sure this rule form is not enabled in other\r\nsolutions.\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Christos Nasikas <christos.nasikas@elastic.co>","sha":"5c2df6347d779f577946634e972d30224299079a","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"],"number":194655,"url":"https://github.com/elastic/kibana/pull/194655","mergeCommit":{"message":"[Response Ops][Rules] Add New Rule Form to Stack Management (#194655)\n\n## Summary\r\n\r\nEnables and adds the new rule form to stack management. We are only\r\ngoing to turn this on for stack management for now until we are\r\nconfident that this is fairly bug free.\r\n\r\n### To test:\r\n\r\n1. Switch `USE_NEW_RULE_FORM_FEATURE_FLAG` to true\r\n2. Navigate to stack management -> rules list\r\n3. Click \"Create rule\" \r\n4. Assert the user is navigated to the new form\r\n5. Create rule\r\n6. Assert the user is navigated to the rule details page\r\n7. Click \"Edit\"\r\n8. Edit rule\r\n9. Assert the user is navigated to the rule details page\r\n10. Try editing a rule in the rules list and assert everything works as\r\nexpected\r\n\r\nWe should also make sure this rule form is not enabled in other\r\nsolutions.\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Christos Nasikas <christos.nasikas@elastic.co>","sha":"5c2df6347d779f577946634e972d30224299079a"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194655","number":194655,"mergeCommit":{"message":"[Response Ops][Rules] Add New Rule Form to Stack Management (#194655)\n\n## Summary\r\n\r\nEnables and adds the new rule form to stack management. We are only\r\ngoing to turn this on for stack management for now until we are\r\nconfident that this is fairly bug free.\r\n\r\n### To test:\r\n\r\n1. Switch `USE_NEW_RULE_FORM_FEATURE_FLAG` to true\r\n2. Navigate to stack management -> rules list\r\n3. Click \"Create rule\" \r\n4. Assert the user is navigated to the new form\r\n5. Create rule\r\n6. Assert the user is navigated to the rule details page\r\n7. Click \"Edit\"\r\n8. Edit rule\r\n9. Assert the user is navigated to the rule details page\r\n10. Try editing a rule in the rules list and assert everything works as\r\nexpected\r\n\r\nWe should also make sure this rule form is not enabled in other\r\nsolutions.\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Christos Nasikas <christos.nasikas@elastic.co>","sha":"5c2df6347d779f577946634e972d30224299079a"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jiawei Wu <74562234+JiaweiWu@users.noreply.github.com>










Summary
Enables and adds the new rule form to stack management. We are only going to turn this on for stack management for now until we are confident that this is fairly bug free.
To test:
USE_NEW_RULE_FORM_FEATURE_FLAGto trueWe should also make sure this rule form is not enabled in other solutions.
Checklist