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

[Fleet] Fixing unnecessary network requests on showing Fleet Server on prem instructions #117647

Merged
merged 4 commits into from
Nov 8, 2021

Conversation

juliaElastic
Copy link
Contributor

Fixing a bug I observed in v7.16, v8.0
When opening Fleet UI for the first time, there are continuous /settings and /outputs network calls being made (~3k/min).

image

By digging in the code, it seems related to useEffect having refresh function as dependency.
https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx#L281
https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_requirements_page/components/fleet_server_on_prem_instructions.tsx#L701
By removing this dependency, the extra network requests no longer happen, only when the Fleet settings modal is toggled as expected.

This feature was initially implemented here: #103550

@juliaElastic juliaElastic added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v8.1.0 labels Nov 5, 2021
@juliaElastic juliaElastic requested a review from nchaulet November 5, 2021 12:49
@juliaElastic juliaElastic requested a review from a team as a code owner November 5, 2021 12:49
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Thanks for fixing this!
We should probably backport this to 7.16 what do you think?

@juliaElastic
Copy link
Contributor Author

@kpollich are you okay with latest changes? I can't merge until it shows as change requested

@juliaElastic juliaElastic enabled auto-merge (squash) November 5, 2021 16:27
Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@kpollich
Copy link
Member

kpollich commented Nov 8, 2021

@elasticmachine merge upstream

@juliaElastic juliaElastic merged commit f0017ce into elastic:main Nov 8, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 105.3KB 105.2KB -127.0B

History

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

cc @juliaElastic

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 8, 2021
…n prem instructions (elastic#117647)

* removed fn dependency

* fixing useDefaultOutput

* fixed tslint
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 8, 2021
…n prem instructions (elastic#117647)

* removed fn dependency

* fixing useDefaultOutput

* fixed tslint
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 8, 2021
…n prem instructions (#117647) (#117867)

* removed fn dependency

* fixing useDefaultOutput

* fixed tslint

Co-authored-by: Julia Bardi <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 8, 2021
…n prem instructions (#117647) (#117866)

* removed fn dependency

* fixing useDefaultOutput

* fixed tslint

Co-authored-by: Julia Bardi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants