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] Agent upgrade available should use latest agent version #167410

Merged
merged 4 commits into from
Sep 29, 2023

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Sep 27, 2023

Summary

Closes #167387

Replaced using kibana version when deciding if agent upgrade is available (only in serverless, in stateful kibana version is still returned as an available version).

To verify locally:

  • [to test stateless] add this to kibana.dev.yml: xpack.fleet.internal.onlyAllowAgentUpgradeToKnownVersions: true
  • extract the agent_versions_list.json to local kibana folder ~/kibana/x-pack/plugins/fleet/target
    agent_versions_list.json.zip
  • verify that upgrade available warnings still work if agent is < latest agent version (8.10.2)
  • when trying to upgrade agent, verify that the default version is the latest agent version, and 8.11 is not in the list

Agent list:
image

Upgrade available filter - 1 agent on latest version, 9 upgradeable:
image

Agent details:
image

Agent on latest version has disable Upgrade agent action:
image

Bulk action with one agent that is not upgradeable (already on latest version), expected error:
image

Checklist

@juliaElastic juliaElastic added the release_note:skip Skip the PR/issue when compiling release notes label Sep 27, 2023
@juliaElastic juliaElastic self-assigned this Sep 27, 2023
@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!)

@juliaElastic juliaElastic marked this pull request as ready for review September 27, 2023 15:10
@juliaElastic juliaElastic requested a review from a team as a code owner September 27, 2023 15:10
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Sep 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@@ -60,8 +60,7 @@ export const getAvailableVersions = async ({
.sort((a: any, b: any) => (semverGt(a, b) ? -1 : 1));
versionsToDisplay = uniq(versions) as string[];

const appendCurrentVersion =
includeCurrentVersion ?? !config?.internal?.onlyAllowAgentUpgradeToKnownVersions;
const appendCurrentVersion = includeCurrentVersion;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed this not to include kibana version in stateful neither, as it's not correct for unreleased versions:
image

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

History

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

cc @juliaElastic

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

@criamico criamico merged commit 474c8ea into elastic:main Sep 29, 2023
@kibanamachine kibanamachine added v8.11.0 backport:skip This commit does not require backporting labels Sep 29, 2023
juliaElastic added a commit that referenced this pull request Oct 2, 2023
## Summary

The recent [change](#167410) broke
an integration test in agent where the test upgrades to a newer snapshot
version.

This change is removing the version check against the latest agent
version if `versionToUpgrade` is given.


### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.11.0
Projects
None yet
6 participants