mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-09-03 00:47:17 +00:00
* refactor(collect): replace go.podman.io/image with go-containerregistry Migrate pkg/collect/registry.go off go.podman.io/image/v5 (containers/image) onto github.com/google/go-containerregistry, eliminating the transitive github.com/docker/docker +incompatible chain that blocks Docker v29 SDK adoption. The RegistryImages collector probes whether each requested image exists in its registry by issuing a manifest HEAD. We replace alltransports.ParseImageName + imageRef.NewImage with name.ParseReference + remote.Head. Auth from a kubernetes.io/dockerconfigjson Secret is converted to an authn.Authenticator; error classification switches from errcode.Errors string matching to transport.Error.StatusCode. Add httptest.NewTLSServer-backed tests for imageExists covering the found/not-found/unauthorized/EOF-retry paths to lock in protocol-level behavior across the migration. Promote go-containerregistry to a direct require at v0.21.5; go mod tidy drops go.podman.io/image, distribution/distribution/v3, and the bare docker/docker entry from the module graph. Issue: tr-dit * Removed the unreachable strings.Contains branch so we no longer pretend there is special “architecture mismatch → treat as exists” behavior. Documented next to remote.Get that the check is manifest presence for the reference, not “runnable on this arch.” * fix(collect): use DefaultKeychain when registry auth config is nil Restore ambient credential behavior (~/.docker/config.json, credential helpers) for registry image checks. Without WithAuthFromKeychain, remote.Get defaulted to anonymous auth, diverging from containers/image and from documented nil authConfig semantics. Made-with: Cursor