Feature flags: Support "auto-enable" feature flags#5262
Feature flags: Support "auto-enable" feature flags#5262
Conversation
6077888 to
5809753
Compare
a6dbdb4 to
1fa14bd
Compare
278510f to
cb1769d
Compare
kjnilsson
left a comment
There was a problem hiding this comment.
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.
cb1769d to
d339aa2
Compare
|
@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? |
|
I don't have any feature flags apart from a dummy one so no. Ok I will take a look |
d339aa2 to
1f271d1
Compare
1f271d1 to
01dd3ae
Compare
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.
01dd3ae to
0bf40ff
Compare
|
Closing this pull request for now. We don't have any use case for it currently. |
A feature flag can be marked as "auto-enable" by setting
auto_enableto 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.