-
Notifications
You must be signed in to change notification settings - Fork 1.4k
git: fix issue with checking out annotated tags by full ref #6244
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
Conversation
|
Looks like alpine openssh is broken. |
ab51151 to
414582d
Compare
|
Failure in "validate" - I kicked CI; https://github.com/moby/buildkit/actions/runs/17995633801/job/51194337569?pr=6244 |
|
Ahh there's a lot of funky things in this logic that I would like to fix, this being one of them (others mostly being based on the fact that the git state in #4557 can get into weirdly strange states). Agree on the annotated tags - intentional at the time, but yup, wrong. We shouldn't fully resolve it. That said, I think if you do this that some other more subtle things might(?) break, and may need to be corrected - since if you |
If tag was already pulled by --tags or without refs/tags that creates ambigous reference in the shared repository. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
414582d to
ef8e5f9
Compare
| expLen := 40 | ||
| if format == "sha256" { | ||
| expLen = 64 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the expected length into a parameter to this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be separated from format as then it is possible for the values to diverge. This could be cleaned up though, eg. with a helper function, but as this same check is used tens of times in this test file, I think these should all be done together in a separate PR.
|
Removing this from the v0.25.0 milestone because there is another PR that seems intended to replace this one and it is marked as being ready for v0.26.0. If I'm wrong, we can do a patch release to include this. |
|
@tonistiigi has informed me that I was mistaken offline. Placing back into the v0.25.0 milestone. |
If the tag was already pulled by --tags or without refs/tags, that creates an ambiguous reference in the shared repository that fails when fetching to the snapshot.
Example: https://github.com/moby/buildkit/actions/runs/17962081814/job/51087390963
via #2570 @alexcb @rrjjvv
Looking at this I'm also confused about #4473 . Atm it looks like we are reporting wrong SHA in provenance for annotated tags (although it seems to come from ref order in server side that may not be fully standardized). The git commit will point to the SHA of commit rather than the tag itself, meaning we have already lost the additional tag information. If we add policy validation by signature, we definitely should validate the signature on the tag, not just on the commit as it carries much more specific information. I think we should change that, but the current selection seems intentional. @jedevc