You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Security Solution] Fixes ESQL form locking to read only mode in rule upgrade flyout (elastic#231699)
**Fixes: elastic#231503
## Summary
Adds logic to prevent the ESQL form going into an endless loading state
which manifested in the query component being locked in "read only" mode
when upgrading a rule in the Rule Upgrade Flyout. This was due to a bug
that occurred on rerender of our internal data view hook. Also adds test
coverage to the hook to guard against the endless loop being entered.
### Repro steps (copied from ticket)
**Steps to reproduce:**
1. Install a prebuilt detection rule of type ESQL. (used package 8.18.2)
2. Ensure that an update is available for this rule.
3. Navigate to Security → Rules → Rule Updates.
4. Select the ESQL prebuilt rule that has an update.
5. Open the Rule Update flyout.
6. Attempt to edit the ESQL query field.
7. Notice the flyout is editable, not locked in readonly mode
### Recordings
**Before**
https://github.com/user-attachments/assets/28c6e5e0-866c-468b-afb1-fbeb9ddeec74
**After**
https://github.com/user-attachments/assets/6531ad44-e2bc-4ef9-b4c3-35387da18d1b
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [x] [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
Copy file name to clipboardExpand all lines: x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_edit/fields/hooks/use_data_view.ts
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,12 @@ export function useDataView(indexPatternsOrDataViewId: UseDataViewParams): UseDa
0 commit comments