The nested CloseIndexResponse failure class generated json deserialization exceptions in recent tests:
https://scans.gradle.com/s/3lwde6ivrfrmu/console-log/raw?task=:qa:mixed-cluster:v7.3.0%23mixedClusterTestRunner
org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT > test {p0=cluster.state/30_expand_wildcards/Test allow_no_indices parameter} FAILED
java.lang.AssertionError: Failure at [cluster.state/30_expand_wildcards:25]: expected [2xx] status code but api [indices.close] returned [500 Internal Server Error] [{"error":{"root_cause":[{"type":"json_generation_exception","reason":"Can not start an object, expecting field name (context: Object)","stack_trace":"[Can not start an object, expecting field name (context: Object)];
nested: JsonGenerationException[Can not start an object, expecting field name (context: Object)];
org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:639)
org.elasticsearch.ElasticsearchException.generateFailureXContent(ElasticsearchException.java:567)
org.elasticsearch.rest.BytesRestResponse.build(BytesRestResponse.java:138)\n\tat org.elasticsearch.rest.BytesRestResponse.<init>(BytesRestResponse.java:96)\n\tat org.elasticsearch.rest.BytesRestResponse.<init>(BytesRestResponse.java:91)
org.elasticsearch.rest.action.RestActionListener.onFailure(RestActionListener.java:58)
org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:49)
[...]
Caused by: com.fasterxml.jackson.core.JsonGenerationException: Can not start an object, expecting field name (context: Object)
com.fasterxml.jackson.core.JsonGenerator._reportError(JsonGenerator.java:1897)
com.fasterxml.jackson.core.json.JsonGeneratorImpl._reportCantWriteValueExpectName(JsonGeneratorImpl.java:244)
com.fasterxml.jackson.core.json.UTF8JsonGenerator._verifyValueWrite(UTF8JsonGenerator.java:1033)
com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeStartObject(UTF8JsonGenerator.java:313)
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeStartObject(JsonXContentGenerator.java:156)
org.elasticsearch.common.xcontent.XContentBuilder.startObject(XContentBuilder.java:255)
org.elasticsearch.action.support.DefaultShardOperationFailedException.toXContent(DefaultShardOperationFailedException.java:94)
org.elasticsearch.action.admin.indices.close.CloseIndexResponse$ShardResult$Failure.toXContent(CloseIndexResponse.java:282)
org.elasticsearch.action.admin.indices.close.CloseIndexResponse$ShardResult.toXContent(CloseIndexResponse.java:231)
org.elasticsearch.action.admin.indices.close.CloseIndexResponse$IndexResult.toXContent(CloseIndexResponse.java:172)
org.elasticsearch.action.admin.indices.close.CloseIndexResponse.addCustomFields(CloseIndexResponse.java:85)
org.elasticsearch.action.support.master.AcknowledgedResponse.toXContent(AcknowledgedResponse.java:81)
[...]
I suspect the failure class to not implement ToXContentObject correctly to generate a self-contained json object like all Failure classes should.
Pinging @elastic/es-distributed
I think I already found the problem, working on extending the tests and a fix.
Most helpful comment
I think I already found the problem, working on extending the tests and a fix.