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: can't use ctrl-c to terminate building with kaniko at uploading build context stage #8516

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

catusax
Copy link
Contributor

@catusax catusax commented Mar 9, 2023

Description

at the uploading build context stage, if we use ctrl-c to stop the buding,it will retry uploading and stuck the terminal:

Starting build...
Creating docker config secret [docker-cfg]...
Building [docker.com/repo/image]...
^CWARN[0009] uploading build context failed, retrying (1/3): uploading build context: 
tar errors: creating tar gz: writing real file "image": context canceled  subtask="docker.com/repo/image" task=Build
^C^C
^C

this path will catch the context canceld error and stop retries

Starting build...
Creating docker config secret [docker-cfg]...
Building [docker.com/repo/image]...
^CERRO[0006] deleting pod: client rate limiter Wait returned an error: context canceled  subtask="docker.com/repo/image" task=Build
Build [docker.com/repo/image] was canceled

steps to reproduce:

  • skaffold.yaml with incluster build
  • skaffold build
  • when skaffold says Building [docker.com/repo/app], click ctrl-c

@catusax catusax marked this pull request as ready for review March 9, 2023 07:49
@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #8516 (61757ec) into main (290280e) will decrease coverage by 6.14%.
The diff coverage is 54.84%.

@@            Coverage Diff             @@
##             main    #8516      +/-   ##
==========================================
- Coverage   70.48%   64.34%   -6.14%     
==========================================
  Files         515      607      +92     
  Lines       23150    30401    +7251     
==========================================
+ Hits        16317    19563    +3246     
- Misses       5776     9373    +3597     
- Partials     1057     1465     +408     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 432 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ericzzzzzzz ericzzzzzzz merged commit 45fe84a into GoogleContainerTools:main Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants