Skip to content

core: endpoint locator doesn't use active context to resolve microversions #3441

@kayrus

Description

@kayrus

The following func uses the context, provided during the initialization, which causes context canceled when the original context is done.

client.EndpointLocator = func(opts gophercloud.EndpointOpts) (string, error) {
return V3Endpoint(ctx, client, catalog, opts)
}

Caught by terraform-provider-openstack/terraform-provider-openstack#1899

proper func signature should be:

        client.EndpointLocator = func(ctx context.Context, opts gophercloud.EndpointOpts) (string, error) {
                return V3Endpoint(ctx, client, catalog, opts)
        }

cc @stephenfin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions