Skip to content

RequestConfiguration of generated requests not respected during request execution #8511

Closed
@4lexKislitsyn

Description

@4lexKislitsyn

It appears that the RequestConfiguration property of PlainRequest is not being used during the execution of the request.

For example, it is possible to initialize a request (e.g., SearchTemplateRequest) with a custom request configuration using PlainRequest.RequestConfiguration. However, during the actual execution within the client, only Request.RequestConfig is used — which seems to be independent of the previously configured RequestConfiguration.
Example:

var requestDescriptor = new SearchTemplateRequestDescriptor()
    .RequestConfiguration(x => x.DisablePing());
var response = await elasticClient.SearchTemplateAsync<object>(requestDescriptor, cancellationToken);

When stepping through the execution, it becomes clear that only RequestConfig is referenced, and the configuration provided via the descriptor (e.g., DisablePing) is lost.

This seems like an oversight. There should likely be an initialization or transfer of the RequestConfiguration data to RequestConfig during request setup to preserve the intended behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    8.xRelates to a 8.x client version9.xRelates to a 9.x client versionArea: ClientCategory: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions