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

[Uptime] Remove dependency that was causing effect to re-execute infinitely. #54160

Conversation

justinkambic
Copy link
Contributor

Summary

Resolves #54151.

As part of the effort to follow the es-lint rule react-hooks/exhaustive-deps, we've introduced a loop of constantly-executing effects in a hook designed to provide the index pattern for the application. This fix is temporary, we are tentatively planning to refactor this code to utilize the application's state store for the index pattern rather than storing it in local component state.

Testing

If you run current master you will encounter this, check your browser's network requests on the Overview page.

Run this patch and there should only be one request per call.

@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.6.0 labels Jan 7, 2020
@justinkambic justinkambic self-assigned this Jan 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@shahzad31 shahzad31 added the release_note:skip Skip the PR/issue when compiling release notes label Jan 7, 2020
@justinkambic justinkambic merged commit 7b33fd3 into elastic:master Jan 7, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 8, 2020
* master: (55 commits)
  [ui/public/utils] Copy rarely used items to where they are consumed (elastic#53819)
  set AppArch team as an owner of the search endpoints (elastic#54131)
  Don't expose Elasticsearch client as Observable (elastic#53824)
  [SIEM] Cleanup unnecessary use of enzyme-to-json (elastic#53980)
  fix ui exports doc (elastic#54138)
  change markdown element title (elastic#54194)
  [Logs UI] Refactor log position to hooks (elastic#53540)
  [SIEM] Implement NP Plugin Setup (elastic#54030)
  [DOCS] Updates ML links (elastic#53613)
  sort renovate packages in config
  Spaces - fix flakey api tests (elastic#54154)
  Remove dependency that was causing effect to re-execute infinitely. (elastic#54160)
  [dev/run] expose unexpected flags as more than just names (elastic#54080)
  [DOCS] Moves index pattern doc to Discover (elastic#53347)
  [SIEM] Cleanup React imports (elastic#53981)
  Update eslint related packages (elastic#54107)
  [Uptime] Added date range filter into expanded list query (elastic#52609)
  [SIEM] Add react/display-name eslint rule (elastic#53107)
  [SIEM] Enable eslint prefer-template rule (elastic#53983)
  Elasticsearch snapshots automation (elastic#53706)
  ...
@justinkambic
Copy link
Contributor Author

Backported to:
7.x/7.6.0 0fbec6f
#54356

@justinkambic justinkambic deleted the uptime_fix-infinite-index-pattern-loop branch January 9, 2020 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] Infinite requests for index pattern
4 participants