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

Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus #36150

Merged
merged 1 commit into from Jan 31, 2018

Conversation

yongtang
Copy link
Member

@yongtang yongtang commented Jan 30, 2018

This fix tries to address the issue raised in #36139 where ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by json:",omitempty" in PID and ExitCode which interprate 0 as null.

This is confusing as ExitCode 0 does have a meaning.

This fix removes json:",omitempty" in ExitCode and PID, but changes ContainerStatus to pointer so that ContainerStatus does not show up at all if no content. If ContainerStatus does have a content, then ExitCode and PID will show up (even if they are 0).

This fix fixes #36139.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

This fix tries to address the issue raised in 36139 where
ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by `json:",omitempty"` in PID and ExitCode
which interprate 0 as null.

This is confusion as ExitCode 0 does have a meaning.

This fix removes  `json:",omitempty"` in ExitCode and PID,
but changes ContainerStatus to pointer so that ContainerStatus
does not show up at all if no content. If ContainerStatus
does have a content, then ExitCode and PID will show up (even if
they are 0).

This fix fixes 36139.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

SGTM 🐻

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM!

@dnephin dnephin merged commit 231a440 into moby:master Jan 31, 2018
@yongtang yongtang deleted the 36139-ContainerStatus branch January 31, 2018 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task API: Task.Status.ContainerStatus does not report ExitCode
4 participants