Skip to content

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

Merged

Conversation

laverya
Copy link
Member

@laverya laverya commented Apr 14, 2025

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?

@laverya laverya added the type::feature New feature or request label Apr 14, 2025
@laverya laverya marked this pull request as ready for review April 16, 2025 15:07
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")
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member Author

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 {
Copy link
Member

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.

@laverya laverya enabled auto-merge (squash) April 16, 2025 17:48
@laverya laverya merged commit e7b9030 into main Apr 16, 2025
94 checks passed
@laverya laverya deleted the laverya/sc-97016/enforce-using-the-same-binary-on-each-node branch April 16, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants