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

fix: Add flag to enable/disable referential constraints #3701

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

David-Jaeyoon-Lee
Copy link
Contributor

@David-Jaeyoon-Lee David-Jaeyoon-Lee commented Nov 14, 2024

What this PR does / why we need it:
This allows gatekeeper to set if referential constraints are enabled to disabled via a flag

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 #

Special notes for your reviewer:

@David-Jaeyoon-Lee David-Jaeyoon-Lee requested a review from a team as a code owner November 14, 2024 21:19
@David-Jaeyoon-Lee David-Jaeyoon-Lee changed the title [refactor] Disable referential constraints by default refactor: Disable referential constraints by default Nov 14, 2024
@David-Jaeyoon-Lee David-Jaeyoon-Lee changed the title refactor: Disable referential constraints by default fix: Disable referential constraints by default Nov 14, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.56%. Comparing base (3350319) to head (354b040).
Report is 207 commits behind head on master.

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

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (354b040)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3701      +/-   ##
==========================================
- Coverage   54.49%   47.56%   -6.93%     
==========================================
  Files         134      236     +102     
  Lines       12329    19923    +7594     
==========================================
+ Hits         6719     9477    +2758     
- Misses       5116     9553    +4437     
- Partials      494      893     +399     
Flag Coverage Δ
unittests 47.56% <ø> (-6.93%) ⬇️

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.

@David-Jaeyoon-Lee David-Jaeyoon-Lee changed the title fix: Disable referential constraints by default fix: Add flag to enable/disable referential constraints Nov 22, 2024
@David-Jaeyoon-Lee David-Jaeyoon-Lee force-pushed the davjlee/refactor/disable-ref-constraints branch from bfe0234 to 7008f88 Compare November 22, 2024 21:22
@David-Jaeyoon-Lee David-Jaeyoon-Lee force-pushed the davjlee/refactor/disable-ref-constraints branch from 7008f88 to 9de4ad9 Compare December 4, 2024 21:31
@JaydipGabani JaydipGabani requested a review from Copilot December 4, 2024 22:31

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

main.go:119

  • [nitpick] The description for the flag 'enable-referential-rules' is too long and may be confusing. Consider simplifying it to: 'Enable referential rules. Note: Referential constraints may not always be perfectly enforced due to Kubernetes controller consistency.'
enableReferential                    = flag.Bool("enable-referential-rules", true, "Enable referential rules. Only use this flag if you know what you're doing; referential rules have edge cases where referential constraints may not be perfectly enforced due to the eventual consistency inherent in Kubernetes controllers")
main.go Outdated Show resolved Hide resolved
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

Copy link
Contributor

@JaydipGabani JaydipGabani left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

4 participants