-
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
[Response Ops][Rules] Add New Rule Form to Stack Management #194655
[Response Ops][Rules] Add New Rule Form to Stack Management #194655
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.
@@ -27,6 +27,7 @@ export const useLoadConnectors = (props: UseLoadConnectorsProps) => { | |||
const { data, isLoading, isFetching, isInitialLoading } = useQuery({ | |||
queryKey: ['useLoadConnectors', includeSystemActions], | |||
queryFn, | |||
cacheTime: 0, |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JiaweiWu Any update on this?
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.
should be fine, nothing else is using this
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)?
|
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.
Codeowner changes packages/kbn-rule-data-utils/src/routes/stack_rule_paths.ts
LGTM.
In my last commit (cb8f068 I addressed the following:
|
|
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 🍠
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.
Changes LGTM!
I tested the issue that I mentioned after this commit, and I was able to see the page.
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.
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 <[email protected]> Co-authored-by: Christos Nasikas <[email protected]> (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":"[email protected]"},"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 <[email protected]>\r\nCo-authored-by: Christos Nasikas <[email protected]>","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 <[email protected]>\r\nCo-authored-by: Christos Nasikas <[email protected]>","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 <[email protected]>\r\nCo-authored-by: Christos Nasikas <[email protected]>","sha":"5c2df6347d779f577946634e972d30224299079a"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jiawei Wu <[email protected]>
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_FLAG
to trueWe should also make sure this rule form is not enabled in other solutions.
Checklist