fix: status check lists all events#9015
Merged
ericzzzzzzz merged 1 commit intoAug 15, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9015 +/- ##
==========================================
- Coverage 70.48% 63.64% -6.85%
==========================================
Files 515 624 +109
Lines 23150 31915 +8765
==========================================
+ Hits 16317 20311 +3994
- Misses 5776 10078 +4302
- Partials 1057 1526 +469
... and 416 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
renzodavid9
approved these changes
Aug 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #8972
Related: #8624
Description
change the way how skaffold should detect when a deployment request was rejected by admission webhook
The original implementation repeatedly lists all events to determine if request was denied by admission webhook, there are some problems with this approach
tolerate-failure-until-deadlineis used, even worse, the failCreate event may not come from the current skaffold session, it seems that by default the retention for events is 1 hr.tolerate-failure-until-deadlineprobably won't make sense, even if we assume events are reliable and in chronological order, which probably not trueThe replacement hack still sort of relies on content from a message, this is bad, but it seems that there are no other reliable way to do this kind of check at the moment, we cannot check the status of pods from a deployment when admission webhook rejects request as those pods haven't been created yet.
This implementation may be broken when message from k8s server changes, but shouldn't produce other issues
Test Plan