-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Ingest Manager] Validate agent version <= Kibana version #70339
[Ingest Manager] Validate agent version <= Kibana version #70339
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
💚 Build SucceededBuild metrics
To update your PR or re-run it, just comment with: |
the latest 8.0 snapshot is failing when I try to enroll an Agent. Did we not update the UI 'enroll command' to be in line with this api change? we can track it in this issue: #70726 |
@@ -18,6 +20,12 @@ export async function enroll( | |||
metadata?: { local: any; userProvided: any }, | |||
sharedId?: string | |||
): Promise<Agent> { | |||
const kibanaVersion = appContextService.getKibanaVersion(); | |||
const version: string | undefined = metadata?.local?.elastic?.agent?.version; | |||
if (!version || semver.compare(version, kibanaVersion) === 1) { |
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.
I think .lte
or another comparison function is easier to understand. I had to look up the compare and it results to understand what was happening.
Do we need to set the includePrerelease option https://github.com/npm/node-semver#functions to deal with values like 8.0.0-SNAPSHOT
?
Summary
Resolve #69922
When using Fleet: validate that Elastic agent version <= Kibana version otherwise throw a 400 error
How to test this?
You can try to manually enroll an agent with