Skip to content
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

[Security Solution] Rules table always refreshes upon switching from another tab/window #165221

Closed
Tracked by #165359
maximpn opened this issue Aug 30, 2023 · 2 comments · Fixed by #165250
Closed
Tracked by #165359
Assignees
Labels
8.11 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.11.0

Comments

@maximpn
Copy link
Contributor

maximpn commented Aug 30, 2023

Summary

Rules management table ignores disabled auto-refresh and even rule selection and refreshes each time user returns back to the page from another tab or window.

Details

Rules management tables has auto-refresh functionality. Users can disable it by accessing a popover in the right corner. If auto-refresh is switched off it's supposed rules refresh can only be triggered manually by clicking a refresh button. The same is expected when one or more rules are selected. In fact auto-refresh happens each time user returns from another tab or window.

Most certainly it's also a rules management table flakiness cause when rule selection tests fail even when auto-refresh is disabled like here.

Steps to reproduce

  • open rules management table page
  • disable auto-refresh
  • wait until "Updated now" changes to "Updated XX ago" where XX can be a few seconds ago or higher time interval
  • open a new web browser's tab or click on already opened web browser's tab or activate another window
  • return back by clicking on rules management table page web browser's tab

ER: rules don't get updated, the text shows says when the rules were updated the last time
AR: rules get updated, updating status is shown via "Updating..." and then changing to "Updated now" when it's done

Videos

Auto-refresh is switched off

Screen.Recording.2023-08-30.at.13.29.41.mov

Auto-refresh is switched off AND a rule is selected

Screen.Recording.2023-08-30.at.13.30.27.mov
@maximpn maximpn added bug Fixes for quality problems that affect the customer experience Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team 8.11 candidate labels Aug 30, 2023
@maximpn maximpn self-assigned this Aug 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@banderror banderror changed the title [Security Solution] Rules tables always refreshes upon switching from another tab/window [Security Solution] Rules table always refreshes upon switching from another tab/window Aug 31, 2023
maximpn added a commit that referenced this issue Sep 14, 2023
…us when auto-refresh disabled (#165250)

**Fixes: #165221

## Summary

This PR prevents rules management table from being auto-refreshed on window focus or on reconnect if auto-refresh is disabled.

*Before:*

Auto-refresh is switched off

https://github.com/elastic/kibana/assets/3775283/9536cc47-27b3-424a-a0a6-b3d32d40b9e2

Auto-refresh is switched off AND a rule is selected

https://github.com/elastic/kibana/assets/3775283/dbf9c899-85cc-465b-8f78-303ebee0cece

*After:*

Auto-refresh is switched off

https://github.com/elastic/kibana/assets/3775283/e7b98d15-5f33-44dc-b064-1014ec9382f9

Auto-refresh is switched off AND a rule is selected

https://github.com/elastic/kibana/assets/3775283/39a8fa9d-a2e8-451c-879b-5c08492518c9


## Checklist

Delete any items that are not applicable to this PR.

- [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


## Flaky test runner

[rules_table_auto_refresh.cy.ts (150 runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3027) 🟢
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.11 candidate bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.11.0
Projects
None yet
3 participants