Add rolling-updates feature flag and compatibility framework - #7
Add rolling-updates feature flag and compatibility framework#7ShashankFC wants to merge 1 commit into
Conversation
Closes #36840 Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a Rolling Updates feature flag and compatibility framework to enable controlled server upgrade strategies in Keycloak. The feature is marked as preview and requires explicit enablement through the rolling-updates feature flag.
Changes:
- Added
ROLLING_UPDATESas a new preview feature in the Profile enum - Implemented feature flag checks in update compatibility commands with a new exit code for disabled features
- Updated exit codes to align with picocli conventions, moving RECREATE_UPGRADE_EXIT_CODE from 4 to 3
- Updated documentation and configuration examples to require the
rolling-updatesfeature flag
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| common/src/main/java/org/keycloak/common/Profile.java | Adds ROLLING_UPDATES as a new preview feature |
| quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/compatibility/CompatibilityResult.java | Updates exit codes and adds FEATURE_DISABLED constant |
| quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/UpdateCompatibilityMetadata.java | Adds feature flag check before command execution |
| quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/UpdateCompatibilityCheck.java | Adds feature flag check before command execution |
| quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/AbstractUpdatesCommand.java | Adds method to print feature disabled error message |
| operator/src/test/java/org/keycloak/operator/testsuite/integration/UpgradeTest.java | Updates test to use FeatureSpec instead of UnsupportedSpec and enables rolling-updates |
| operator/scripts/Dockerfile-custom-image | Enables rolling-updates feature in build command |
| docs/guides/templates/kc.adoc | Updates template to include rolling-updates feature flag |
| docs/guides/server/update-compatibility.adoc | Adds documentation for new exit code 4 and feature requirement |
| docs/guides/operator/advanced-configuration.adoc | Adds caution notice and configuration example for enabling rolling-updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| IPA_TUURA_FEDERATION("IPA-Tuura user federation provider", Type.EXPERIMENTAL) | ||
| IPA_TUURA_FEDERATION("IPA-Tuura user federation provider", Type.EXPERIMENTAL), | ||
|
|
||
| ROLLING_UPDATES("Rolling Updates", Type.PREVIEW), |
There was a problem hiding this comment.
The feature key will be derived as 'rolling_updates' (with underscore) but documentation and configuration examples use 'rolling-updates' (with hyphen). Consider renaming to 'ROLLING_UPDATES' to ensure the key matches the documented usage, or verify that the key transformation handles this correctly.
| } | ||
|
|
||
| void printFeatureDisabled() { | ||
| printError("Unable to use this command. The preview feature 'rolling-updates' is not enabled."); |
There was a problem hiding this comment.
Corrected grammar: 'Unable to use this command' should be 'This command cannot be used' or 'Unable to execute this command' for better clarity.
| printError("Unable to use this command. The preview feature 'rolling-updates' is not enabled."); | |
| printError("This command cannot be used. The preview feature 'rolling-updates' is not enabled."); |
Test 4
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.
Replicated from ai-code-review-evaluation/keycloak-coderabbit#4