Skip to content

Add rolling-updates feature flag and compatibility framework - #7

Open
ShashankFC wants to merge 1 commit into
feature-rolling-updates-baselinefrom
feature-rolling-updates-implementation
Open

Add rolling-updates feature flag and compatibility framework#7
ShashankFC wants to merge 1 commit into
feature-rolling-updates-baselinefrom
feature-rolling-updates-implementation

Conversation

@ShashankFC

Copy link
Copy Markdown
Contributor

Test 4

Summary by CodeRabbit

  • New Features

    • Introduced Rolling Updates as a new preview feature for server maintenance operations.
  • Documentation

    • Added configuration instructions for enabling Rolling Updates in operator and server environments.
    • Added caution notices indicating the Rolling Updates feature must be enabled for upgrade operations to proceed.

✏️ Tip: You can customize this high-level summary in your review settings.


Replicated from ai-code-review-evaluation/keycloak-coderabbit#4

Closes #36840

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
@ShashankFC
ShashankFC requested a review from Copilot January 30, 2026 10:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_UPDATES as 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-updates feature 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),

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
}

void printFeatureDisabled() {
printError("Unable to use this command. The preview feature 'rolling-updates' is not enabled.");

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected grammar: 'Unable to use this command' should be 'This command cannot be used' or 'Unable to execute this command' for better clarity.

Suggested change
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.");

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants