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

[BUG] v2.4 breaks pushing multiple tags at once #57

Closed
PhrozenByte opened this issue Nov 14, 2021 · 6 comments · Fixed by #59
Closed

[BUG] v2.4 breaks pushing multiple tags at once #57

PhrozenByte opened this issue Nov 14, 2021 · 6 comments · Fixed by #59
Labels
bug Something isn't working

Comments

@PhrozenByte
Copy link

Version

redhat-actions/push-to-registry@v2 (which now references redhat-actions/[email protected] by default)

Describe the bug

Prior to #50 passing multiple tags caused the action to push all listed tags separately. Since v2.4 it rather assumes the first tag to be some sort of "primary" tag and pushes all following tags as aliases of this "primary" tag. It falsely assumes that all tags reference the same digest.

The input tags: foo bar executed the following prior to #50:

podman push my-image:foo quay.io/my-user/my-image:foo
podman push my-image:bar quay.io/my-user/my-image:bar

Starting with v2.4 it executes the following:

podman push my-image:foo quay.io/my-user/my-image:foo
podman push my-image:foo quay.io/my-user/my-image:bar

This is a BC breaking change and silently broke my CI.

I'm not sure whether this was an intended change. In any case, v2.4 needs to be withdrawn. If it wasn't intended, it needs fixing. If it was intended, it needs to be released as v3 instead, because it includes BC-breaking changes (following https://semver.org).

If it was intended I'd like to suggest removing the requirement for all tags to exist locally (except the primary tag of course).

@PhrozenByte PhrozenByte added the bug Something isn't working label Nov 14, 2021
@tetchel
Copy link
Contributor

tetchel commented Nov 14, 2021

this was not intended to be a breaking change. You can reference v2.3 in order to fix your pipeline while we investigate the problem.

@divyansh42
Copy link
Member

@PhrozenByte I have verified this and can confirm this got introduced in v2.4.
However, this change is not intended, so we'll take this as a bug and fix it very soon. Meanwhile, I'd request you to use v2.3 to fix your pipeline.

If it was intended I'd like to suggest removing the requirement for all tags to exist locally (except the primary tag of course).

Thanks for your suggestion, this seems to be valid but as mentioned above this change was not intended and this enhancement requires a major release (v3) for which we haven't planned yet.
So, I would request you to create an enhancement request for this, we can definitely take this in once we plan for v3.

@PhrozenByte
Copy link
Author

Thanks 👍 I already fixed the issue in my CI by using the action twice for both images I build. I still push multiple tags per image, but those are indeed aliases.

Honestly I like the idea of interpreting multiple tags as aliases. It kinda feels "natural". Thus I wasn't sure whether it was an intended change or not. It just opened #58 for a discussion about how the inputs should behave in a proposed v3.

@divyansh42
Copy link
Member

@PhrozenByte We have changed back to this behaviour, when input tags: foo bar

podman push my-image:foo quay.io/my-user/my-image:foo
podman push my-image:bar quay.io/my-user/my-image:bar

Fix for this is released in v2.4.1 and also rolled forward tags v2 and v2.4.
@PhrozenByte could you please confirm this fix?

@PhrozenByte
Copy link
Author

@PhrozenByte could you please confirm this fix?

Works. Thank you! 👍

@divyansh42
Copy link
Member

Works. Thank you! +1

Great! Thanks for the confirmation 🙂

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