utils icon indicating copy to clipboard operation
utils copied to clipboard

AuthenticatedClient doesn't respect the ClientOpts.HTTPClient setting

Open kayrus opened this issue 2 years ago • 3 comments

https://github.com/gophercloud/utils/blob/de873b9cf00d4b57e384f3f8e6a52dfcb290ecd8/openstack/clientconfig/requests.go#L730 call just ignores the HTTPClient member.

kayrus avatar Jun 23 '23 09:06 kayrus

Hi @kayrus, thanks for reporting.

The gophercloud.AuthOptions object that func AuthOptions returns does not contain any HTTPClient, and apparently AuthOptions itself doesn't do any HTTP call. I believe that the HTTPClient contained in ClientOpts is intended for use in func NewServiceClient.

Please provide a minimal reproducer, and be specific about the behaviour you expected, so that I can better understand if we're missing something in code or in the docs.

pierreprinetti avatar Jun 23 '23 10:06 pierreprinetti

See a linked issue. I think velero plugin author expected that providing ClientOpts.HTTPClient inherits it for the resulting provider client, but apparently it doesn't. I think it's a confusion, which can be fixed in utils.

kayrus avatar Jun 23 '23 10:06 kayrus

OK, understood. Please feel free to propose a solution in words or in code; I'll be happy to review. If instead you'd like me to investigate the issue, I'll need a minimal reproducer.

pierreprinetti avatar Jun 23 '23 11:06 pierreprinetti