-
Notifications
You must be signed in to change notification settings - Fork 0
Automated Test: feature-rolling-updates-implementation #319
Changes from all 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 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,11 @@ preview="true" | |||||||||||
| previewDiscussionLink="https://github.com/keycloak/keycloak/discussions/36785" | ||||||||||||
| > | ||||||||||||
|
|
||||||||||||
| // TODO Link to discussion? | ||||||||||||
| [CAUTION] | ||||||||||||
| ==== | ||||||||||||
| While on preview stage, the feature `rolling-updates` must be enabled. | ||||||||||||
| Otherwise, the commands will fail. | ||||||||||||
| ==== | ||||||||||||
|
|
||||||||||||
| The goal of this tool is to assist with modifying a {project_name} deployment, whether upgrading to a new version, enabling/disabling features, or changing configuration. | ||||||||||||
| The outcome will indicate whether a rolling upgrade is possible or if a recreate upgrade is required. | ||||||||||||
|
|
@@ -124,6 +128,10 @@ m|2 | |||||||||||
| m|3 | ||||||||||||
| |Rolling Upgrade is not possible. | ||||||||||||
| The deployment must be shut down before applying the new configuration. | ||||||||||||
|
|
||||||||||||
| m|4 | ||||||||||||
| |Rolling Upgrade is not possible. | ||||||||||||
| The feature `rolling-updates` is disabled. | ||||||||||||
|
Comment on lines
+132
to
+134
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. Reword exit-code 4 to reflect “feature disabled.” Exit code 4 is returned before any compatibility evaluation, so describing it as “Rolling Upgrade is not possible” is misleading. Suggest wording like “Command cannot run because the preview feature ✏️ Suggested doc tweak-m|4
-|Rolling Upgrade is not possible.
-The feature `rolling-updates` is disabled.
+m|4
+|Command cannot run because the preview feature `rolling-updates` is disabled.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| |=== | ||||||||||||
|
|
||||||||||||
| </@tmpl.guide> | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,11 @@ | |
| public interface CompatibilityResult { | ||
|
|
||
| int ROLLING_UPGRADE_EXIT_CODE = 0; | ||
| int RECREATE_UPGRADE_EXIT_CODE = 4; | ||
| // see picocli.CommandLine.ExitCode | ||
| // 1 -> software error | ||
| // 2 -> usage error | ||
| int RECREATE_UPGRADE_EXIT_CODE = 3; | ||
| int FEATURE_DISABLED = 4; | ||
|
Comment on lines
+31
to
+35
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. 🧩 Analysis chain🏁 Script executed: # Search for references to RECREATE_UPGRADE_EXIT_CODE and exit code values
rg -n "RECREATE_UPGRADE_EXIT_CODE|FEATURE_DISABLED" --type java
# Check for test files that might reference exit codes
rg -n "exitCode|exit.*4|exit.*3" --type java -A 2 -B 2 | head -100
# Search for documentation files mentioning exit codes
fd -e adoc -e md | xargs grep -l "exit.code\|exitCode" 2>/dev/null || trueRepository: admin-coderabbit/coderabbit-keycloak-mirror Length of output: 15287 🏁 Script executed: # More focused search: find where these constants are used
rg -n "return RECREATE_UPGRADE_EXIT_CODE|return.*4|System.exit" --type java -A 2 -B 2
# Check the IncompatibilityResult class mentioned in original scratchpad
fd -n "IncompatibilityResult.java" --type fRepository: admin-coderabbit/coderabbit-keycloak-mirror Length of output: 50648 Breaking change: Exit code 4 now has different semantics. Previously, exit code 4 indicated that a recreate upgrade was required. After this change, exit code 4 now indicates that a feature is disabled, while exit code 3 indicates recreate upgrade is required. Any external scripts or automation tools checking for exit code 4 to detect the need for a recreate upgrade scenario will break and require updates. 🤖 Prompt for AI Agents |
||
|
|
||
| /** | ||
| * The compatible {@link CompatibilityResult} implementation | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 1973
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 115
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 12841
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 1464
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 5057
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 9971
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 1150
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 7218
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 3976
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 4631
🏁 Script executed:
Repository: admin-coderabbit/coderabbit-keycloak-mirror
Length of output: 5394
Clarify the specific failure mode and fix grammar.
The CAUTION states the Operator "will fail" if rolling-updates is not enabled, but the actual behavior is more limited: the update compatibility check commands (
kc update checkandkc update metadata) exit with a feature-disabled status when the feature is disabled. The Operator itself continues to function; it does not prevent general operation. Consider: "While the feature is in preview stage" (or "While in preview stage") instead of "While on preview stage" for correct grammar. Reword to clarify that this constraint applies to using rolling update compatibility checks, not to the Operator as a whole.🤖 Prompt for AI Agents