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

Removes "alpha." from the feature flags + adds deprecation warning for old flags #611

Merged
merged 6 commits into from
Mar 17, 2022

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Mar 3, 2022

Description

Feature flag shouldn't have the alpha. prefix, because they don't mean anything.
And moving them to beta or something else will not improve them just introduce more complex logic in the code.

If we want to deprecate 1 or a set of feature-flags we can do it using the validation webhook.

But because some user might already use some of these we should support them for a release or two, so this PR enables the use of both.
There is an exception when it comes to the new statsd feature-flags as they were not released before, so we don't have to support it there.

Also adds a warning in the webhook, if there is a deprecated annotation present in the annotation of the dynakube.

How can this be tested?

Try to apply a dynakube, with a deprecated feature-flag, it should work but you should also get a warning.
Then do the same but without the alpha. part, it should still work, but without the warning on the apply

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly

@0sewa0 0sewa0 added the core Changes to core functionality of the Operator label Mar 3, 2022
@0sewa0 0sewa0 requested review from a team and toszr March 3, 2022 14:25
@0sewa0 0sewa0 marked this pull request as draft March 3, 2022 14:37
@0sewa0 0sewa0 marked this pull request as ready for review March 3, 2022 15:09
@0sewa0 0sewa0 changed the title Removes "alpha-" from the feature flags + adds deprecation warning for old flags Removes "alpha." from the feature flags + adds deprecation warning for old flags Mar 3, 2022
toszr
toszr previously approved these changes Mar 3, 2022
Copy link
Contributor

@toszr toszr left a comment

Choose a reason for hiding this comment

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

Are you 100% sure all the non-alpha flags will be stable from now on and supported forever? Maybe we do want to introduce versioned flags (beta1. or so) to be on the safe side? After all they can be used by customers.

src/webhook/validation/deprecation.go Outdated Show resolved Hide resolved
src/webhook/validation/deprecation.go Outdated Show resolved Hide resolved
src/api/v1beta1/feature_flags.go Show resolved Hide resolved
@0sewa0 0sewa0 force-pushed the feature/migrate-feature-flags branch from 08eb85f to 0196fe4 Compare March 17, 2022 09:05
@0sewa0 0sewa0 requested a review from a team March 17, 2022 09:11
@0sewa0 0sewa0 enabled auto-merge (squash) March 17, 2022 11:38
@0sewa0 0sewa0 merged commit 0105856 into master Mar 17, 2022
@0sewa0 0sewa0 deleted the feature/migrate-feature-flags branch March 17, 2022 11:42
eogden93 added a commit to eogden93/dynatrace-operator that referenced this pull request Mar 17, 2022
As per PR Dynatrace#611 this change removes `alpha.` from feature flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core functionality of the Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants