container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

ignore tags when digest present

Open jmorgancusick opened this issue 5 years ago • 2 comments

Expected behavior

If I run

container-diff analyze postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e

I expect analyze info to be printed

Actual behavior

container-diff errors out with the following log:

ERRO[0000] error retrieving image postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e: parsing image reference: could not parse reference

Information

  • container-diff version: v0.15.0

  • Operating system:

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

Steps to reproduce the behavior

  1. Run container-diff analyze postgres@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e and notice that it runs fine
  2. Run with the optional digest container-diff analyze postgres:11-alpine@sha256:f85c0e55cc917bb76083a92a4cc5f1af080298eb5a1f5449a8dc8665f7fef48e and notice the error message

jmorgancusick avatar Jun 27 '20 10:06 jmorgancusick

hmm, at first glance this looks like it could be a go-containerregistry bug? that's what we use for all our image handling, and I don't think we do any preprocessing of tags before we pass the reference over to it

nkubala avatar Jul 30 '20 00:07 nkubala

I experienced the same issue today with ghcr.io.

NVolcz avatar Oct 11 '23 15:10 NVolcz