Skip to content

Update status when summary is updated#128769

Merged
nchaulet merged 4 commits intoelastic:mainfrom
nchaulet:fix-plugin-status-update
Mar 31, 2022
Merged

Update status when summary is updated#128769
nchaulet merged 4 commits intoelastic:mainfrom
nchaulet:fix-plugin-status-update

Conversation

@nchaulet
Copy link
Copy Markdown
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?


if (reportedStatus.level !== previousReportedLevel) {
if (
reportedStatus.level !== previousReportedLevel ||
Copy link
Copy Markdown
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
Copy Markdown
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 PR does not require backporting labels Mar 29, 2022
@nchaulet nchaulet requested a review from gsoldevila March 29, 2022 15:53

if (reportedStatus.level !== previousReportedLevel) {
if (
reportedStatus.level !== previousReportedLevel ||
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/core/server/status/plugins_status.ts Outdated
@gsoldevila gsoldevila requested a review from afharo March 30, 2022 16:14
@kibana-ci
Copy link
Copy Markdown

💚 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 PR does not require backporting labels Mar 30, 2022
Copy link
Copy Markdown
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
Copy Markdown
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
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
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