Skip to content

[Infra] Fix hosts view crashing on load#257893

Merged
AlejandroFrndz merged 6 commits into
elastic:mainfrom
AlejandroFrndz:257867-fix-hosts-view-crashing-on-load
Mar 16, 2026
Merged

[Infra] Fix hosts view crashing on load#257893
AlejandroFrndz merged 6 commits into
elastic:mainfrom
AlejandroFrndz:257867-fix-hosts-view-crashing-on-load

Conversation

@AlejandroFrndz
Copy link
Copy Markdown
Contributor

@AlejandroFrndz AlejandroFrndz commented Mar 16, 2026

Summary

Closes #257867

This PR introduces a fix to prevent the infra plugin hosts view page from crashing on load. Both parts of the problem are addressed

Control type value miss match

  1. Changes in x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts ensure urls are built with correct values and future proofs the page by replacing hardcoded strings with imported constants
  2. Changes in x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_control_panels_url_state.ts ensure any existing URL using old values for types can be handled and converted to the new model. This is to prevent users that might still be using old urls after upgrading (i.e. bookmars) from seeing broken filter controls

Embeddables error leading to a page crash

Changes in x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx ensure the hosts view page doesn't crash entirely if filter control embeddables run into critical issues. If a situation like this were to happen in the future, the page will render error UI in place of the filter controls. Page functionality will be degraded but we avoid a full page crash and maintain other page functions not directly related to embeddables

Tests

Updated/new tests for this plugin will be created in a follow up PR to ensure issues like this are caught by CI in the future before reaching production environments

@AlejandroFrndz AlejandroFrndz self-assigned this Mar 16, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @AlejandroFrndz

@AlejandroFrndz
Copy link
Copy Markdown
Contributor Author

/ci

@AlejandroFrndz AlejandroFrndz added Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 16, 2026
@AlejandroFrndz AlejandroFrndz marked this pull request as ready for review March 16, 2026 14:09
@AlejandroFrndz AlejandroFrndz requested review from a team as code owners March 16, 2026 14:09
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@rmyz rmyz self-requested a review March 16, 2026 14:15
Copy link
Copy Markdown
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

Obs UI changes LGTM

Copy link
Copy Markdown
Contributor

@rmyz rmyz left a comment

Choose a reason for hiding this comment

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

LGTM, tested and works fine, thanks for the fix!

Copy link
Copy Markdown
Contributor

@sbelastic sbelastic left a comment

Choose a reason for hiding this comment

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

@AlejandroFrndz I would just ask you to check if the skipped tests are now working with these fixes and un-skipped them if that's the case.
Besides that LGTM.

@AlejandroFrndz
Copy link
Copy Markdown
Contributor Author

@AlejandroFrndz I would just ask you to check if the skipped tests are now working with these fixes and un-skipped them if that's the case. Besides that LGTM.

Unfortunately, 4 tests in the suite are still failing even after the fix. Nevertheless I did confirm tests do fail without the fix as expected because the page is crashed. I'm not sure why these didn't flag the issues in the CI for #254079 before it was merged. We should maybe include tasks in any upcoming maintenance to look at these tests and migrate them to scout so they're more reliable

@AlejandroFrndz AlejandroFrndz merged commit e1b4930 into elastic:main Mar 16, 2026
26 checks passed
sorenlouv pushed a commit that referenced this pull request Mar 17, 2026
## Summary

Closes #257867

This PR introduces a fix to prevent the infra plugin hosts view page
from crashing on load. Both parts of the problem are addressed

### Control type value miss match

1. Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts`
ensure urls are built with correct values and future proofs the page by
replacing hardcoded strings with imported constants
2. Changes in
`x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_control_panels_url_state.ts`
ensure any existing URL using old values for types can be handled and
converted to the new model. This is to prevent users that might still be
using old urls after upgrading (i.e. bookmars) from seeing broken filter
controls

### Embeddables error leading to a page crash

Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx`
ensure the hosts view page doesn't crash entirely if filter control
embeddables run into critical issues. If a situation like this were to
happen in the future, the page will render error UI in place of the
filter controls. Page functionality will be degraded but we avoid a full
page crash and maintain other page functions not directly related to
embeddables

### Tests

Updated/new tests for this plugin will be created in a follow up PR to
ensure issues like this are caught by CI in the future before reaching
production environments

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 18, 2026
## Summary

Closes elastic#257867

This PR introduces a fix to prevent the infra plugin hosts view page
from crashing on load. Both parts of the problem are addressed

### Control type value miss match

1. Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts`
ensure urls are built with correct values and future proofs the page by
replacing hardcoded strings with imported constants
2. Changes in
`x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_control_panels_url_state.ts`
ensure any existing URL using old values for types can be handled and
converted to the new model. This is to prevent users that might still be
using old urls after upgrading (i.e. bookmars) from seeing broken filter
controls

### Embeddables error leading to a page crash

Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx`
ensure the hosts view page doesn't crash entirely if filter control
embeddables run into critical issues. If a situation like this were to
happen in the future, the page will render error UI in place of the
filter controls. Page functionality will be degraded but we avoid a full
page crash and maintain other page functions not directly related to
embeddables

### Tests

Updated/new tests for this plugin will be created in a follow up PR to
ensure issues like this are caught by CI in the future before reaching
production environments

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Mar 26, 2026
## Summary

Closes elastic#257867

This PR introduces a fix to prevent the infra plugin hosts view page
from crashing on load. Both parts of the problem are addressed

### Control type value miss match

1. Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts`
ensure urls are built with correct values and future proofs the page by
replacing hardcoded strings with imported constants
2. Changes in
`x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_control_panels_url_state.ts`
ensure any existing URL using old values for types can be handled and
converted to the new model. This is to prevent users that might still be
using old urls after upgrading (i.e. bookmars) from seeing broken filter
controls

### Embeddables error leading to a page crash

Changes in
`x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx`
ensure the hosts view page doesn't crash entirely if filter control
embeddables run into critical issues. If a situation like this were to
happen in the future, the page will render error UI in place of the
filter controls. Page functionality will be degraded but we avoid a full
page crash and maintain other page functions not directly related to
embeddables

### Tests

Updated/new tests for this plugin will be created in a follow up PR to
ensure issues like this are caught by CI in the future before reaching
production environments

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Infra] Hosts view crashing on load

6 participants