-
Notifications
You must be signed in to change notification settings - Fork 98
use EC kinds for the EC node join response, and include the app version #5274
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
use EC kinds for the EC node join response, and include the app version #5274
Conversation
currentAppVersionLabel = appVersion.VersionLabel | ||
} else { | ||
// if there are no installed apps, we can't get the current app version label | ||
logger.Info("no installed apps found") |
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 this should fail. same if the list of installed apps != 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.
You can join nodes before installing an app - or at least that's my understanding of the sequencing
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.
the app would be installed at this point. the meaning of installed
here is a bit different... it's not that the app got deployed, it means that the license (and airgap bundle) have been processed.
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.
Gotcha
I'd still rather fall back to "we don't include the app version in the response" instead of "you can't join nodes" though - this is an extra layer of safety check, but far from the only one
var currentAppVersionLabel string | ||
// attempt to get the current app version label from the installed app | ||
installedApps, err := store.GetStore().ListInstalledApps() | ||
if err == nil && len(installedApps) > 0 { |
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 you should fail if err != nil
here, as that won't fail if there are no apps installed.
What this PR does / why we need it:
This uses an imported struct from embedded-cluster for the embedded-cluster node join response, and also includes the current app version label in that response when an app is installed.
Which issue(s) this PR fixes:
Does this PR require a test?
Does this PR require a release note?
Does this PR require documentation?