Skip to content

cleanup the image synchronously for Usage case#4049

Merged
estesp merged 1 commit intocontainerd:masterfrom
fuweid:me-fix-flaky-testcase
Feb 21, 2020
Merged

cleanup the image synchronously for Usage case#4049
estesp merged 1 commit intocontainerd:masterfrom
fuweid:me-fix-flaky-testcase

Conversation

@fuweid
Copy link
Copy Markdown
Member

@fuweid fuweid commented Feb 21, 2020

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]

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]>
@fuweid fuweid force-pushed the me-fix-flaky-testcase branch from b9b01e9 to 1d888ad Compare February 21, 2020 16:03
@fuweid fuweid changed the title cleanup the image including snapshotter for Usage case cleanup the image synchronously for Usage case Feb 21, 2020
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Feb 21, 2020

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 21, 2020

Codecov Report

Merging #4049 into master will decrease coverage by 3.39%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ
#linux 46.07% <ø> (ø) ⬆️
#windows 38.26% <ø> (?)
Impacted Files Coverage Δ
archive/tar_opts.go 58.82% <0%> (-12.61%) ⬇️
snapshots/native/native.go 42.42% <0%> (-10.27%) ⬇️
archive/tar.go 48.58% <0%> (-8.63%) ⬇️
cio/io.go 46.47% <0%> (-8.53%) ⬇️
metadata/snapshot.go 47.57% <0%> (-7.2%) ⬇️
metadata/containers.go 49.84% <0%> (-6.26%) ⬇️
content/local/writer.go 58.65% <0%> (-5.55%) ⬇️
content/local/store.go 49.52% <0%> (-5.29%) ⬇️
metadata/images.go 57.41% <0%> (-4.97%) ⬇️
archive/compression/compression.go 58.69% <0%> (-4.7%) ⬇️
... and 74 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e08405...1d888ad. Read the comment docs.

@estesp estesp merged commit 2c5279e into containerd:master Feb 21, 2020
@fuweid fuweid deleted the me-fix-flaky-testcase branch February 22, 2020 06:30
@fuweid
Copy link
Copy Markdown
Member Author

fuweid commented Feb 24, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants