Skip to content
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

Ensure SizeRw is shown when a user does 'inspect --size -t container'. #4753

Merged
merged 1 commit into from
Dec 28, 2019

Conversation

NevilleC
Copy link
Collaborator

@NevilleC NevilleC commented Dec 27, 2019

Currently, if a user requests the size on a container (inspect --size -t container),
the SizeRw does not show up if the value is 0. It's because InspectContainerData is
defined as int64 and there is an omit when empty.

We do want to display it even if the value is empty. I have changed the type of SizeRw to be a pointer to an int64 instead of an int64. It will allow us to distinguish the empty value to the missing value.

I updated the test "podman inspect container with size" to ensure we check thatSizeRw is displayed correctly.

Diff between master and feature branch:

+       "SizeRw": 0,
        "SizeRootFs": 742472,
            "ShmSize": 67108864,
            "ConsoleSize": [

If we don't request the size, we can see that SizeRw and SizeRootFs are not shown so it does not seem to generate regression:

./podman inspect -t container 549e4a3cde64-infra | grep ize -i
            "ShmSize": 67108864,
            "ConsoleSize": [

Closes #4744

Signed-off-by: NevilleC neville.cain@qonto.eu

Currently, if a user requests the size on a container (inspect --size -t container),
the SizeRw does not show up if the value is 0. It's because InspectContainerData is
defined as int64 and there is an omit when empty.

We do want to display it even if the value is empty. I have changed the type of SizeRw to be a pointer to an int64 instead of an int64. It will allow us todistinguish the empty value to the missing value.

I updated the test "podman inspect container with size" to ensure we check thatSizeRw is displayed correctly.

Closes containers#4744

Signed-off-by: NevilleC <neville.cain@qonto.eu>
@openshift-ci-robot
Copy link
Collaborator

Hi @NevilleC. Thanks for your PR.

I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S labels Dec 27, 2019
@mheon
Copy link
Member

mheon commented Dec 28, 2019

/ok-to-test
/approve

Code LGTM. I like it when things are simple to fix.

@openshift-ci-robot openshift-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 28, 2019
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon, NevilleC

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 28, 2019
@rhatdan
Copy link
Member

rhatdan commented Dec 28, 2019

Thanks @NevilleC
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 28, 2019
@openshift-merge-robot openshift-merge-robot merged commit 24b4921 into containers:master Dec 28, 2019
@NevilleC NevilleC deleted the nc-missingsize branch December 28, 2019 12:04
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman inspect -t container --size myctr not working
5 participants