-
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
Handle ps container created field as a time.Time #8427
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,7 +180,7 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities | |
|
||
ps := entities.ListContainer{ | ||
Command: conConfig.Command, | ||
Created: conConfig.CreatedTime.Unix(), | ||
Created: conConfig.CreatedTime, | ||
Exited: exited, | ||
ExitCode: exitCode, | ||
ExitedAt: exitedTime.Unix(), | ||
|
@@ -231,7 +231,7 @@ func ListStorageContainer(rt *libpod.Runtime, ctr storage.Container, opts entiti | |
|
||
ps := entities.ListContainer{ | ||
ID: ctr.ID, | ||
Created: ctr.Created.Unix(), | ||
Created: ctr.Created, | ||
ImageID: ctr.ImageID, | ||
State: "storage", | ||
Names: []string{name}, | ||
|
@@ -301,5 +301,5 @@ func (a SortPSContainers) Swap(i, j int) { a[i], a[j] = a[j], a[i] } | |
type SortPSCreateTime struct{ SortPSContainers } | ||
|
||
func (a SortPSCreateTime) Less(i, j int) bool { | ||
return a.SortPSContainers[i].Created > a.SortPSContainers[j].Created | ||
return a.SortPSContainers[i].Created.Before(a.SortPSContainers[j].Created) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused. Was the ">" correct for the original version of this "Less()" function? If so, does this need to be Back to my tea cup. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jwhonce "I'm a mistake in original code", I wasn't aware you've gone full Tron in this project. That's a bit scary! 😄 |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhatdan @jwhonce Is this going over the wire? As in, is this a breaking change to our JSON format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is going over the wire. The time.Time came over the wire though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this may be a breaking change for anyone who has vendored in /pkg/ directories. So we might have to wait to fix this until 3.0.