Skip to content

Feature flags: Support "auto-enable" feature flags#5262

Closed
dumbbell wants to merge 1 commit intomainfrom
support-auto-enable-for-feature-flags
Closed

Feature flags: Support "auto-enable" feature flags#5262
dumbbell wants to merge 1 commit intomainfrom
support-auto-enable-for-feature-flags

Conversation

@dumbbell
Copy link
Copy Markdown
Collaborator

A feature flag can be marked as "auto-enable" by setting auto_enable to true in its properties.

An auto-enable feature flag is automatically enabled as soon as all nodes in the cluster support it. This is achieved by trying to enable it when RabbitMQ starts, when a plugin is enabled/disabled or when a node joins/re-joins a cluster. If the feature flag can't be enabled, the error is ignored.

However, it should be used cautiously, especially if the feature flag has a migration function, because it might be enabled at an inappropriate time w.r.t. the user's workload.

@dumbbell dumbbell requested a review from kjnilsson July 19, 2022 06:32
@dumbbell dumbbell self-assigned this Jul 19, 2022
@dumbbell dumbbell force-pushed the support-auto-enable-for-feature-flags branch from 6077888 to 5809753 Compare July 19, 2022 07:44
@dumbbell dumbbell force-pushed the support-auto-enable-for-feature-flags branch 2 times, most recently from a6dbdb4 to 1fa14bd Compare July 28, 2022 14:23
@dumbbell dumbbell force-pushed the support-auto-enable-for-feature-flags branch 3 times, most recently from 278510f to cb1769d Compare August 9, 2022 08:36
kjnilsson
kjnilsson previously approved these changes Aug 9, 2022
Copy link
Copy Markdown
Contributor

@kjnilsson kjnilsson left a comment

Choose a reason for hiding this comment

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

I can't claim to understand the ff code very well but in terms of the description and this feature looks good to me and will be great for simple cross-broker protocol changes that users should not have to interact with directly.

@dumbbell dumbbell force-pushed the support-auto-enable-for-feature-flags branch from cb1769d to d339aa2 Compare August 11, 2022 07:48
@dumbbell
Copy link
Copy Markdown
Collaborator Author

@kjnilsson: Do you mind if I wait a real use case before merging this? I mean, when you have a feature flag which would benefit from this, then we can really test that the behavior is the one expected.

@kjnilsson
Copy link
Copy Markdown
Contributor

@kjnilsson: Do you mind if I wait a real use case before merging this? I mean, when you have a feature flag which would benefit from this, then we can really test that the behavior is the one expected.

The two linked PRs need this feature. How should we proceed?

@dumbbell
Copy link
Copy Markdown
Collaborator Author

@kjnilsson: Do you mind if I wait a real use case before merging this? I mean, when you have a feature flag which would benefit from this, then we can really test that the behavior is the one expected.

The two linked PRs need this feature. How should we proceed?

You could rebase your branches on top of this one and see how it goes when doing manal upgrade tests and/or running testsuites in a mixed-version mode.

You won't have any migration function associated with your feature flags, right?

@kjnilsson
Copy link
Copy Markdown
Contributor

I don't have any feature flags apart from a dummy one so no.

Ok I will take a look

A feature flag can be marked as "auto-enable" by setting `auto_enable` to
true in its properties.

An auto-enable feature flag is automatically enabled as soon as all
nodes in the cluster support it. This is achieved by trying to enable it
when RabbitMQ starts, when a plugin is enabled/disabled or when a node
joins/re-joins a cluster. If the feature flag can't be enabled, the
error is ignored.

An auto-enable feature flag also implicitly depends on
`feature_flags_v2`.

However, it should be used cautiously, especially if the feature flag
has a migration function, because it might be enabled at an
inappropriate time w.r.t. the user's workload.
@dumbbell dumbbell force-pushed the support-auto-enable-for-feature-flags branch from 01dd3ae to 0bf40ff Compare October 6, 2022 19:31
@michaelklishin michaelklishin added this to the 3.12.0 milestone Oct 13, 2022
@dumbbell
Copy link
Copy Markdown
Collaborator Author

dumbbell commented Feb 7, 2023

Closing this pull request for now. We don't have any use case for it currently.

@dumbbell dumbbell closed this Feb 7, 2023
@dumbbell dumbbell removed this from the 3.12.0 milestone Feb 7, 2023
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