feat: add timeout for copying build context on kaniko#8329
feat: add timeout for copying build context on kaniko#8329aaron-prindle merged 4 commits intoGoogleContainerTools:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8329 +/- ##
==========================================
- Coverage 70.48% 65.87% -4.61%
==========================================
Files 515 605 +90
Lines 23150 29805 +6655
==========================================
+ Hits 16317 19634 +3317
- Misses 5776 8696 +2920
- Partials 1057 1475 +418
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
|
Thanks for the PR here @hiro-o918! In looking at out CI/CD tests it seems the test |
|
@aaron-prindle |
88413b4 to
0c5c67b
Compare
|
Windows error is fixed by increasing the duration of sleeping to wait timeout. |
aaron-prindle
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the PR here @hiro-o918!
Related: #7887
Description
I found that uploading build context to kaniko pods sometimes stacks when copying build context on same conditions.
I inspected a pod on stack and found three things.
/kaniko/buildcontextis empty/tmp/completefile is not createdI did not figure out exact reasons, but it supposed to be caused by creating tarball and uploading to pods.
Current implementation does not has timeout on creating tar, so I implemented this by passing
context.Context.Problem
This implementation assumes that the copying to pod must finish in 5 minutes, otherwise fail.
So We need to pass timeout duration if required.
User facing changes (remove if N/A)
All copying steps to kaniko pod must be finished in 5 minutes.