Open luhring opened 1 year ago
This can be reproduced with just make snapshot
, so I'll update the title. (Found this when looking into a strange acceptance test failure in CI for #1897)
Starting to look at this--I couldn't reproduce the failure until I updated Docker to the latest version:
Worked:
tgerla@Timothys-MacBook-Pro-2 syft % docker version
Client:
Cloud integration: v1.0.31
Version: 23.0.5
API version: 1.42
Go version: go1.19.8
Git commit: bc4487a
Built: Wed Apr 26 16:12:52 2023
OS/Arch: darwin/arm64
Context: default
Server: Docker Desktop 4.19.0 (106363)
Engine:
Version: 23.0.5
API version: 1.42 (minimum version 1.12)
Go version: go1.19.8
Git commit: 94d3ad6
Built: Wed Apr 26 16:17:14 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.20
GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc:
Version: 1.1.5
GitCommit: v1.1.5-0-gf19387a
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Doesn't work:
tgerla@Timothys-MacBook-Pro-2 syft % docker version
Client:
Cloud integration: v1.0.35
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:16 2023
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.21.1 (114176)
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:50:59 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
@luhring, I think maybe I found at least a workaround to this. I ran:
docker context use default
...and then re-ran make snapshot and it completed successfully. FWIW, my contexts look like this:
tgerla@Timothys-MacBook-Pro-2 syft % docker context list
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock
desktop-linux moby Docker Desktop unix:///Users/tgerla/.docker/run/docker.sock
I don't know much about goreleaser so I'm not sure if there is a fix we can make in the build tooling here. Thoughts appreciated.
Thanks @tgerla! That workaround works for me. And TIL about Docker "contexts"...
I also noticed that because Syft defines the make target as the snapshot directory, make will think the snapshot has been completed successfully even when this failure happens. I'm not sure of a way to fix this, since goreleaser is doing so many things in one pass.
I'll let you know if I find a better fix for this one!
What happened:
On a fresh clone of the
main
branch, runningmake snapshot
(or anything that depends on it, likemake compare-mac
) failsWhat you expected to happen:
Not fail 😃 (this makes it more difficult to contribute)
Steps to reproduce the issue:
Anything else we need to know?:
Environment:
macOS 13.4.1 (22F82) (Apple M1 Max)