-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Ensure SizeRw is shown when a user does 'inspect --size -t container'. #4753
Conversation
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>
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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test Code LGTM. I like it when things are simple to fix. |
[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 |
Thanks @NevilleC |
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
andSizeRootFs
are not shown so it does not seem to generate regression:Closes #4744
Signed-off-by: NevilleC neville.cain@qonto.eu