Skip to content

Commit

Permalink
[NET-7571]
Browse files Browse the repository at this point in the history
- bug fix for SeatGeek: Services function in CT (consul-template) does not update the namespace for each services API call
- opts should be defaulted to the opts at query creation.
- then they should be merged with the opts present in Fetch.
- currently the merge was the other way around.
- ENT test support is not there, so no test cases added as of now.
  • Loading branch information
kkavish committed Feb 6, 2024
1 parent 8855d4a commit 0ea26c5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dependency/catalog_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,8 @@ func (d *CatalogServicesQuery) Fetch(clients *ClientSet, opts *QueryOptions) (in
default:
}

// this overrides the query params present in the query
// i.e. overrides the namespace and partition params with ones used the first time
// while creating NewCatalogServicesQuery

// this overrides the query params present in the query with ones present while creating the query
// see bug [https://github.com/hashicorp/consul-template/pull/1842#issuecomment-1915723565]
// it should be other way around.
// default to the query params present while creating NewCatalogServicesQuery
// and then merge with the query params present in the query
defaultOpts := &QueryOptions{
Expand Down

0 comments on commit 0ea26c5

Please sign in to comment.