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(cli): Convert policy set --manual to use a tri-state #3349

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

Conversation

PhracturedBlue
Copy link
Contributor

As per issue #3344, If Manual is set to true in a more-general policy, it cannot be reset to false in a lower policy. This is due to manual being a bool, and there being no way to distinguish between 'inherit' and 'false'

This PR converts Manual into an OptionalBool so that it can hold values of true, false, and inherit, and can thus override both from false->true and from true->false

There is an included test to validate as well.

This PR includes #3348 as inheritance cannot be properly tested until that issue is addressed. I recommend committing #3348 1st, and then this PR

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (814738c) 75.88% compared to head (de49f42) 75.83%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3349      +/-   ##
==========================================
- Coverage   75.88%   75.83%   -0.05%     
==========================================
  Files         462      462              
  Lines       37082    37087       +5     
==========================================
- Hits        28138    28125      -13     
- Misses       7020     7032      +12     
- Partials     1924     1930       +6     
Files Coverage Δ
cli/command_policy_set_scheduling.go 86.55% <100.00%> (+0.11%) ⬆️
cli/command_policy_show.go 60.00% <100.00%> (+0.44%) ⬆️
snapshot/policy/scheduling_policy.go 85.07% <80.00%> (ø)

... and 5 files with indirect coverage changes

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

@lupusA
Copy link
Contributor

lupusA commented Sep 26, 2023

This PR will close #3344

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.

None yet

2 participants