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

check_if_image_tag_exists fails if multiple tags are created on the same hash #803

Open
katsew opened this issue Apr 12, 2021 · 1 comment

Comments

@katsew
Copy link

katsew commented Apr 12, 2021

Hi, I use gcr.io/gcp-runtimes/check_if_tag_exists:latest to check existing tags.
However the image_tag will be like foo,bar when multiple tags are created on the same hash,
the build function cannot recognize the tag and the step passed through the check.

I think split tag string with comma, then flatten existing_tags before create a set to fix this problem.

def check_if_tag_exists(raw_image_path, force_build):
        ...
        existing_tags = []
        for tag in output.split('\n'):
            tag = tag.rstrip().split(',')
            existing_tags = sum([tag], existing_tags)
        existing_tags = set(existing_tags)
        ...

I will make a patch if it is ok to fix.

@nkubala
Copy link
Contributor

nkubala commented Apr 29, 2021

@katsew thanks for the issue. our teams aren't actively maintaining this repository anymore, but feel free to submit fixes as you find them and we'll do our best to push out releases!

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

No branches or pull requests

2 participants