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

chore: adding warning for alpha flags #3764

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

JaydipGabani
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #3485

Special notes for your reviewer:

Signed-off-by: Jaydip Gabani <[email protected]>
@JaydipGabani JaydipGabani requested a review from a team as a code owner January 8, 2025 20:29
@JaydipGabani
Copy link
Contributor Author

@open-policy-agent/gatekeeper-maintainers There are other non-boolean alpha flags such as audit-chunk-size, which have been in alpha for a very long time, do we want to log warnings for such flags? if so, since these are non boolean flags, how do we determine if they are set by users or are being used by default?

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 47.70%. Comparing base (3350319) to head (c87f961).
Report is 230 commits behind head on master.

Files with missing lines Patch % Lines
pkg/audit/manager.go 0.00% 1 Missing ⚠️
pkg/controller/pubsub/pubsub_config_controller.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (c87f961). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (c87f961)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3764      +/-   ##
==========================================
- Coverage   54.49%   47.70%   -6.80%     
==========================================
  Files         134      236     +102     
  Lines       12329    19929    +7600     
==========================================
+ Hits         6719     9507    +2788     
- Misses       5116     9529    +4413     
- Partials      494      893     +399     
Flag Coverage Δ
unittests 47.70% <66.66%> (-6.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JaydipGabani JaydipGabani added this to the v3.19.0 milestone Jan 8, 2025
@ritazh
Copy link
Member

ritazh commented Jan 8, 2025

@JaydipGabani
Copy link
Contributor Author

JaydipGabani commented Jan 9, 2025

@ritazh Yeah those are non-boolean flags, so I am not sure when to log since non-boolean alpha flags are always in use. And if we add warnings for them now, it might alarm users and mislead them since some of these flags have been in alpha for very long time.

@ritazh
Copy link
Member

ritazh commented Jan 13, 2025

@ritazh Yeah those are non-boolean flags, so I am not sure when to log since non-boolean alpha flags are always in use. And if we add warnings for them now, it might alarm users and mislead them since some of these flags have been in alpha for very long time.

emit-audit-events and enable-pub-sub are boolean flags and default to false.

@JaydipGabani
Copy link
Contributor Author

@ritazh Yeah those are non-boolean flags, so I am not sure when to log since non-boolean alpha flags are always in use. And if we add warnings for them now, it might alarm users and mislead them since some of these flags have been in alpha for very long time.

emit-audit-events and enable-pub-sub are boolean flags and default to false.

Warning for enable-pub-sub when set to true is being added in this PR. I will add warning for emit-audit-events as well.

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh merged commit 8b6b614 into open-policy-agent:master Jan 15, 2025
17 checks passed
@JaydipGabani JaydipGabani deleted the alphs-warn branch January 15, 2025 19:55
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.

Log alpha status for existing alpha features/flags when in use
4 participants