-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
connect: Add support for ConsulResolver to specifies a filter expression #15659
connect: Add support for ConsulResolver to specifies a filter expression #15659
Conversation
@pierluc-codes is attempting to deploy a commit to the HashiCorp Team on Vercel. A member of the Team first needs to authorize it. |
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.
This LGTM, Thanks for contributing!
I have one minor optional suggestion inline but fine to merge as is!
connect/resolver_test.go
Outdated
Tags: []string{ | ||
"test-tag", | ||
}, |
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.
nit: we view tags as a semi-deprecated construct in Consul registrations - everything that can be done with tag can also be done with Meta
and Filter
. Long term we'd like to consolidate on just Meta
but have never been able to prioritize the one or two places (e.g. DNS) where tags still do something that Meta doesn't currently.
So I'd accept this - it's not wrong and we've not officially announced or documented that "tags" are deprecated, but it is for example the reason we don't support tag filters in connect endpoints etc.
Would you be open to writing this test using Meta instead? It's not a huge deal either way, but internally we'd tend towards supporting/encouraging use of meta of tags as we might one day get around to deprecating and removing tags entirely!
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.
Thanks for doing this!
Description
Add
Filter
toConsulResolver
to be able to specifies an expression for filtering the query results.PR Checklist
I don't know how secure is hashicorp/go-bexpr