-
Notifications
You must be signed in to change notification settings - Fork 783
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
sync: dry-run option does not check existence of tags #1882
Comments
Thanks for your report. I can see the appeal of that, and it’s a reasonable interpretation of the description of the option. As for the intent of the feature, During a non- |
I came across this same issue on Friday. Our situation is the same, we would like to be able to verify that the tags requested exist. We would like this feature so that we have a mechanism to fail early in our pipelines. The example I have is that a developer omitted a 'v' prefixing a tag. The pre-merge (--dry-run) pipeline ran successfully only to get confused when the post-merge (the sync) pipeline failed. In this case the failure was within our control due to the requested tag not existing. I appreciate what you are saying that there may still be errors even if the tag was valid. I would consider such errors (i.e. errors provided a valid registry, image and tag) to be outside of our control and download / sync errors would be appropriate. I also agree that such a feature falls outside the scope of a --dry-run that should be restricted to the internals of the application and not make unnecessary calls externally. |
Our usecase is similar to the one of @jimmypw: we copy images to our internal Artifactory based on a git repository, where people may add new versions resp. tag definitions via a PR. The definitions are "enhanced" with the information who is using the image and a bit of metadata in comments. Sometimes people just add a typo in the version and then the actual sync fails after the PR was merged into main, so another PR has to be created, reviewed and merged, which is kind of annoying. I already thought about parsing the YAML, extract all fixed versions and create a bash script calling 'skopeo inspect' additionally but to me it looks like skopeo could already do something similar itself while doing a dry-run. |
Thanks, that’s a quite compelling use case. I’m not at all sure that checking existence of source tags should happen by default in That option presumably wouldn’t apply to the “all tags” and “all tags matching a regexp” case for those we would expect the registry to be internally consistent between the tags it reports and tags that can actually be pulled. |
@mtrmac what about just checking whether the fixed versions do exist in the tag list? You would fetch that one for regexes anyways, so just adding the "fixed" versions to the pattern matches like |
The two are actually not related in the current implementation; a literal tag would not trigger listing tags, and a regexp does not interfere with literal tags (in particular, a single tag could end up being synced twice). But reorganizing it so that they have more in common seems worthwhile. |
It could be even a good idea to use a distinct union of pattern based and literal tags to avoid duplicate syncs, could it not? |
A friendly reminder that this issue had no activity for 30 days. |
Hi,
GIVEN a YAML file
telepresence-local.yml
with fixed versions where one of which does not exist (5000
)WHEN I execute
THEN this succeeds
But when I remove the dry-run option the command fails:
I would have expected that
skopeo
at least checks the existence of a source tag when using the--dry-run
option. When using regexes it does contact the source registry but for fixed versions it just seems to fall back on syntax checking somehow.The text was updated successfully, but these errors were encountered: