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 catalog service endpoint when querying for a peer service #22189

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/22189.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
api: Correctly use peer query param on catalog service API
```

6 changes: 6 additions & 0 deletions agent/catalog_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ func (s *HTTPHandlers) catalogServiceNodes(resp http.ResponseWriter, req *http.R
return nil, nil
}

s.parsePeerName(req, &args)
s.parseSamenessGroup(req, &args)
if args.SamenessGroup != "" && args.PeerName != "" {
return nil, HTTPError{StatusCode: http.StatusBadRequest, Reason: "peer-name and sameness-group are mutually exclusive"}
}

// Check for a tag
params := req.URL.Query()
if _, ok := params["tag"]; ok {
Expand Down
Loading