-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Resource Group pattern matching on client tags #26328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Resource Group pattern matching on client tags #26328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have some necessary documents changes ?
@@ -90,8 +91,12 @@ public StaticSelector( | |||
new BasicMatcher(criteria -> queryTypeValue.equalsIgnoreCase(criteria.getQueryType().orElse(""))))) | |||
.add(selectorResourceEstimate.map(selectorResourceEstimateValue -> | |||
new BasicMatcher(criteria -> selectorResourceEstimateValue.match(criteria.getResourceEstimates())))) | |||
.add(clientTags.map(clientTagsValue -> | |||
new BasicMatcher(criteria -> criteria.getTags().containsAll(clientTagsValue)))) | |||
.add(clientTags.map(tags -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a breaking change if users previously used client tags containing special characters (like *) that are interpreted in regex
@@ -212,6 +212,46 @@ public void testClientTags() | |||
assertThat(selector.match(newSelectionCriteria("A.user", "a source b", ImmutableSet.of("tag1", "tag2", "tag3"), EMPTY_RESOURCE_ESTIMATES)).map(SelectionContext::getResourceGroupId)).isEqualTo(Optional.of(resourceGroupId)); | |||
} | |||
|
|||
@Test | |||
public void testClientTagsRegex() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package private
1b96843
to
c3cf480
Compare
c3cf480
to
9c43cc0
Compare
This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack. |
Description
Add support for resource group selector pattern matching on client tags
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: