Skip to content

Conversation

admin-coderabbit
Copy link
Owner

@admin-coderabbit admin-coderabbit commented Feb 4, 2026

This pull request was automatically created by @coderabbitai/e2e-reviewer.

Batch created pull request.

Summary by CodeRabbit

  • New Features

    • Introduced Rolling Updates feature (preview)
  • Documentation

    • Updated operator and server guides with feature configuration requirements
    • Added feature enablement examples and validation guidance
  • Chores

    • Updated operator Docker image configuration
    • Updated test suite for feature management

Closes #36840

Signed-off-by: Pedro Ruivo <pruivo@redhat.com>
@coderabbit-eval
Copy link

coderabbit-eval bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

This PR introduces the ROLLING_UPDATES preview feature to Keycloak, requiring explicit feature enablement across operator configurations, build processes, and CLI commands. Update-related commands are gated with feature checks that return early with a new exit code if the feature is disabled, and documentation is updated to reflect the new requirement.

Changes

Cohort / File(s) Summary
Feature Definition
common/src/main/java/org/keycloak/common/Profile.java
Added ROLLING_UPDATES enum constant to the Feature nested enum with PREVIEW type.
Documentation Updates
docs/guides/operator/advanced-configuration.adoc, docs/guides/server/update-compatibility.adoc, docs/guides/templates/kc.adoc
Added CAUTION blocks requiring rolling-updates feature enablement, included feature configuration examples in Keycloak CR specs, updated command-line invocations with --features=rolling-updates flag, and clarified update behavior with new exit codes.
Operator and Build Configuration
operator/scripts/Dockerfile-custom-image, operator/src/test/java/org/keycloak/operator/testsuite/integration/UpgradeTest.java
Added --features=rolling-updates flag to Docker build command; replaced UnsupportedSpec with FeatureSpec in test initialization and configured enabled features list.
CLI Command Guards and Exit Codes
quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/AbstractUpdatesCommand.java, quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/UpdateCompatibilityCheck.java, quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/UpdateCompatibilityMetadata.java, quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/compatibility/CompatibilityResult.java
Added feature-disabled check and early return guard to update commands; introduced printFeatureDisabled() helper method; updated exit codes (RECREATE_UPGRADE_EXIT_CODE: 4→3) and added new FEATURE_DISABLED constant (4).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rolling update hops into view,
With features that flag what we can do,
The preview stage gates what's new,
Exit codes guide us, crisp and true—
Updates now dance with caution anew! ✨

🚥 Pre-merge checks | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes an automated test for rolling-updates feature implementation, but the actual changeset implements the feature itself, not just a test. Revise the title to accurately reflect the main changes: implement the rolling-updates feature across the codebase with necessary configuration and validation logic.
Description check ⚠️ Warning The description is minimal and only indicates the PR was auto-generated, lacking substantive details about the feature being implemented, its purpose, or the changes made. Add a detailed description explaining the rolling-updates feature being implemented, its purpose, affected components, and configuration requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature-rolling-updates-implementation

Comment @coderabbit eval help to get the list of available commands and usage tips.

@coderabbit-eval coderabbit-eval bot closed this Feb 4, 2026
Copy link

@coderabbit-eval coderabbit-eval bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/guides/operator/advanced-configuration.adoc`:
- Around line 446-451: Replace the awkward phrase "While on preview stage" in
the admonition paragraph about the feature `rolling-updates` with a clearer
alternative such as "While in preview stage" or "While the feature is in
preview" so the sentence reads naturally (e.g., "While the feature is in
preview, the feature `rolling-updates` must be enabled.").

In `@docs/guides/server/update-compatibility.adoc`:
- Around line 12-16: Replace the ungrammatical phrase "While on preview stage"
with "While in the preview stage" in the documentation block that mentions the
`rolling-updates` feature so the sentence reads: "While in the preview stage,
the feature `rolling-updates` must be enabled." Ensure the surrounding warning
block and the `rolling-updates` inline code markup remain unchanged.
🧹 Nitpick comments (1)
quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/cli/command/AbstractUpdatesCommand.java (1)

83-85: Consider using Profile.Feature.ROLLING_UPDATES.getKey() instead of the hardcoded string.

The feature key 'rolling-updates' is hardcoded. Using Profile.Feature.ROLLING_UPDATES.getKey() would keep the message in sync if the feature is ever renamed. That said, callers already import Profile, so the dependency wouldn't be new to the command hierarchy.

Comment on lines +446 to +451
[CAUTION]
====
While on preview stage, the feature `rolling-updates` must be enabled.
Otherwise, the {project_name} Operator will fail.
====

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Minor grammar issue: "While on preview stage"

Line 448: "While on preview stage" reads awkwardly. Consider "While in preview stage" or "While the feature is in preview".

📝 Suggested fix
 [CAUTION]
 ====
-While on preview stage, the feature `rolling-updates` must be enabled.
+While in preview, the feature `rolling-updates` must be enabled.
 Otherwise, the {project_name} Operator will fail.
 ====
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[CAUTION]
====
While on preview stage, the feature `rolling-updates` must be enabled.
Otherwise, the {project_name} Operator will fail.
====
[CAUTION]
====
While in preview, the feature `rolling-updates` must be enabled.
Otherwise, the {project_name} Operator will fail.
====
🤖 Prompt for AI Agents
In `@docs/guides/operator/advanced-configuration.adoc` around lines 446 - 451,
Replace the awkward phrase "While on preview stage" in the admonition paragraph
about the feature `rolling-updates` with a clearer alternative such as "While in
preview stage" or "While the feature is in preview" so the sentence reads
naturally (e.g., "While the feature is in preview, the feature `rolling-updates`
must be enabled.").

Comment on lines +12 to +16
[CAUTION]
====
While on preview stage, the feature `rolling-updates` must be enabled.
Otherwise, the commands will fail.
====

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Minor grammar nit: "on preview stage" → "in the preview stage".

Line 14 reads "While on preview stage" which is slightly ungrammatical. Consider "While in the preview stage" for clarity.

📝 Proposed fix
 [CAUTION]
 ====
-While on preview stage, the feature `rolling-updates` must be enabled.
+While in the preview stage, the feature `rolling-updates` must be enabled.
 Otherwise, the commands will fail.
 ====
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[CAUTION]
====
While on preview stage, the feature `rolling-updates` must be enabled.
Otherwise, the commands will fail.
====
[CAUTION]
====
While in the preview stage, the feature `rolling-updates` must be enabled.
Otherwise, the commands will fail.
====
🤖 Prompt for AI Agents
In `@docs/guides/server/update-compatibility.adoc` around lines 12 - 16, Replace
the ungrammatical phrase "While on preview stage" with "While in the preview
stage" in the documentation block that mentions the `rolling-updates` feature so
the sentence reads: "While in the preview stage, the feature `rolling-updates`
must be enabled." Ensure the surrounding warning block and the `rolling-updates`
inline code markup remain unchanged.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant