-
Notifications
You must be signed in to change notification settings - Fork 202
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
Empty manifests should result in empty output #364
Conversation
Codecov Report
@@ Coverage Diff @@
## main #364 +/- ##
==========================================
- Coverage 77.64% 77.60% -0.05%
==========================================
Files 22 22
Lines 1011 1009 -2
==========================================
- Hits 785 783 -2
Misses 142 142
Partials 84 84
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@AlexanderProschek Seems like a valid use case. Thanks for the contribution! |
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.
Looks good! Will wait for @jkayani to take a look before merging.
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.
The "No manifests" error was introduced here: #231. If we take this patch, doesn't that mean we'll have this issue again with the AVP integration with other tools, right?
What about a switch --allow-empty
to allow this behavior but make it opt-int?
Hmm.. i forgot about that issue. I would like to think that we could handle both scenarios without a flag. 🤔 |
@jkayani if I understand correctly, what your change in #231 adds is the ability for AVP to act as a sort of guard against other programs mistakes and halt execution. By that same reasoning this should also fail: ~ ❯ ((>&2 echo "some error" && exit 1) | kubectl diff -f -); echo $?;
some error
0 which it does not. My point (see #363) is that unlike AVP, other Kubernetes tools like May I suggest adding a debug flag that add some useful debugging info, including if the input is empty? |
Re-reading your issue and re-visiting the problem from the previous PR, I think you make a good case. At that time I'd also forgotten about
So given that |
@jkayani I added some docs in the howitworks README. Let me know if this is good or if you were looking for something else |
Description
Removes the if statement to check if manifests are empty and updates the test accordingly
Fixes:
#363
Checklist
Please make sure that your PR fulfills the following requirements:
go mod tidy -compat=1.17
to ensure only the minimum is pulled in.Type of Change
Other information