Skip to content
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

Add recipe to change variation default #16

Merged
merged 5 commits into from
Dec 2, 2023

Conversation

timtebeek
Copy link
Contributor

What's changed?

Add recipe to change booleanVariation, stringVariation, doubleVariation and intVariation default values.

What's your motivation?

Allow folks to flip the default value to a new value as a feature matures, such that the right value is selected when it can not be retrieved.

Fixes #13

Have you considered any alternatives or workarounds?

Again, opted not to use FindFeatureFlag just yet, while further test data flow analysis on larger projects.

Any additional context

Folks that want store their feature keys in constants might want to first run this recipe to phase that out, ahead of removal.
https://docs.openrewrite.org/recipes/java/replaceconstant

@timtebeek timtebeek requested a review from shanman190 December 2, 2023 18:04
@timtebeek timtebeek self-assigned this Dec 2, 2023
Copy link
Collaborator

@shanman190 shanman190 left a comment

Choose a reason for hiding this comment

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

Looking good overall! I left a few comments, most of which are marked as stylistic and don't necessarily need to have anything done with them. I just pointed them out as I noticed them.

@timtebeek timtebeek merged commit d3136c8 into main Dec 2, 2023
1 check passed
@timtebeek timtebeek deleted the add-recipe-to-change-variation-default branch December 2, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Change the default value for a feature flag
2 participants