+
Skip to content

Make rolling-updates-v2 preview feature #40732

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/src/main/java/org/keycloak/common/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public enum Feature {
LOGOUT_ALL_SESSIONS_V1("Logout all sessions logs out only regular sessions", Type.DEPRECATED, 1),

ROLLING_UPDATES_V1("Rolling Updates", Type.DEFAULT, 1),
ROLLING_UPDATES_V2("Rolling Updates for patch releases", Type.EXPERIMENTAL, 2),
ROLLING_UPDATES_V2("Rolling Updates for patch releases", Type.PREVIEW, 2),

/**
* @see <a href="https://github.com/keycloak/keycloak/issues/37967">Deprecate for removal the Instagram social broker</a>.
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/release_notes/topics/26_3_0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ Asynchronous logging helps deployments that require high throughput and low late

For more details on this opt-in feature, see the https://www.keycloak.org/server/logging[Logging guide].

= Rolling updates for patch releases for minimized downtime (experimental)
= Rolling updates for patch releases for minimized downtime (preview)

In the previous release, the Keycloak Operator was enhanced to support performing rolling updates of the Keycloak image if both images contain the same version.
This is useful, for example, when switching to an optimized image, changing a theme or a provider source code.

In this release, we extended this to perform rolling update when the new image contains a future patch release from the same `major.minor` release stream as an experimental feature.
In this release, we extended this to perform rolling update when the new image contains a future patch release from the same `major.minor` release stream as a preview feature.
This can reduce the service's downtime even further, as downtime is only needed when upgrading from a different minor or major version.

Read more on how to enable this feature in https://www.keycloak.org/server/update-compatibility#rolling-updates-for-patch-releases[update compatibility command].
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/server/update-compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The feature `rolling-updates` is disabled.
[[rolling-updates-for-patch-releases]]
== Rolling updates for patch releases

WARNING: This behavior is currently in an experimental mode, and it is not recommended for use in production.
WARNING: This behavior is currently in preview mode, and it is not recommended for use in production.

It is possible to configure the {project_name} compatibility command to allow rolling updates when upgrading to a newer patch version in the same `+major.minor+` release stream.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class FeaturesDistTest {
private static final String PREVIEW_FEATURES_EXPECTED_LOG = "Preview features enabled: " + Arrays.stream(Profile.Feature.values())
.filter(feature -> feature.getType() == Profile.Feature.Type.PREVIEW)
.filter(feature -> {
Set<Profile.Feature> versions = Profile.getFeatureVersions(feature.getKey());
Set<Profile.Feature> versions = Profile.getFeatureVersions(feature.getUnversionedKey());
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this change required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this is a bug. The method is calling getOrderedFeatures which returns map of f.getUnversionedKey() -> to all versions.

Therefore using versioned key here does not make sense and never finds anything. There was no versioned feature in preview mode at the moment so me changing ROLLING_UDPATES_V2 to preview triggered the bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for explaining. Please create an issue to track the bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it is worth the time creating an issue for one line change in tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I should have looked at the code closely, I made wrong assumptions based upon my reading of your explanation. I agree an issue is unnecessary.

if (versions.size() == 1) return true;
return versions.iterator().next().getVersion() == feature.getVersion();
})
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载