-
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
NET-4135 - Fix NodeMeta filtering Catalog List Services API #18322
Merged
Merged
Changes from 27 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
cef8e3d
logs for debugging
absolutelightning 79fdf19
Init
absolutelightning 91efd2c
Merge branch 'main' into NET-4135
absolutelightning 4fa91a6
white spaces fix
absolutelightning 92ed62d
added change log
absolutelightning 1a53944
Fix tests
absolutelightning c7c5876
fix typo
absolutelightning db1039a
using queryoptionfilter to populate args.filter
absolutelightning e475fa6
Merge branch 'main' of ssh://github.com/hashicorp/consul into NET-4135
absolutelightning dc4f9d1
Merge branch 'main' of ssh://github.com/hashicorp/consul into NET-4135
absolutelightning ecc8dbf
tests
absolutelightning b8dfd87
fix test
absolutelightning 174f8b0
fix tests
absolutelightning 6d1cee7
fix tests
absolutelightning 8b21150
fix tests
absolutelightning 6d8d396
fix tests
absolutelightning f63c251
fix variable name
absolutelightning 7f6c537
fix tests
absolutelightning 6c08f9c
fix tests
absolutelightning 44f366b
fix tests
absolutelightning 8c12cbb
Merge branch 'main' into NET-4135
absolutelightning 961eeef
Update .changelog/18322.txt
absolutelightning 5af1b1c
fix change log
absolutelightning 1763589
address nits
absolutelightning f475356
removed unused line
absolutelightning 86b1e28
Merge branch 'main' into NET-4135
absolutelightning aaf6e54
Merge branch 'main' into NET-4135
absolutelightning 4ed56cc
doing join only when filter has nodemeta
absolutelightning eaed33c
Merge branch 'NET-4135' of ssh://github.com/hashicorp/consul into NET…
absolutelightning 5d366e8
Merge branch 'main' into NET-4135
absolutelightning 7a95115
fix tests
absolutelightning 96421c2
Merge branch 'NET-4135' of ssh://github.com/hashicorp/consul into NET…
absolutelightning 94e73db
fix tests
absolutelightning b7aa37e
Update agent/consul/catalog_endpoint.go
absolutelightning 89ed772
fix tests
absolutelightning b25d920
Merge branch 'main' into NET-4135
absolutelightning 1141444
removed unwanted code
absolutelightning af363ff
Merge branch 'NET-4135' of ssh://github.com/hashicorp/consul into NET…
absolutelightning ebcf3c3
Merge branch 'main' into NET-4135
absolutelightning 04aae7e
Merge branch 'main' into NET-4135
absolutelightning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
catalog api: fixes a bug with catalog api where filter query parameter was not working correctly for the `/v1/catalog/services` endpoint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@rboyer I saw you were the one that added
parseServiceNodes
to a bunch of other endpoints back in 2022. Is there any performance implications we need to think about for adding this to this endpoint as well? This change is needed to fill in nodemeta so it can be filtered on.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.
Currently we only do the expensive join against the
nodes
table when the user provides the NodeMeta parameter on the original API query. When they do this we call a completely different function link.If we were concerned like that, we could instead alter the
Store.Services
method to take an extra boolean parameter to conditionally join the NodeMeta as in this PR.Then the calling code in
agent/consul/catalog_endpoint.go
could set the flag totrue
whenfilter != ""
OR just when: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.
@rboyer I have updated the PR can I merge this now? please approve.
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.
@rboyer I have updated the PR can I merge this now? please approve.