Skip to content
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

fix tenant glob match bug #128

Merged
merged 4 commits into from
Feb 14, 2025
Merged

Conversation

jnyi
Copy link
Collaborator

@jnyi jnyi commented Feb 14, 2025

There is a bug when tenant glob match have multiple glob pattern, the match will iterate until the end and never break when first match = true. This can be verified with unit test "glob hashring multiple matches"

Also submit a fix to upstream: thanos-io#8107

Also fixed mis spell as well as e2e test by cherry picking thanos-io#8005

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

@jnyi jnyi requested review from hczhu-db and yuchen-db February 14, 2025 19:31
Signed-off-by: Yi Jin <yi.jin@databricks.com>
@jnyi jnyi force-pushed the fix-tenant-glob-match-bug branch from 2916968 to 7913f6d Compare February 14, 2025 21:10
jnyi and others added 2 commits February 14, 2025 13:46
Signed-off-by: Yi Jin <yi.jin@databricks.com>
I cannot reproduce chromedp panics locally so trying to see if a newer
Ubuntu version would help.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Yi Jin <yi.jin@databricks.com>
@jnyi jnyi force-pushed the fix-tenant-glob-match-bug branch from 68875be to e99f22f Compare February 14, 2025 21:49
@jnyi jnyi merged commit cdd22dc into databricks:db_main Feb 14, 2025
14 checks passed
Comment on lines +1264 to +1268
opts := append(chromedp.DefaultExecAllocatorOptions[:],
chromedp.Flag("headless", true),
chromedp.Flag("no-sandbox", true),
chromedp.Flag("disable-gpu", true),
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this change fix the flaky end-to-end test? How did you figure out those flags are needed?

// Fast path for the common case of direct match.
if mt, ok := t[tenant]; ok && isExactMatcher(mt) {
return true, nil
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: don't need the else branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants