Fix the since and before filter behavior#20135
Conversation
Filters should not include stopped container if `-a` is not specified. Right now, before and since filter are acting as --before and --since deprecated flags. This commit is fixing that. Signed-off-by: Vincent Demeester <[email protected]>
2e5d36c to
b41dba5
Compare
| }) | ||
| } | ||
|
|
||
| if config.Before != "" && beforeContFilter == nil { |
There was a problem hiding this comment.
This is what made -f before=bar taking over --before=bar.
Yup, I think that makes sense; no need to allow people to combine them |
same for me, no need for both |
Agreed |
|
LGTM |
|
LGTM @calavera I don't see why we wouldn't want this for 1.10.1 |
|
@calavera @tiborvass Right now, filters don't take over though. I would have to update the condition. @tiborvass if we want this for |
|
@vdemeester We'll see, i'm cherrypicking things that were merged already and will open a bulk PR to the bump branch. |
|
I'm +1 for adding it to 1.10.1 (per #20087 (comment)), but all ears if there's a reason to not include it |
|
If the cherry-pick is ok, I'm +1 to 1.10.1 too 😊. |
|
Job: Docker-PRs-WoW-TP4 FAILED: ---
a9bc44.
+ ec=125
+ set +x
----------------------------------
ERROR: Failed to build test binary
----------------------------------
-----------------------------------------------
ERROR: Failed with exitcode 125 at Wed Feb 10 01:44:13 CUT 2016.
-----------------------------------------------
INFO: Tidying up at end of run
INFO: Nuking /d/CI
INFO: Zapped successfully
INFO: End of cleanup
INFO: Ended at Wed Feb 10 01:44:14 CUT 2016 (1m 12s)
Build step 'Execute shell' marked build as failure
[PostBuildScript] - Execution post build scripts.
[docker] $ sh -xe D:\temp\hudson7770901013174247670.sh
+ set +e
+ set +x
INFO: End of cleanup
Notifying endpoint 'HTTP:https://leeroy.dockerproject.org/notification/jenkins'
---
|
Fix the since and before filter behavior
Filters should not include stopped container if `-a` is not specified. Right now, before and since filter are acting as --before and --since deprecated flags. This commit is fixing that. Signed-off-by: Vincent Demeester <[email protected]> (cherry picked from commit b41dba5) From PR moby#20135
Filters should not include stopped container if
-ais not specified.Right now, before and since filter are acting as
--beforeand--sincedeprecated flags. This commit is fixing that. 🐙There is some edge cases when using both of them at the same time.
--before=foo -f before=barbe allowed or should one take over the other ?With the changes of this PR,
--before=foo -f before=baris acting weird, but as--beforeis deprecated, I was wondering if it made sense to handle these case of not./cc @thaJeztah @calavera @icecrime @tiborvass @runcom
ps -f before=vsps -f since=#20087🐸
Signed-off-by: Vincent Demeester [email protected]