Add support for filtering on node labels#37650
Conversation
thaJeztah
left a comment
There was a problem hiding this comment.
Thanks! Looks like we need some changes to make the new filter work;
- update
newListNodesFilters()to accept the new filtermoby/daemon/cluster/filters.go
Lines 12 to 46 in 3a633a7
- update the Swagger file to document the newly accepted filter; https://github.com/moby/moby/blob/bd06a5ea4df919ff323510fba10801b5673a3af6/api/swagger.yaml?utf8=✓#L8577-L8589
- add a note to the API changelog to mention the new filter; https://github.com/moby/moby/blob/master/docs/api/version-history.md. This change will be in API 1.39, so either a new entry should be added for that version, or that would come with #37472 (once merged)
Codecov Report
@@ Coverage Diff @@
## master #37650 +/- ##
=========================================
Coverage ? 36.13%
=========================================
Files ? 610
Lines ? 45056
Branches ? 0
=========================================
Hits ? 16282
Misses ? 26531
Partials ? 2243 |
|
addressed comments from @thaJeztah |
There was a problem hiding this comment.
looks like this should be singular
There was a problem hiding this comment.
also thinking if this should be node.label (full stop, instead of hyphen), as was proposed in #28209
ping @vdemeester @dperny?
|
I'd suggest ignoring the z errors because we've had intermittent networking issues with our z infrastructure. |
There was a problem hiding this comment.
hm, looks like you changed the example value, instead of the "key"; we could discuss quickly, but I think the idea in #28209 was to have --filter node.label=foobar (so node.label instead of node-label)
@vdemeester ^^
There was a problem hiding this comment.
Yeah, to have node.label, engine.label and label. The dot . was maintly to be consistent with constraint if I rembember correctly 👼
There was a problem hiding this comment.
same here (and other places below)
There was a problem hiding this comment.
The examples here still don't match; e.g. label=<key>=<value> should be either node-label=<key>=<value> or node.label=<key>=<value>
|
Failure on experimental (think that's a flaky) |
…ring on node labels. Signed-off-by: Anshul Pundir <anshul.pundir@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
Dropped the swarmkit bump commit, because master is now ahead of that commit, and fixed the merge-conflict in docs/api/version-history.md |
|
Argh. Janky failing again on that swagger-check; #36714. I'll restart, but we can likely look at the "experimental" build as well (which should run the same tests) |
|
thx adjusting this PR! @thaJeztah |
Full diff: moby/swarmkit@8852e88...496d19b
Relevant changes:
ping @andrewhsu @thaJeztah @dperny