Skip to content

Configuration is null in RequestConfigurationDescriptor constructor since 8.16 #8425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LionelVallet opened this issue Nov 27, 2024 · 1 comment · Fixed by #8426
Closed
Labels
8.x Relates to a 8.x client version Area: Client Category: Bug

Comments

@LionelVallet
Copy link

Elastic.Clients.Elasticsearch version: 8.16.2

Elasticsearch version: 8.16.1

.NET runtime version: 8.0.11

Operating system version: Debian 12

Description of the problem including expected versus actual behavior:

Since 8.16, request configuration does not work anymore

var response = await elasticsearchClient.SearchAsync<BaseDocument>(r =>
{
    r.RequestConfiguration(rc => rc.DisableDirectStreaming());
    r.Query(q => q)
    // [...]
});
System.ArgumentNullException: Value cannot be null. (Parameter 'config')
   at System.ArgumentNullException.Throw(String paramName)
   at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
   at Elastic.Transport.RequestConfigurationDescriptor..ctor(IRequestConfiguration config)
   at Elastic.Clients.Elasticsearch.Requests.RequestDescriptor`2.RequestConfiguration(Func`2 configurationSelector) in /_/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/RequestDescriptor.cs:line 63
   at Reporting.Services.ReportsService.<>c__DisplayClass14_2.<GetResultAsync>b__9(SearchRequestDescriptor`1 r) in C:\Repos\src\Services\Reporting\Reporting\Services\ReportsService.cs:line 87
   at Elastic.Clients.Elasticsearch.ElasticsearchClient.SearchAsync[TDocument](Action`1 configureRequest, CancellationToken cancellationToken) in /_/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs:line 9410

Steps to reproduce:

  1. try to configure request as example above
  2. observing, powerless, the exception

Expected behavior
be able to configure request in elastic client methods

@flobernd
Copy link
Member

Hi @LionelVallet,

thanks for reporting! Should be fixed in 8.16.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Relates to a 8.x client version Area: Client Category: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants