mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
In #16872 we added support for configuring the API client with a unix domain socket. In order to set the host correctly, we parse the address before mutating the Address field in the configuration. But this prevents the configuration from being reused across multiple clients, as the next time we parse the address it will no longer be pointing to the socket. This breaks consumers like the autoscaler, which reuse the API config between plugins. Update the `NewClient` constructor to only override the `url` field if it hasn't already been parsed. Include a test demonstrating safe reuse with a unix domain socket. Ref: https://github.com/hashicorp/nomad-autoscaler/issues/944 Ref: https://github.com/hashicorp/nomad-autoscaler/pull/945
4 lines
130 B
Plaintext
4 lines
130 B
Plaintext
```release-note:bug
|
|
api: Fixed a bug where an `api.Config` targeting a unix domain socket could not be reused between clients
|
|
```
|