-
Notifications
You must be signed in to change notification settings - Fork 483
feat(critest): Add image manager consistency and idempotency tests #1959
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SergeyKanzhelev The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1f29cec to
c042889
Compare
| // // acknowledging that the cleanup might be asynchronous. | ||
| // }) | ||
|
|
||
| It("should not fail on simultaneous RemoveImage calls [Conformance]", Serial, func() { |
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.
@haircommander @saschagrunert can it be that the failure in CI indicate an actual different behavior of CRI-O. In logs I seems to observe that the one of remove images finished, but after this image status still returns the image.
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.
This looks like an issue in CRI-O, I have to investigate this. Ref: cri-o/cri-o#9717
|
@SergeyKanzhelev do you mind a rebase? |
3da5a43 to
e0f104f
Compare
Adds a new test suite in to validate the idempotency and immediate consistency of CRI image operations. This suite includes tests to ensure: - An image is available in ListImages and ImageStatus immediately after being pulled. - An image is absent from ListImages and ImageStatus immediately after being removed. - Concurrent RemoveImage calls for the same image are handled gracefully without errors, and the image is confirmed to be removed immediately after each call returns. Additionally, this commit enhances the existing Image Manager test suite in with tests for removing images that have multiple tags, including tags that point to the same image digest from different registry domains (e.g., registry.k8s.io and its k8s.gcr.io mirror). The tests are written to be resilient to other images pre-existing on the test environment.
e0f104f to
3d68d48
Compare
7b0382e to
3d68d48
Compare
| removeImage(c, imageName) // Ensure image is not present | ||
|
|
||
| By("Pulling an image to be removed") | ||
| imageID := framework.PullPublicImage(c, imageName, testImagePodSandbox) |
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.
@SergeyKanzhelev Can we use image ID returned by CRI, not image reference? Just as image GC does.
The behavior of CRI-O when deleting an image with its digest is a bit complicated and it may take some time to get consensus about how we fix it.
Adds a new test suite in to validate the idempotency and immediate consistency of CRI image operations.
This suite includes tests to ensure:
Additionally, this commit enhances the existing Image Manager test suite in with tests for removing images that have multiple tags, including tags that point to the same image digest from different registry domains (e.g., registry.k8s.io and its k8s.gcr.io mirror). The tests are written to be resilient to other images pre-existing on the test environment.
/kind feature
This code was generated by Gemini
Special notes for your reviewer:
Follow up from #1911
Does this PR introduce a user-facing change?