Skip to content
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

Faile to get the pipeline when java client is upgraded from v8.10 to v8.12 #915

Closed
luozhuang opened this issue Dec 6, 2024 · 2 comments
Closed

Comments

@luozhuang
Copy link

I encountered the exception "Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Pipeline.meta'" when I got the pipeline from ESCloud.

The ESClount is v8.16. The pipeline was created without the "meta" section in ESCloud.

I can get the pipeline with the v8.10 java client without errors.
However, I met this error with the v8.12 java client.

The call stack is
Caused by: co.elastic.clients.transport.TransportException: node: https://<My-esclould>/, status: 200, [es/ingest.get_pipeline] Failed to decode response at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:404) at co.elastic.clients.transport.ElasticsearchTransportBase.getApiResponse(ElasticsearchTransportBase.java:363) at co.elastic.clients.transport.ElasticsearchTransportBase.performRequest(ElasticsearchTransportBase.java:147) at co.elastic.clients.elasticsearch.ingest.ElasticsearchIngestClient.getPipeline(ElasticsearchIngestClient.java:120) ... 86 more Caused by: co.elastic.clients.json.JsonpMappingException: Error deserializing: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Pipeline.meta' (JSON path: ['test-embedding']) (line no=1, column no=478, offset=-1) at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134) at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:121) at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:353) at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:333) at co.elastic.clients.elasticsearch.ingest.GetPipelineResponse.lambda$createGetPipelineResponseDeserializer$0(GetPipelineResponse.java:175) at co.elastic.clients.json.JsonpDeserializer$3.deserialize(JsonpDeserializer.java:136) at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:77) at co.elastic.clients.transport.ElasticsearchTransportBase.decodeTransportResponse(ElasticsearchTransportBase.java:399) ... 91 more Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'Pipeline.meta' at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76) at co.elastic.clients.util.ApiTypeHelper.unmodifiableRequired(ApiTypeHelper.java:194) at co.elastic.clients.elasticsearch.ingest.Pipeline.<init>(Pipeline.java:75) at co.elastic.clients.elasticsearch.ingest.Pipeline.<init>(Pipeline.java:54) at co.elastic.clients.elasticsearch.ingest.Pipeline$Builder.build(Pipeline.java:346) at co.elastic.clients.elasticsearch.ingest.Pipeline$Builder.build(Pipeline.java:198) at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80) at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43) at co.elastic.clients.json.JsonpDeserializerBase$StringMapDeserializer.deserialize(JsonpDeserializerBase.java:349) ... 96 more

My question is why the "Pipeline.meta" became required since v8.12?

@l-trotta
Copy link
Contributor

l-trotta commented Dec 6, 2024

Hello, this is an error that was introduced in elastic/elasticsearch-specification#2348 and subsequently fixed in elastic/elasticsearch-specification#2436, and unfortunately it affected all 8.12.x versions of the client. You can update the client to version 8.13.0 to solve this issue (I'd recommend going to 8.16 directly since it matches the server version), otherwise if you cannot update the client and this is the only issue you're experiencing you can wrap this one call using:

try (ApiTypeHelper.DisabledChecksHandle h = ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true)) {
    // your call here
}

@luozhuang
Copy link
Author

@l-trotta Thank you so much for the response. I will upgrade to 8.13.0+. I think this issue can be closed as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants