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

Update status when summary is updated #128769

Merged
merged 4 commits into from
Mar 31, 2022

Conversation

nchaulet
Copy link
Member

Summary

Related to #127075

In #128324 the status feature was rewritten causing status to not be updated if the level do not change, Fleet update the status summary without updating the level.

That PR fix that regression, should we compare the whole status and previous status if other fields are updated?


this.pluginData[plugin].reportedStatus = reportedStatus;
this.pluginStatus[plugin] = reportedStatus;

if (reportedStatus.level !== previousReportedLevel) {
if (
reportedStatus.level !== previousReportedLevel ||
Copy link
Member Author

Choose a reason for hiding this comment

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

should we compare the whole reportedStatus to previoudReportedStatus here?

Copy link
Member

Choose a reason for hiding this comment

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

It might make us less prone to breakage if compare the whole status object here, yes. What does this object look like? Is it simple enough to do a shallow equality check here?

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Mar 29, 2022

this.pluginData[plugin].reportedStatus = reportedStatus;
this.pluginStatus[plugin] = reportedStatus;

if (reportedStatus.level !== previousReportedLevel) {
if (
reportedStatus.level !== previousReportedLevel ||
Copy link
Member

Choose a reason for hiding this comment

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

It might make us less prone to breakage if compare the whole status object here, yes. What does this object look like? Is it simple enough to do a shallow equality check here?

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

The changes LGTM. I'll rely on @gsoldevila to confirm though.

@gsoldevila gsoldevila requested a review from afharo March 30, 2022 16:14
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@nchaulet nchaulet added v8.3.0 auto-backport Deprecated - use backport:version if exact versions are needed and removed backport:skip This commit does not require backporting labels Mar 30, 2022
Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @nchaulet and @gsoldevila for your changes!

@nchaulet nchaulet merged commit abe70c5 into elastic:main Mar 31, 2022
@nchaulet nchaulet deleted the fix-plugin-status-update branch March 31, 2022 11:25
kibanamachine pushed a commit that referenced this pull request Mar 31, 2022
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Mar 31, 2022
(cherry picked from commit abe70c5)

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
gsoldevila added a commit to gsoldevila/kibana that referenced this pull request Apr 5, 2022
gsoldevila added a commit that referenced this pull request Apr 6, 2022
…ucing heap size) (#128324) (#129507)

* Rewrite plugin_status logic limiting usage of Observables (reducing heap size) (#128324)

* WIP

* Fix behavior when no plugins are defined

* Remove unused import, reduce debounce times

* Fix startup behavior

* Misc improvements following PR comments

* Fix plugin_status UTs

* Code cleanup + enhancements

* Remove fixed FIXME

(cherry picked from commit a645545)

* Add extra tests from #128769

* Fix linting issues (older typescript version?)

* Fix TS version issues
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 bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.2.0 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants