-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 validation for agents upgrade and add warning in modal #132687
[Fleet] Fix validation for agents upgrade and add warning in modal #132687
Conversation
Pinging @elastic/fleet (Team:Fleet) |
I find the message a bit confusing, shouldn't it say |
@@ -710,39 +710,6 @@ export default function (providerContext: FtrProviderContext) { | |||
}) | |||
.expect(400); | |||
}); | |||
it('should respond 200 if trying to bulk upgrade to a version higher than the latest fleet server version if the agents include fleet server agents', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be a new integration test added to cover the new agent version check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there was an additional requirement that was removed. We originally had two cases:
1 when there is an agent that is a fleet server agent among the batch to be upgraded, allow the upgrade
2 if only "regular" elastic agents are in the batch, don't allow the upgrade
In this PR I'm simplifying the behaviour and removing the first case, so regardless of having or not fleet server agents in the batch, the upgrade is not allowed if the target version < max fleet server version. This case is already covered in the integration test, but I'm removing the test related to case 1.
I hope the explanation is clear.
Thanks for the feedback, I didn't get the finalised text of the message and tried to write it myself. I'll update it :)
That's a good point, this feature won't work at all on older versions of elastic agents. We agreed to put a warning message for the user, but since in the selected batch there might be several versions mixed up it's ok to attempt the update. If some agents are not upgradeable the API will fail (only for them). |
@elasticmachine merge upstream |
…sion_validation_improvements
4645aa9
to
a0cd620
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @criamico |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Summary
Part of #130259
Add a warning callout in the modal to explain that rolling upgrade is only for agent 8.3+. Callout will always be there regardless of the version of the selected agents.
Refactor and fix fleet server validation to not allow any upgrade if Fleet server is not upgraded before.
Add an option to the version selection combobox to type in a version (useful if the version is not available in the list for some reason). The input version is validated to check that is a valid version and is < kibana.
Checklist
Delete any items that are not applicable to this PR.