-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Elastic.Transport.UnexpectedTransportException when using GetMappingAsync and dynamic_templates #8320
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
Comments
Hi @gpetrou, could you please post the complete callstack of the exception?
The clients (not only .NET) are mainly generated on base of the Elasticsearch Specification. The main reason for this is to keep the clients maintainable without too much manual effort (it's only me working on the client at the moment; same situation for the other language clients). The specification changes are validated as part of the PR approval workflow. There is an automation that compares the specification data-structures with pre-recorded Elasticsearch request/response payloads. Besides that, we have a large test suite (our so called YAML Tests) that runs in the background. These are integration tests. For statically typed languages, like .NET, this is significantly harder to implement in a generic way than for dynamically typed languages.
Besides the mentioned tests and safety measures, the .NET client maintains a separate test suite. These tests were ported over from NEST (however, not all tests made it into the new client so far). These are unit tests and integration tests. With 8.13, we switched to a completely revised code generator and we introduced some breaking changes in the process. The .NET specific tests are currently not all fixed to support the new syntax. This is on my todo list, like e.g. mentioned in #8290. TLDR: Yes, there are multiple levels of tests and validations, but for this issue, either no test case exists, or the bug is very specific to the .NET client and the related code generation. |
The change that caused the regression was this one: In the end, it indeed boils down to an issue in the code generator. The Instead, special deserialization code must be generated in the custom converter, e.g. in this line: |
This was actually fixed already in #8245. Upgrading to https://github.com/elastic/elasticsearch-net/releases/tag/8.14.3 should solve the issue. Duplicate of #8244 |
Closing this for now. Please let me know, if you have further questions. |
Elastic.Clients.Elasticsearch version: 8.13.14
Elasticsearch version: 8.12.2
.NET runtime version: 8.0
Operating system version:
Description of the problem including expected versus actual behavior:
When calling GetMappingAsync with our template that contains dynamic_templates there is a
The JSON value could not be converted to System.Collections.Generic.ICollection
1[System.String]. Path: $ | LineNumber: 0 | BytePositionInLine: 11.` error.This seems to be working just fine until version 8.13.13.
Steps to reproduce:
Use a template that contains dynamic_templates. For example,
Call elasticsearchClient.Indices.GetMappingAsync
Expected behavior
GetMappingAsync works as before.
Provide
ConnectionSettings
(if relevant):Provide
DebugInformation
(if relevant):The text was updated successfully, but these errors were encountered: