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] adding upgrade details UPG_FAILED check to stuck in updating #173628

Merged
merged 8 commits into from
Dec 21, 2023

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Dec 19, 2023

Summary

Closes #171419

Added upgrade details check to restart upgrade callout when agent is stuck in updating.
Changed the copy slightly when the agent has failed upgrade state.

image

Existing copy when there is no upgrade details (stuck in updating for more than 2 hours):
image

Adjusted Agent list tooltip as well if upgrade details state is failed.

image

Checklist

@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes v8.12.0 labels Dec 19, 2023
@juliaElastic juliaElastic self-assigned this Dec 19, 2023
@juliaElastic juliaElastic requested a review from a team as a code owner December 19, 2023 13:56
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 19, 2023
@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!)

!agent.upgraded_at &&
Date.now() - Date.parse(agent.upgrade_started_at) >
AGENT_UPDATING_TIMEOUT_HOURS * 60 * 60 * 1000
(agent.status !== 'offline' && agent.active && isAgentInFailedUpgradeState(agent)) ||
Copy link
Contributor Author

Choose a reason for hiding this comment

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

after the latest discussion here changed the logic to consider stuck in updating if upgrade failed, even though agent is back to online

@criamico
Copy link
Contributor

@elasticmachine merge upstream

@criamico
Copy link
Contributor

@elasticmachine merge upstream

@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 +488.0B

Page load bundle

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

id before after diff
fleet 158.9KB 159.1KB +197.0B

History

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

cc @juliaElastic

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.

code LGTM 🚀

@jlind23 jlind23 merged commit 1f3d3ea into elastic:main Dec 21, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 21, 2023
…lastic#173628)

## Summary

Closes elastic#171419

Added upgrade details check to restart upgrade callout when agent is
stuck in updating.
Changed the copy slightly when the agent has failed upgrade state.

<img width="653" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/50061732-aa92-495b-b683-4d96114a1d5a">

Existing copy when there is no upgrade details (stuck in updating for
more than 2 hours):
<img width="609" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/14413c4a-ce51-49fa-a217-68993c4378fd">

Adjusted Agent list tooltip as well if upgrade details state is failed.

<img width="513" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/6836e02e-2c30-4c0a-91ea-8baddb0ccf03">

### 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

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 1f3d3ea)
@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 Dec 21, 2023
…dating (#173628) (#173807)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] adding upgrade details UPG_FAILED check to stuck in updating
(#173628)](#173628)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-12-21T08:06:02Z","message":"[Fleet]
adding upgrade details UPG_FAILED check to stuck in updating
(#173628)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/171419\r\n\r\nAdded upgrade
details check to restart upgrade callout when agent is\r\nstuck in
updating.\r\nChanged the copy slightly when the agent has failed upgrade
state.\r\n\r\n<img width=\"653\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/50061732-aa92-495b-b683-4d96114a1d5a\">\r\n\r\nExisting
copy when there is no upgrade details (stuck in updating for\r\nmore
than 2 hours):\r\n<img width=\"609\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/14413c4a-ce51-49fa-a217-68993c4378fd\">\r\n\r\nAdjusted
Agent list tooltip as well if upgrade details state is
failed.\r\n\r\n<img width=\"513\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/6836e02e-2c30-4c0a-91ea-8baddb0ccf03\">\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"1f3d3eaaa703ddc470ebe3e2e6140cd068434f14","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.12.0","v8.13.0"],"number":173628,"url":"https://github.com/elastic/kibana/pull/173628","mergeCommit":{"message":"[Fleet]
adding upgrade details UPG_FAILED check to stuck in updating
(#173628)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/171419\r\n\r\nAdded upgrade
details check to restart upgrade callout when agent is\r\nstuck in
updating.\r\nChanged the copy slightly when the agent has failed upgrade
state.\r\n\r\n<img width=\"653\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/50061732-aa92-495b-b683-4d96114a1d5a\">\r\n\r\nExisting
copy when there is no upgrade details (stuck in updating for\r\nmore
than 2 hours):\r\n<img width=\"609\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/14413c4a-ce51-49fa-a217-68993c4378fd\">\r\n\r\nAdjusted
Agent list tooltip as well if upgrade details state is
failed.\r\n\r\n<img width=\"513\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/6836e02e-2c30-4c0a-91ea-8baddb0ccf03\">\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"1f3d3eaaa703ddc470ebe3e2e6140cd068434f14"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/173628","number":173628,"mergeCommit":{"message":"[Fleet]
adding upgrade details UPG_FAILED check to stuck in updating
(#173628)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/171419\r\n\r\nAdded upgrade
details check to restart upgrade callout when agent is\r\nstuck in
updating.\r\nChanged the copy slightly when the agent has failed upgrade
state.\r\n\r\n<img width=\"653\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/50061732-aa92-495b-b683-4d96114a1d5a\">\r\n\r\nExisting
copy when there is no upgrade details (stuck in updating for\r\nmore
than 2 hours):\r\n<img width=\"609\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/14413c4a-ce51-49fa-a217-68993c4378fd\">\r\n\r\nAdjusted
Agent list tooltip as well if upgrade details state is
failed.\r\n\r\n<img width=\"513\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/6836e02e-2c30-4c0a-91ea-8baddb0ccf03\">\r\n\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\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"1f3d3eaaa703ddc470ebe3e2e6140cd068434f14"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
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] Update restart agent upgrade action to use upgrade details
8 participants