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

Use docker search instead of manifest inspect to check for tagged IQE images #109

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

san7ket
Copy link
Contributor

@san7ket san7ket commented Aug 27, 2024

The docker inspect command was errored out when trying to inspect IQE tagged images.I think the more appropriate way would be just to check the tags and see if the IQE tagged image is present.

Error:

podman manifest inspect quay.io/cloudservices/iqe-tests:rhsm-subscriptions-pr-3554 -v
Error: getting content of manifest list or image quay.io/cloudservices/iqe-tests:rhsm-subscriptions-pr-3554: parsing manifest blob "{\"schemaVersion\":2,\"mediaType\":\"application/vnd.oci.image.manifest.v1+json\",\"config\":{\"mediaType\":\"application/vnd.oci.image.config.v1+json\",\"digest\":\"sha256:3ec73021fd3583315ff78c5005c9dd6ca1903a8feab0380d63392a3aee293686\",\"size\":12393},\"layers\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:13d626b04f00b85307f9a72d61ba17940ccdeb5e122b7e9354053f94cad4df66\",\"size\":39302012},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:1f0cb7583df5d3d1f622dd3377db330735e05a226e4b4d1b8c1e02be0a2ef425\",\"size\":293292199},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:33753ec897138df608b3824a07466a137d365e8794e24502f28e7f8d80771056\",\"size\":212081223},{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:4e01a258e3fe7d7afe866d7e5f99886271737808795b2c641a95d79890b303f2\",\"size\":5182892}],\"annotations\":{\"org.opencontainers.image.base.digest\":\"sha256:58da916c8a499810cb2c08f3dcdca7f6d4ba25c16efe75afe69c139180dc9abc\",\"org.opencontainers.image.base.name\":\"quay.io/cloudservices/iqe-tests:rhsm-subscriptions\"}}" as a "application/vnd.oci.image.manifest.v1+json": Treating single images as manifest lists is not implemented

Test job: https://ci.ext.devshift.net/job/RedHatInsights-rhsm-subscriptions-pr-check/8134/consoleFull

Copy link
Contributor

@Victoremepunto Victoremepunto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe a better approach would be to query the registry's API, using docker search and listing 5000 tags seems not very efficient.

We already have the quay api token available. What do you think about refactoring the existing function tag_already_exists and use that instead?

My request to refactor if before hand is two fold:

  • keep pr's scope to one change type
  • simplify the usage by not requiring fetching the tag data before hand

LMK your thoughts, I can also make the refactor myself if you don't have the cycles.

Thanks for looking into this!

@bsquizz
Copy link
Contributor

bsquizz commented Aug 28, 2024

@bsquizz
Copy link
Contributor

bsquizz commented Aug 28, 2024

Nevermind, that's only for local storage 😅

@bsquizz
Copy link
Contributor

bsquizz commented Aug 28, 2024

@Victoremepunto in my testing here, podman search quay.io/cloudservices/iqe-tests --list-tags --limit 5000 actually returns quite quickly. Apparently this is a blocker for @san7ket so would you be OK with merging this as-is and refactoring it to use tag_already_exists later?

@Victoremepunto
Copy link
Contributor

@Victoremepunto in my testing here, podman search quay.io/cloudservices/iqe-tests --list-tags --limit 5000 actually returns quite quickly. Apparently this is a blocker for @san7ket so would you be OK with merging this as-is and refactoring it to use tag_already_exists later?

Sure, if it's a blocker, we can merge it - however I still believe we should resolve this with a registry query, the downloading all labels (or what looks like an arbitrary big number of them) doesn't seem to be optimal.

Copy link
Contributor

@Victoremepunto Victoremepunto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving, let's apply the refactor suggestion as a followup

@Victoremepunto Victoremepunto merged commit f2d42e4 into RedHatInsights:main Aug 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants