-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make ImageStatusByName
race-free
#7435
Conversation
Skipping CI for Draft Pull Request. |
313886f
to
49a3285
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #7435 +/- ##
==========================================
- Coverage 49.15% 49.14% -0.01%
==========================================
Files 145 145
Lines 15808 15813 +5
==========================================
+ Hits 7770 7771 +1
- Misses 7105 7106 +1
- Partials 933 936 +3 |
Note to self:
Those are real enough, |
containers/image#2056 was merged, but this now depends on #7460 . |
49a3285
to
21adbf1
Compare
21adbf1
to
04d0076
Compare
04d0076
to
df12c9d
Compare
df12c9d
to
4854296
Compare
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
4854296
to
19cae30
Compare
ImageStatusByName
race-freeImageStatusByName
race-free
Prerequisites are merged, this is now ready for review. |
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.
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
2 similar comments
/retest |
/retest |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently,
ImageStatusByName
looks up the incoming name three times (once inGetStoreImage
, once inNewImage
, once inNewImageSource
. If the name uses a tag and not a digest, that can result reading data from three different images, making the resultingImageResult
inconsistent.A fix for this requires a new
storage.ResolveReference
function in c/image, being added in containers/image#2056 .This PR is currently a proof-of-concept before merging that c/image feature, depending on an unmerged c/image PR.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
It seems possible to me that we don’t actually need this for signature verification (as long as we get one
StorageID
, we have something to work with, and the other fields ofImageResult
might not matter), but it is just simpler for me fixImageStatusByName
than to worry about the details of that situation.And I think CRI-O benefits form this fix either way.
Cc: @saschagrunert
Does this PR introduce a user-facing change?