Sort output of docker ps --filter with order by creation time#25387
Sort output of docker ps --filter with order by creation time#25387vdemeester merged 1 commit intomoby:masterfrom
docker ps --filter with order by creation time#25387Conversation
de42f9d to
e75d2fe
Compare
There was a problem hiding this comment.
Do you need the above code from
name3 := "789-abc"
...
<above_line>
?
There was a problem hiding this comment.
@zhanghan177 the above is for the scenario where you have more containers overall than the filtered containers output (we are testing ps -f name=xyz in the following)
There was a problem hiding this comment.
nit: perhaps add --no-trunc, and use the full ID's?
There was a problem hiding this comment.
Thanks @thaJeztah! I forgot there is --no-trunc for docker ps.
|
Thanks @yongtang; left some comments/suggestions, but works good otherwise |
This fix tries to address the issue raised in 25374 where the output of `docker ps --filter` is in random order and not deterministic. This fix sorts the list of containers by creation time so that the output is deterministic. An integration test has been added. This fix fixes 25374. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
e75d2fe to
3f97133
Compare
|
@thaJeztah The pull request has been updated. Please let me know if there are any issues. |
|
Awesome! LGTM ping @estesp @vdemeester PTAL |
|
LGTM 🐱 |
|
Added this to the 1.12.1 milestone as this is a regression introduced in 1.12 (through #23084) |
- What I did
This fix tries to address the issue raised in #25374 where the output of
docker ps --filteris in random order and not deterministic.- How I did it
This fix sorts the list of containers by creation time so that the output is deterministic.
- How to verify it
An integration test has been added.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #25374.
Signed-off-by: Yong Tang yong.tang.github@outlook.com