Conversation
cyli
left a comment
There was a problem hiding this comment.
Would it make sense to change this to EngineLabels and NodeLabels to distinguish? The GRPC object would be the same (because the field number is the same) but the variable name would change.
In moby we'd have to do more for backwards compatibility when translating objects, but in swarmkit the change might be ok.
Other than that and a whitespace nit LGTM.
Thanks for addressing this so quickly.
| message Filters { | ||
| repeated string names = 1; | ||
| repeated string id_prefixes = 2; | ||
| // Labels refers to engine labels, which are labels set by the user on the |
There was a problem hiding this comment.
Nitpick: Tab/whitespace seems off from the existing code.
There was a problem hiding this comment.
i always screw that up
0c6105f to
affb4de
Compare
Signed-off-by: Drew Erny <drew.erny@docker.com>
affb4de to
9d58676
Compare
Codecov Report
@@ Coverage Diff @@
## master #2662 +/- ##
=========================================
+ Coverage 62.02% 62.2% +0.18%
=========================================
Files 134 134
Lines 21739 21743 +4
=========================================
+ Hits 13483 13526 +43
+ Misses 6810 6773 -37
+ Partials 1446 1444 -2 |
|
So what would cli look like? |
@dperny @cyli If possible, I would be in favour of that; I agree it's more readable and less likely to confuse their purpose (I think the original implementation in #2062 also did a rename?)
See moby/moby#28209 (comment). To be consistent with To be discussed (either keep the old behavior and ignore node-labels, or filter by both); Filter by engine labels: Filter by node label: |
|
I don't think it's a great idea to rename the GRPC field, because it'll require refactoring the whole codebase to accommodate the new names. If we were to do that, I'd suggest doing it in a separate PR. |
|
Otherwise, we can kick the CLI bikeshed down the road a bit. |
SGTM. |
Signed-off-by: Drew Erny drew.erny@docker.com
- What I did
Previously, the
Labelsfilter was the only one available and only filtered on engine labels. Now, aNodeLabelsfilter can be passed to filter on node labels as welA rewrite of #2062.
Relates to moby/moby#27231, moby/moby#28209
nota bene, this will require plumbing in the engine to fully work.
- How I did it
- How to test it
Automated test was written.
- Description for the changelog
Added support in swarmkit for filtering on node labels.