-
Notifications
You must be signed in to change notification settings - Fork 69
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
Tell user if a duplicate "extracted" tag is seen #77
Comments
I think the way to do this would be through two non-excluding options:
Do you have something else in mind? |
The sort can be made stable by sorting on the original (un-extracted) tag when there are duplicate extracted tags. That would at least remove non-determinism, i.e., it wouldn't flip-flop from one tag to another. But it does mean that one tag is chosen arbitrarily over others, and there will be many situations where that's effectively a silent failure. I would think duplication will usually result from a mistake in the specification -- perhaps you didn't mean to admit both In some situations, it doesn't matter which of The question then is "How does the error condition get resolved?". In general the controller doesn't know whether there's an updated specification, or new tags. So it would be possible for it to skip over an image because it's ambiguous, and use a newer image. The alternative is to go into an error state if any of the extracted tags are duplicates, which might be going too far (e.g., it might mean you can't get out of the error state without deleting old, ambiguous tags :-(. |
With regexp filtering, it's possible to extract a value from each tag for the policy to consider. This is to cover a use case like giving all your tags
dev-<version>
, where you want the latest version but only from tags withdev-
.This creates the possibility of duplicates: if you had a pattern
(dev-)?v(<version>)
for example, you might extract the same value from bothdev-v1.0
andv1.0
. This makes behaviour unpredictable, since the tag selected by the policy may depend on the order the original tags are encountered.The text was updated successfully, but these errors were encountered: