Navigation Menu

Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Support all host selector operators in host cmd #955

Merged
merged 1 commit into from Jul 26, 2016
Merged

Conversation

davidxia
Copy link
Contributor

We previously only supported the "=" host selector operator in
helios hosts --labels. This change supports using "!=", "in",
and "notin" operators.

@davidxia davidxia force-pushed the dxia/selectors branch 2 times, most recently from cb78a6c to f74e84f Compare July 24, 2016 14:32
@codecov-io
Copy link

codecov-io commented Jul 24, 2016

Current coverage is 49.66% (diff: 66.66%)

Merging #955 into master will increase coverage by 0.07%

@@             master       #955   diff @@
==========================================
  Files           272        272          
  Lines         12855      12847     -8   
  Methods           0          0          
  Messages          0          0          
  Branches       1663       1663          
==========================================
+ Hits           6374       6380     +6   
+ Misses         5994       5985     -9   
+ Partials        487        482     -5   

Powered by Codecov. Last update 66c345c...f2c8772

@davidxia
Copy link
Contributor Author

@spotify/helios-team

assertThat(nonHosts2, not(containsStrings(ImmutableSet.of(testHost1, testHost2))));
}

private CustomTypeSafeMatcher<String> containsStrings(final Set<String> substrings) {
Copy link
Member

Choose a reason for hiding this comment

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

i think this could also be something like allOf(containsString(".."), ..) if you knew the set of strings at build-time

@mattnworb
Copy link
Member

👍

it would be really sweet if we could do this filtering server-side (we have a need for something like this in our new project)

We previously only supported the "=" host selector operator in
`helios hosts --labels`. This change supports using "!=", "in",
and "notin" operators.
@davidxia
Copy link
Contributor Author

davidxia commented Jul 25, 2016

@mattnworb Agreed. Lots of CLI logic could be moved server-side to simplify the client and reduce wasted bytes sent over the network. We can merge this first and then try that.

@davidxia davidxia merged commit c39ea48 into master Jul 26, 2016
@davidxia davidxia deleted the dxia/selectors branch July 26, 2016 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants