Skip to content

Fix the since and before filter behavior#20135

Merged
tiborvass merged 1 commit intomoby:masterfrom
vdemeester:20087-fix-since-before-filters
Feb 10, 2016
Merged

Fix the since and before filter behavior#20135
tiborvass merged 1 commit intomoby:masterfrom
vdemeester:20087-fix-since-before-filters

Conversation

@vdemeester
Copy link
Member

@vdemeester vdemeester commented Feb 9, 2016

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. 🐙

There is some edge cases when using both of them at the same time.

  • Should --before=foo -f before=bar be allowed or should one take over the other ?
    With the changes of this PR, --before=foo -f before=bar is acting weird, but as --before is deprecated, I was wondering if it made sense to handle these case of not.
  • If we do not cover these edge cases, we should decide which one takes over the other (I'm all for the filters to take over the deprecated flags), and warn about it.

/cc @thaJeztah @calavera @icecrime @tiborvass @runcom

🐸

Signed-off-by: Vincent Demeester [email protected]

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]>
@vdemeester vdemeester force-pushed the 20087-fix-since-before-filters branch from 2e5d36c to b41dba5 Compare February 9, 2016 08:26
})
}

if config.Before != "" && beforeContFilter == nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is what made -f before=bar taking over --before=bar.

@thaJeztah
Copy link
Member

If we do not cover these edge cases, we should decide which one takes over the other (I'm all for the filters to take over the deprecated flags), and warn about it.

Yup, I think that makes sense; no need to allow people to combine them

@runcom
Copy link
Member

runcom commented Feb 9, 2016

If we do not cover these edge cases, we should decide which one takes over the other (I'm all for the filters to take over the deprecated flags), and warn about it.
Yup, I think that makes sense; no need to allow people to combine them

same for me, no need for both

@calavera
Copy link
Contributor

calavera commented Feb 9, 2016

I'm all for the filters to take over the deprecated flags

Agreed

@calavera
Copy link
Contributor

calavera commented Feb 9, 2016

LGTM

@tiborvass
Copy link
Contributor

LGTM @calavera I don't see why we wouldn't want this for 1.10.1

@vdemeester
Copy link
Member Author

@calavera @tiborvass Right now, filters don't take over though. I would have to update the condition.

@tiborvass if we want this for v1.10.1, I should do the change against the release branch, right ? 👼

@tiborvass
Copy link
Contributor

@vdemeester We'll see, i'm cherrypicking things that were merged already and will open a bulk PR to the bump branch.

@thaJeztah
Copy link
Member

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

@vdemeester
Copy link
Member Author

If the cherry-pick is ok, I'm +1 to 1.10.1 too 😊.

@GordonTheTurtle
Copy link

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'
---

tiborvass added a commit that referenced this pull request Feb 10, 2016
@tiborvass tiborvass merged commit 61efb4d into moby:master Feb 10, 2016
@vdemeester vdemeester deleted the 20087-fix-since-before-filters branch February 10, 2016 07:24
@tiborvass tiborvass mentioned this pull request Feb 10, 2016
tiborvass pushed a commit to tiborvass/docker that referenced this pull request Feb 10, 2016
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
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.

ps -f before= vs ps -f since=

6 participants