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

Add support for digest image references #51

Closed
cdjohnson opened this issue Aug 30, 2022 · 4 comments · Fixed by #56
Closed

Add support for digest image references #51

cdjohnson opened this issue Aug 30, 2022 · 4 comments · Fixed by #56
Labels
bug Something isn't working

Comments

@cdjohnson
Copy link

The input image reference currently requires a tag and does not accept a digest.

Example error with version 0.3.1 on linux:

dcp icr.io/cpopen/ibm-iam-operator-bundle@sha256:c63fdfbbeb3314d3ee889bee86139aa0bf6dd4a69f7e63139b6608abae0b3e5 -c manifests
 DEBUG dcp::image > 📦 Searching for image icr.io/cpopen/ibm-iam-operator-bundle@sha256:c63fdfbbeb3314d3ee889bee86139aa0bf6dd4a69f7e63139b6608abae0b3e5 locally
Error: ❌ error pulling image: error 400 Bad Request - invalid reference format
@exdx exdx added the bug Something isn't working label Aug 30, 2022
@exdx
Copy link
Owner

exdx commented Aug 30, 2022

Thanks for opening this bug -- we probably need to tighten up our image reference parsing code.

cc @tylerslaton

@tylerslaton
Copy link
Collaborator

Definitely, we can work to make that processing more robust and conclusive to fix this.

@exdx
Copy link
Owner

exdx commented Aug 30, 2022

@cdjohnson were you using docker or podman as the runtime? That would be helpful in diagnosing this bug.

@cdjohnson
Copy link
Author

Not sure. I have both docker and podman installed. Here's the trace:

dcp icr.io/cpopen/ibm-iam-operator-bundle@sha256:c63fdfbbeb3314d3ee889bee86139aa0bf6dd4a69f7e63139b6608abae0b3e5 -c manifests -l trace

 TRACE containers_api_conn::transport > sending request GET unix://2f7661722f72756e2f646f636b65722e736f636b:0/v1.41/version
 TRACE mio::poll                      > registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
 TRACE want                           > signal: Want
 TRACE want                           > signal found waiting giver, notifying
 TRACE want                           > poll_want: taker wants!
 TRACE want                           > signal: Want
 TRACE mio::poll                      > deregistering event source from poller
 TRACE want                           > signal: Closed
 TRACE containers_api_conn::transport > got response 200 OK {"api-version": "1.41", "content-type": "application/json", "docker-experimental": "false", "ostype": "linux", "server": "Docker/20.10.12 (linux)", "date": "Tue, 30 Aug 2022 23:26:10 GMT", "content-length": "774"}
 TRACE docker_api::docker             > {"Platform":{"Name":""},"Components":[{"Name":"Engine","Version":"20.10.12","Details":{"ApiVersion":"1.41","Arch":"amd64","BuildTime":"2022-03-07T15:57:50.000000000+00:00","Experimental":"false","GitCommit":"20.10.12-0ubuntu4","GoVersion":"go1.17.3","KernelVersion":"5.15.0-46-generic","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"1.5.9-0ubuntu3","Details":{"GitCommit":""}},{"Name":"runc","Version":"1.1.0-0ubuntu1","Details":{"GitCommit":""}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":""}}],"Version":"20.10.12","ApiVersion":"1.41","MinAPIVersion":"1.12","GitCommit":"20.10.12-0ubuntu4","GoVersion":"go1.17.3","Os":"linux","Arch":"amd64","KernelVersion":"5.15.0-46-generic","BuildTime":"2022-03-07T15:57:50.000000000+00:00"}

 DEBUG dcp::image                     > 📦 Searching for image icr.io/cpopen/ibm-iam-operator-bundle@sha256:c63fdfbbeb3314d3ee889bee86139aa0bf6dd4a69f7e63139b6608abae0b3e5 locally
 TRACE containers_api_conn::transport > sending request GET unix://2f7661722f72756e2f646f636b65722e736f636b:0/v1.41/images/json
 TRACE mio::poll                      > registering event source with poller: token=Token(16777217), interests=READABLE | WRITABLE
 TRACE want                           > signal: Want
 TRACE want                           > signal found waiting giver, notifying
 TRACE want                           > poll_want: taker wants!
 TRACE want                           > signal: Want
 TRACE mio::poll                      > deregistering event source from poller
 TRACE containers_api_conn::transport > got response 200 OK {"api-version": "1.41", "content-type": "application/json", "docker-experimental": "false", "ostype": "linux", "server": "Docker/20.10.12 (linux)", "date": "Tue, 30 Aug 2022 23:26:10 GMT", "content-length": "1807"}
 TRACE want                           > signal: Closed
 TRACE docker_api::docker             > [{"Containers":-1,"Created":1661887392,"Id":"sha256:80e26c1fd951c8797b764ae6c2c806c86bb71dc169589e3fd05be68108cc5e5a","Labels":{"architecture":"x86_64","build-date":"2022-08-29T18:31:17.977017","com.redhat.build-host":"cpt-1006.osbs.prod.upshift.rdu2.redhat.com","com.redhat.component":"ubi8-minimal-container","com.redhat.license_terms":"https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI","description":"This catalog contains operators for IBM product offerings.","distribution-scope":"public","ibm.operator.catalog.version":"v1.24-fbc-20220830.190918-ABDA51DA5","io.k8s.description":"The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.","io.k8s.display-name":"Red Hat Universal Base Image 8 Minimal","io.openshift.expose-services":"","io.openshift.tags":"minimal rhel8","maintainer":"jdockter@us.ibm.com","name":"IBM Operator Catalog","operators.operatorframework.io.index.configs.v1":"/configs","opm_version":"v1.23.2","release":"20220830.190918-ABDA51DA5","summary":"This is the IBM Operator Catalog for use with Red Hat OpenShift 4.","url":"https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.6-902.1661794353","vcs-ref":"50293e4ba66ca2194d8ee5a149a665cb9a375c71","vcs-type":"git","vendor":"IBM","version":"v1.24-fbc-20220830.190918-ABDA51DA5"},"ParentId":"","RepoDigests":["icr.io/cpopen/ibm-operator-catalog@sha256:545abce105220ad644f85ea506b5c7853903f87220fe12b49159a22d0e2f1f0d"],"RepoTags":["icr.io/cpopen/ibm-operator-catalog:fbc-latest"],"SharedSize":-1,"Size":348575409,"VirtualSize":348575409}]

 TRACE containers_api_conn::transport > sending request POST unix://2f7661722f72756e2f646f636b65722e736f636b:0/v1.41/images/create?tag=c63fdfbbeb3314d3ee889bee86139aa0bf6dd4a69f7e63139b6608abae0b3e5&fromImage=icr.io%2Fcpopen%2Fibm-iam-operator-bundle%40sha256
 TRACE mio::poll                      > registering event source with poller: token=Token(33554433), interests=READABLE | WRITABLE
 TRACE want                           > signal: Want
 TRACE want                           > signal found waiting giver, notifying
 TRACE want                           > poll_want: taker wants!
 TRACE want                           > signal: Want
 TRACE want                           > signal: Want
 TRACE containers_api_conn::transport > got response 400 Bad Request {"api-version": "1.41", "content-type": "application/json", "docker-experimental": "false", "ostype": "linux", "server": "Docker/20.10.12 (linux)", "date": "Tue, 30 Aug 2022 23:26:10 GMT", "content-length": "39"}
 TRACE mio::poll                      > deregistering event source from poller
 TRACE want                           > signal: Closed
 TRACE mio::poll                      > deregistering event source from poller
Error: ❌ error pulling image: error 400 Bad Request - invalid reference format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants