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] allow agent upgrades if patch version is higher than kibana #173167

Merged
merged 7 commits into from
Dec 13, 2023

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Dec 12, 2023

Summary

Closes #168502

Changed the version check to allow agent upgrade if the agent version has a newer patch than kibana.

To verify:

  • change kibana locally to return a mock version 8.11.0 here
  • enroll an agent version 8.11.0
  • verify that the upgrade is allowed to 8.11.1 and 8.11.2
  • verify that the upgrade works
image image image

Tested the new agent build version by adding a dummy version to the available_versions API response.
It is showing up for an agent 8.11.1 (same as the mock kibana version):
image

Checklist

@juliaElastic juliaElastic self-assigned this Dec 12, 2023
@juliaElastic juliaElastic requested a review from a team as a code owner December 12, 2023 15:11
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 12, 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!)

@kpollich
Copy link
Member

Getting the same log explorers here as in #173115

Copy link
Member

@kpollich kpollich 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, but was flaky

Failed CI Steps

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 +23.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 157.0KB 157.2KB +185.0B

History

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit a26eec4 into elastic:main Dec 13, 2023
39 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 13, 2023
…lastic#173167)

## Summary

Closes elastic#168502

Changed the version check to allow agent upgrade if the agent version
has a newer patch than kibana.

To verify:
- change kibana locally to return a mock version `8.11.0`
[here](https://github.com/elastic/kibana/blob/05bfe53cb3a2fe33ecb9eec4a6fcb19a492aaadf/x-pack/plugins/fleet/public/hooks/use_kibana_version.ts#L17)
- enroll an agent version 8.11.0
- verify that the upgrade is allowed to 8.11.1 and 8.11.2
- verify that the upgrade works

<img width="1282" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/0bb0c8ca-ac0f-49c1-b67c-b02d085e7045">
<img width="799" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/7be3b64b-43e5-451a-a630-65cfc2607dab">
<img width="1256" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/4841bc2a-5238-4854-a63e-27761a02f1e3">

Tested the new agent build version by adding a dummy version to the
available_versions API response.
It is showing up for an agent 8.11.1 (same as the mock kibana version):
<img width="775" alt="image"
src="https://github.com/elastic/kibana/assets/90178898/fa02c62d-9399-4c2c-8311-412e5fe03a96">

### 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 a26eec4)
@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 13, 2023
…ibana (#173167) (#173296)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Fleet] allow agent upgrades if patch version is higher than kibana
(#173167)](#173167)

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

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

<!--BACKPORT [{"author":{"name":"Julia
Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-13T16:00:20Z","message":"[Fleet]
allow agent upgrades if patch version is higher than kibana
(#173167)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/168502\r\n\r\nChanged the
version check to allow agent upgrade if the agent version\r\nhas a newer
patch than kibana.\r\n\r\nTo verify:\r\n- change kibana locally to
return a mock version
`8.11.0`\r\n[here](https://github.com/elastic/kibana/blob/05bfe53cb3a2fe33ecb9eec4a6fcb19a492aaadf/x-pack/plugins/fleet/public/hooks/use_kibana_version.ts#L17)\r\n-
enroll an agent version 8.11.0\r\n- verify that the upgrade is allowed
to 8.11.1 and 8.11.2\r\n- verify that the upgrade works\r\n\r\n<img
width=\"1282\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0bb0c8ca-ac0f-49c1-b67c-b02d085e7045\">\r\n<img
width=\"799\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7be3b64b-43e5-451a-a630-65cfc2607dab\">\r\n<img
width=\"1256\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/4841bc2a-5238-4854-a63e-27761a02f1e3\">\r\n\r\nTested
the new agent build version by adding a dummy version to
the\r\navailable_versions API response.\r\nIt is showing up for an agent
8.11.1 (same as the mock kibana version):\r\n<img width=\"775\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/fa02c62d-9399-4c2c-8311-412e5fe03a96\">\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","sha":"a26eec451fb54317a2b08d1f49b3f2b30fcbddca","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","v8.12.0","v8.13.0"],"number":173167,"url":"https://github.com/elastic/kibana/pull/173167","mergeCommit":{"message":"[Fleet]
allow agent upgrades if patch version is higher than kibana
(#173167)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/168502\r\n\r\nChanged the
version check to allow agent upgrade if the agent version\r\nhas a newer
patch than kibana.\r\n\r\nTo verify:\r\n- change kibana locally to
return a mock version
`8.11.0`\r\n[here](https://github.com/elastic/kibana/blob/05bfe53cb3a2fe33ecb9eec4a6fcb19a492aaadf/x-pack/plugins/fleet/public/hooks/use_kibana_version.ts#L17)\r\n-
enroll an agent version 8.11.0\r\n- verify that the upgrade is allowed
to 8.11.1 and 8.11.2\r\n- verify that the upgrade works\r\n\r\n<img
width=\"1282\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0bb0c8ca-ac0f-49c1-b67c-b02d085e7045\">\r\n<img
width=\"799\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7be3b64b-43e5-451a-a630-65cfc2607dab\">\r\n<img
width=\"1256\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/4841bc2a-5238-4854-a63e-27761a02f1e3\">\r\n\r\nTested
the new agent build version by adding a dummy version to
the\r\navailable_versions API response.\r\nIt is showing up for an agent
8.11.1 (same as the mock kibana version):\r\n<img width=\"775\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/fa02c62d-9399-4c2c-8311-412e5fe03a96\">\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","sha":"a26eec451fb54317a2b08d1f49b3f2b30fcbddca"}},"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/173167","number":173167,"mergeCommit":{"message":"[Fleet]
allow agent upgrades if patch version is higher than kibana
(#173167)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/168502\r\n\r\nChanged the
version check to allow agent upgrade if the agent version\r\nhas a newer
patch than kibana.\r\n\r\nTo verify:\r\n- change kibana locally to
return a mock version
`8.11.0`\r\n[here](https://github.com/elastic/kibana/blob/05bfe53cb3a2fe33ecb9eec4a6fcb19a492aaadf/x-pack/plugins/fleet/public/hooks/use_kibana_version.ts#L17)\r\n-
enroll an agent version 8.11.0\r\n- verify that the upgrade is allowed
to 8.11.1 and 8.11.2\r\n- verify that the upgrade works\r\n\r\n<img
width=\"1282\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/0bb0c8ca-ac0f-49c1-b67c-b02d085e7045\">\r\n<img
width=\"799\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/7be3b64b-43e5-451a-a630-65cfc2607dab\">\r\n<img
width=\"1256\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/4841bc2a-5238-4854-a63e-27761a02f1e3\">\r\n\r\nTested
the new agent build version by adding a dummy version to
the\r\navailable_versions API response.\r\nIt is showing up for an agent
8.11.1 (same as the mock kibana version):\r\n<img width=\"775\"
alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/90178898/fa02c62d-9399-4c2c-8311-412e5fe03a96\">\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","sha":"a26eec451fb54317a2b08d1f49b3f2b30fcbddca"}}]}]
BACKPORT-->

Co-authored-by: Julia Bardi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:fix 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 ] Fleet UI should allow upgrades to agents where the patch version is higher than Kibana
6 participants