GoogleContainerTools / GoogleContainerTools/skaffold
Skaffold build returns exit code 0 when build failed due to "read tcp" error
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
skaffold build returns exit code > 0 when fails
### Actual behavior
skaffold build returns exit code 0 when failed
### Information
- Skaffold version: 2.5.0
- Operating system: docker [alpine]
- Installed via: curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && install skaffold /usr/local/bin/ && rm skaffold
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v4beta1
kind: Config
metadata:
name: my-worker
build:
artifacts:
- image: my_worker
context: ../../
custom:
buildCommand: sh Build/buildx.sh
dependencies:
dockerfile:
path: path/to/Dockerfile
local:
useBuildkit: true
```
### Steps to reproduce the behavior
after running command: skaffold build
I got the following log (happens randomly, somethings it just works):
```
Generating tags...
- my_worker -> registry.gitlab.com/my_worker:7b6e772d75171bfabe0ec9144057cfe71e5a1753
Checking cache...
time="2023-06-06T22:02:03Z" level=error msg="retrying read tcp 172.17.0.2:47432->172.65.251.78:443: read: connection reset by peer"
Help improve Skaffold with our 2-minute anonymous survey: run 'skaffold survey'
To help improve the quality of this product, we collect anonymized usage data for details on what is tracked and how we use this data visit . This data is handled in accordance with our privacy policy
You may choose to opt out of this collection by running the following command:
skaffold config set --global collect-metrics false
```
And for some reason the exit code was 0!
Is there another way to know if the image was built or not?
Contributor guide
Assessment
This issue has not been assessed yet.