-
-
Notifications
You must be signed in to change notification settings - Fork 583
fix(kafka): strip architecture suffix from Kafka image tags for semver parsing #3276
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -212,6 +212,11 @@ func validateKRaftVersion(fqName string) error { | |||||
| version = "v" + version | ||||||
| } | ||||||
|
|
||||||
| // remove the architecture suffix | ||||||
| if strings.HasSuffix(version, ".amd64") || strings.HasSuffix(version, ".arm64") { | ||||||
| version = version[:strings.LastIndex(version, ".")] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mdelapenya How about something like this? But at this point, we might as well let them use the image by fixing the version.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given we are using semver libraries to get a valid version, then we should honor it. I think this is a good compromise, failing if the version is not following semver. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @asahasrabuddhe let's apply that fix, so we can merge this PR Thanks! |
||||||
| } | ||||||
|
|
||||||
| if semver.Compare(version, "v7.4.0") < 0 { // version < v7.4.0 | ||||||
| return fmt.Errorf("version=%s. KRaft mode is only available since version 7.4.0", version) | ||||||
| } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.