-
Notifications
You must be signed in to change notification settings - Fork 780
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
Preserve conflicting mutators #1569
Preserve conflicting mutators #1569
Conversation
bdfeed8
to
3185f04
Compare
Codecov Report
@@ Coverage Diff @@
## master #1569 +/- ##
==========================================
+ Coverage 52.83% 53.52% +0.68%
==========================================
Files 89 93 +4
Lines 7849 7995 +146
==========================================
+ Hits 4147 4279 +132
- Misses 3356 3372 +16
+ Partials 346 344 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
582e199
to
42303ae
Compare
2a33674
to
7739603
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, couple nits
7f50b97
to
428eb04
Compare
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
We don't need two copies of the same information, and it makes testing easier this way. Signed-off-by: Will Beason <willbeason@google.com>
Since it isn't holding mutators any more. Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
As a global variable, with multiple tests manipulating the value, it makes unit tests dependenton each other. Signed-off-by: Will Beason <willbeason@google.com>
We properly preserve errors now Signed-off-by: Will Beason <willbeason@google.com>
The logic already works, so no change to non-test code required Signed-off-by: Will Beason <willbeason@google.com>
This isn't expected to change dynamically through the runtime of the program, so just set it at Reconciler creation Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
This ensures we properly update PodStatus in the case we successfully modify the Schema to include the conflict, but then fail to update the PodStatus. In the second Reconcile of the conflicting Mutator, we must return the schema conflict error rather than nil to indicate that the PodStatus still needs to be updated. Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Deduplicate logic for reporting conflicts Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Fix controller tests which were logging noisy errors by specifying metadata.namespace for the Pod. Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Cover a few more edge cases in reconciler unit tests Simplify redundant reconciler logic. Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
Signed-off-by: Will Beason <willbeason@google.com>
82f40fa
to
00c1b55
Compare
Preserve conflicting mutator paths, making behavior independent of the order in which conflicting mutators are added.
Increase test coverage from 70% to 89%. Added tests are unit tests that fake out the dependencies of Reconciler, so they don't require the same setup as the existing integration tests in the same package.
Minor changes included in this PR:
opa
renamed toopaClient
to prevent conflicts between the package name and variables with the name.schema.node
to dynamically fetch the conflicts a given mutator has with all other mutators.Fixes: #1216