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

refactor: make time format compatible with Moby #558

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

zeppp
Copy link
Contributor

@zeppp zeppp commented Jan 11, 2018

Signed-off-by: zeppp [email protected]

1.Describe what this PR did
The time fields such as Created and StartAt in Moby are both formatted by RFC3339Nano which is different from Pouch.
So I change the time format in Pouch to keep consistence with Moby.

2.Does this pull request fix one issue?

3.Describe how you did it

4.Describe how to verify it

>> # pouch ps
Name   ID       Status          Created          Image                                            Runtime
2      961798   Up 12 minutes   13 minutes ago   registry.hub.docker.com/library/busybox:latest   runc
>> # pouch inspect 2
{
  "Args": null,
  "Config": {
    "Cmd": [
      "sh"
    ],
    "Entrypoint": null,
    "Env": [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ],
    "Image": "registry.hub.docker.com/library/busybox:latest",
    "OnBuild": null,
    "Shell": null
  },
➡️  "Created": "2018-01-11T06:04:07.189360689Z",
  "HostConfig": {
    "Runtime": "runc",
    "BlkioDeviceReadBps": null,
    "BlkioDeviceReadIOps": null,
    "BlkioDeviceWriteBps": null,
    "BlkioDeviceWriteIOps": null,
    "BlkioWeightDevice": null,
    "DeviceCgroupRules": null,
    "Devices": [],
    "MemorySwappiness": -1,
    "Ulimits": null
  },
  "Id": "961798b0b8fa9b161863ec08eaf020293766a8758805e63c8e3f443c74bb5ee6",
  "Image": "registry.hub.docker.com/library/busybox:latest",
  "Mounts": null,
  "Name": "2",
  "State": {
    "Pid": 5931,
➡️    "StartedAt": "2018-01-11T06:04:26.971241293Z",
    "Status": "running"
  }
}

5.Special notes for reviews
Please remove old containers before applying this PR.
@allencloud

@allencloud
Copy link
Collaborator

allencloud commented Jan 11, 2018

Thanks a lot for your work. 🌹 🧀

Please remove old containers before applying this PR.

I will and this is reasonable.

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #558     +/-   ##
========================================
- Coverage   14.49%   14.4%   -0.1%     
========================================
  Files          64      64             
  Lines        3173    3172      -1     
========================================
- Hits          460     457      -3     
- Misses       2666    2668      +2     
  Partials       47      47
Impacted Files Coverage Δ
pkg/utils/utils.go 92.1% <ø> (-5.34%) ⬇️

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 e46d85b...172295e. Read the comment docs.

@allencloud
Copy link
Collaborator

LGTM

@allencloud allencloud merged commit 8887fe9 into AliyunContainerService:master Jan 11, 2018
@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Jan 11, 2018
@zeppp zeppp deleted the refactor-time branch January 11, 2018 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants