cleanup the image synchronously for Usage case#4049
Merged
estesp merged 1 commit intocontainerd:masterfrom Feb 21, 2020
Merged
Conversation
TestImageIsUnpacked will unpacked docker.io/library/busybox:latest with linux/amd64 platform. If the TestImageUsage doesn't wait for cleanup finish (snapshotter is cleanup by gc asynchronously) and fetch image, the Usage(ctx) will get 10767844 bytes(manifestUsage + snapshotUsage). However, the manifestUsage is 9466142 bytes. That is why we got the error: ``` Expected actual usage to equal manifest reported usage of 9466142: got 10767844 ``` This commit is to make sure that the image has been cleanup fully. Signed-off-by: Wei Fu <[email protected]>
b9b01e9 to
1d888ad
Compare
|
Build succeeded.
|
Codecov Report
@@ Coverage Diff @@
## master #4049 +/- ##
=========================================
- Coverage 46.07% 42.67% -3.4%
=========================================
Files 117 130 +13
Lines 11844 14778 +2934
=========================================
+ Hits 5457 6307 +850
- Misses 5469 7552 +2083
- Partials 918 919 +1
Continue to review full report at Codecov.
|
AkihiroSuda
approved these changes
Feb 21, 2020
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestImageIsUnpacked will unpacked docker.io/library/busybox:latest with
linux/amd64 platform. If the TestImageUsage doesn't wait for cleanup
finish (snapshotter is cleanup by gc asynchronously) and fetch image,
the Usage(ctx) will get 10767844 bytes(manifestUsage + snapshotUsage).
However, the manifestUsage is 9466142 bytes. That is why we got the
error:
This commit is to make sure that the image has been cleanup fully.
Signed-off-by: Wei Fu [email protected]