-
Notifications
You must be signed in to change notification settings - Fork 1.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
Enable multi version single step downgrade for KRaft based clusters #10929
base: main
Are you sure you want to change the base?
Conversation
9b600bd
to
38f90ce
Compare
Signed-off-by: MichaelMorris <[email protected]>
38f90ce
to
6831c64
Compare
@MichaelMorrisEst I guess this is ready for review and should match the approved proposal now, or? |
try { | ||
versionFrom = versions.version(highestKafkaVersion); | ||
} catch (KafkaUpgradeException exception) { | ||
// From version is unknown but thats ok for downgrade |
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.
Maybe we should log some warning here? If nothing else, it would be useful to have it tracked as part of the logs in case we are analyzing issues etc.
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.
Yes, I will add a log statement
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/KRaftVersionChangeCreator.java
Show resolved
Hide resolved
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 this be also unit tested for example here? KafkaUpgradeDowngradeWithKRaftMockTest
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.
Done
/azp run regression |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: MichaelMorris <[email protected]>
Yes |
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. Thanks.
public static String getHigherVersionThanLatest() { | ||
String[] parsedVersion = LATEST_KAFKA_VERSION.split("\\."); | ||
int incrementedMinorVersion = Integer.parseInt(parsedVersion[1]) + 1; | ||
parsedVersion[1] = Integer.toString(incrementedMinorVersion); | ||
return String.join(".", parsedVersion); | ||
} |
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.
Would it make sense to have instead some constant with something like 99.0.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.
Done
/azp run regression |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: MichaelMorris <[email protected]>
...r/src/main/java/io/strimzi/operator/cluster/operator/assembly/KRaftVersionChangeCreator.java
Show resolved
Hide resolved
Co-authored-by: Paolo Patierno <[email protected]> Signed-off-by: Michael Morris <[email protected]>
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.
Type of change
Select the type of your PR
Description
Closes #10928
Introduces handling for encountering an unknown Kafka version in downgrade of a KRaft based cluster in order to enable multi version single step downgrade
Checklist
Please go through this checklist and make sure all applicable tasks have been done