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] fix unhandled error in agent details when components are missing #174152

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Jan 3, 2024

Summary

Closes #174012

Added a null check when agent.components is undefined, to prevent unhandled error in Agent Details UI.

To reproduce:

  1. start kibana locally/cloud version 8.12+
  2. create agent policy with endpoint 1.3.0 integration (can be latest too)
  3. enroll an agent version 7.17.16, can be in container
  4. navigate to agent details page, open the inputs arrows on the right
  5. expect that there is no error banner coming up, but an empty content
image

Checklist

@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Jan 3, 2024
@juliaElastic juliaElastic self-assigned this Jan 3, 2024
@juliaElastic juliaElastic requested a review from a team as a code owner January 3, 2024 10:39
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 3, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

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

LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.2MB 1.2MB +25.0B

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit 9da2776 into elastic:main Jan 3, 2024
27 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 3, 2024
…ing (elastic#174152)

## Summary

Closes elastic#174012

Added a null check when `agent.components` is undefined, to prevent
unhandled error in Agent Details UI.

To reproduce:
1. start kibana locally/cloud version 8.12+
2. create agent policy with endpoint 1.3.0 integration (can be latest
too)
3. enroll an agent version 7.17.16, can be in container
4. navigate to agent details page, open the inputs arrows on the right
5. expect that there is no error banner coming up, but an empty content

<img width="1197" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/dabcca72-4e08-4185-a166-a91136615904">

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 9da2776)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.12

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 Jan 3, 2024
…re missing (#174152) (#174156)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] fix unhandled error in agent details when components are
missing (#174152)](#174152)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-03T11:49:09Z","message":"[Fleet]
fix unhandled error in agent details when components are missing
(#174152)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/174012\r\n\r\nAdded a null
check when `agent.components` is undefined, to prevent\r\nunhandled
error in Agent Details UI.\r\n\r\nTo reproduce:\r\n1. start kibana
locally/cloud version 8.12+\r\n2. create agent policy with endpoint
1.3.0 integration (can be latest\r\ntoo)\r\n3. enroll an agent version
7.17.16, can be in container\r\n4. navigate to agent details page, open
the inputs arrows on the right\r\n5. expect that there is no error
banner coming up, but an empty content\r\n\r\n<img width=\"1197\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/dabcca72-4e08-4185-a166-a91136615904\">\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9da2776d6d89b9e62638d47f8fb5e6101c9bf8e9","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.12.0","v8.13.0"],"title":"[Fleet]
fix unhandled error in agent details when components are
missing","number":174152,"url":"https://github.com/elastic/kibana/pull/174152","mergeCommit":{"message":"[Fleet]
fix unhandled error in agent details when components are missing
(#174152)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/174012\r\n\r\nAdded a null
check when `agent.components` is undefined, to prevent\r\nunhandled
error in Agent Details UI.\r\n\r\nTo reproduce:\r\n1. start kibana
locally/cloud version 8.12+\r\n2. create agent policy with endpoint
1.3.0 integration (can be latest\r\ntoo)\r\n3. enroll an agent version
7.17.16, can be in container\r\n4. navigate to agent details page, open
the inputs arrows on the right\r\n5. expect that there is no error
banner coming up, but an empty content\r\n\r\n<img width=\"1197\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/dabcca72-4e08-4185-a166-a91136615904\">\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9da2776d6d89b9e62638d47f8fb5e6101c9bf8e9"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174152","number":174152,"mergeCommit":{"message":"[Fleet]
fix unhandled error in agent details when components are missing
(#174152)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/174012\r\n\r\nAdded a null
check when `agent.components` is undefined, to prevent\r\nunhandled
error in Agent Details UI.\r\n\r\nTo reproduce:\r\n1. start kibana
locally/cloud version 8.12+\r\n2. create agent policy with endpoint
1.3.0 integration (can be latest\r\ntoo)\r\n3. enroll an agent version
7.17.16, can be in container\r\n4. navigate to agent details page, open
the inputs arrows on the right\r\n5. expect that there is no error
banner coming up, but an empty content\r\n\r\n<img width=\"1197\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/dabcca72-4e08-4185-a166-a91136615904\">\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9da2776d6d89b9e62638d47f8fb5e6101c9bf8e9"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
jloleysens added a commit that referenced this pull request Jan 4, 2024
* main: (4129 commits)
  [Logs Explorer] Change the default link for "Discover" in the serverless nav (#173420)
  [Fleet] fix unhandled error in agent details when components are missing (#174152)
  [Obs UX] Unskip transaction duration alerts test (#174069)
  [Fleet] Fix keep policies up to date after package install (#174093)
  [Profiling] Stack traces embeddable (#173905)
  [main] Sync bundled packages with Package Storage (#174115)
  [SLO Form] Refactor to use kibana data view component (#173513)
  [Obs UX] Unskip APM Service Inventory Journey (#173510)
  [Obs UX] Unskip preview_chart_error_count test (#173624)
  [api-docs] 2024-01-03 Daily api_docs build (#174142)
  Update babel runtime helpers (#171745)
  Handle content stream errors in report pre-deletion (#173792)
  [Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table (#173870)
  [ftr] abort retry on invalid webdriver session (#174092)
  Upgrade openai to 4.24.1 (#173934)
  chore(NA): bump node into v20 (#173461)
  [Security Solution][Endpoint] Fix index name pattern in SentinelOne dev. script (#174105)
  fix versions.json
  [Obs AI Assistant] Add guardrails (#174060)
  [ML] Transforms: Refactor validators and add unit tests. (#173736)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.12.0 v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet][7.17.16 to 8.12.0 Upgrade] Red banner under Elastic Defend integration.
6 participants