Skip to content

Conversation

@laurazard
Copy link
Member

@laurazard laurazard commented Feb 6, 2023

- What I did

Implement GetContainerLayerSize using the containerd snapshotter

Upstreams:

- How I did it

- How to verify it

After #44804 is merged, run:

docker run --name hello hello-world
docker inspect -s hello | grep SizeRootFs

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

image

@rumpl rumpl added area/images Image Distribution containerd-integration Issues and PRs related to containerd integration labels Feb 6, 2023
@laurazard laurazard marked this pull request as ready for review February 7, 2023 09:50
@laurazard
Copy link
Member Author

Rebased on top of #44958, which includes the necessary refactors to address @neersighted's comment's here – #44934 (comment).

Only the last commit includes actual relevant changes for this PR, the others come from #44958

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

Overall LGTM, some nits/questions.

Copy link
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

I think the return to usage.Size is actually quite helpful here as it adds symmetry with snapshotSizeFn -- thanks for letting me pick your brain; LGTM with the tweaks.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry for the delay; code overall looks good to me. While looking at it locally I saw some variables shadowing imports, and some suggestions on moving some code closer to where it's used.

Not necessarily a blocker, but let me know what you think 😅

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM other than existing comments.

Co-authored-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Laura Brehm <[email protected]>
@thaJeztah
Copy link
Member

@laurazard is traveling today, so I just pushed my suggestion from above; https://github.com/moby/moby/compare/a64380b47f70a7335d08cc8aae9af8e4f619e99a..45ee4d7c78d4d128366f372c4657911880571528

@cpuguy83 @neersighted ptal if those LGTY (then I think we can merge this one)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM as well 😅

@thaJeztah thaJeztah merged commit d7e5708 into moby:master Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Distribution containerd-integration Issues and PRs related to containerd integration status/2-code-review

Projects

Development

Successfully merging this pull request may close these issues.

5 participants