-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
rabbit_feature_flags: Introduce hard vs. soft required feature flags #12466
Draft
dumbbell
wants to merge
3
commits into
main
Choose a base branch
from
enable-required-feature-flags-during-sync
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+301
−64
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
3 times, most recently
from
October 15, 2024 15:11
558e99e
to
2acffca
Compare
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
4 times, most recently
from
October 16, 2024 16:32
92379b4
to
cd88a14
Compare
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
from
October 28, 2024 09:41
cd88a14
to
18729d3
Compare
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
from
October 29, 2024 11:21
18729d3
to
eef3862
Compare
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
2 times, most recently
from
October 29, 2024 16:29
6fb7c50
to
28d511b
Compare
dumbbell
changed the title
rabbit_feature_flags: Enable required feature flags during sync
rabbit_feature_flags: Introduce hard vs. soft required feature flags
Oct 29, 2024
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
from
October 29, 2024 16:39
28d511b
to
b29fb1f
Compare
The |
[Why] Before this patch, required feature flags were basically checked during boot: they must have been enabled when they were mere stable feature flags. If they were not, the node refused to boot. This was easy for the developer because making a feature flag required allowed to remove the entire compatibility code. Very satisfying. Unfortunately, this was a pain point to end users, especially those who did not pay attention to RabbitMQ and the release notes and were just asking their package manager to update everything. They could end up with a node that refuse to boot. The only solution was to downgrade, enable the disabled stable feature flags, upgrade again. [How] This patch introduces two levels of requirement to required feature flags: * `hard`: this corresponds to the existing behavior where a node will refuse to boot if a hard required feature flag is not enabled before the upgrade. * `soft`: such a required feature flag will be automatically enabled during the upgrade to a version where it is marked as required. The level of requirement is set in the feature flag definition: -rabbit_feature_flag( {my_feature_flag, #{stability => required, require_level => hard }}). The default requirement level is `soft`. All existing required feature flags have now a requirement level of `hard`. The handling of soft required feature flag is done when the cluster feature flags states are verified and synchronized. If a required feature flag is not enabled yet, it is enabled at that time. This means that as developers, we will have to keep compatibility code forever for every soft required feature flag, like the feature flag definition itself.
[Why] `failed_to_initialize_feature_flags_registry` was a little too vague.
dumbbell
force-pushed
the
enable-required-feature-flags-during-sync
branch
from
October 29, 2024 16:53
b29fb1f
to
de1d076
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Before this patch, required feature flags were basically checked during boot: they must have been enabled when they were mere stable feature flags. If they were not, the node refused to boot.
This was easy for the developer because making a feature flag required allowed to remove the entire compatibility code. Very satisfying.
Unfortunately, this was a pain point to end users, especially those who did not pay attention to RabbitMQ and the release notes and were just asking their package manager to update everything. They could end up with a node that refuse to boot. The only solution was to downgrade, enable the disabled stabte feature flags, upgrade again.
How
This patch introduces two levels of requirement to required feature flags:
hard
: this corresponds to the existing behavior where a node will refuse to boot if a hard required feature flag is not enabled before the upgrade.soft
: such a required feature flag will be automatically enabled during the upgrade to a version where it is marked as required.The level of requirement is set in the feature flag definition:
The default requirement level is
soft
. All existing required feature flags have now a requirement level ofhard
.The handling of soft required feature flag is done when the cluster feature flags states are verified and synchronized. If a required feature flag is not enabled yet, it is enabled at that time.
This means that as developers, we will have to keep compatibility code forever for every soft required feature flag, like the feature flag definition itself.