Skip to content

Do not require ShardFailure.primary field in shard failure error response#1039

Closed
janhoy wants to merge 2 commits intoopensearch-project:mainfrom
janhoy:bugfix/shard-failure-primary-not-required
Closed

Do not require ShardFailure.primary field in shard failure error response#1039
janhoy wants to merge 2 commits intoopensearch-project:mainfrom
janhoy:bugfix/shard-failure-primary-not-required

Conversation

@janhoy
Copy link
Copy Markdown

@janhoy janhoy commented Feb 16, 2026

Description

This change makes the primary field of ShardFailure spec optional in response from opensearch. Once a new spec is published, the new unit test in opensearch-project/opensearch-java#1878 will stop failing.

Issues Resolved

Fixes opensearch-project/opensearch-java#1877

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…onse

Signed-off-by: Jan Høydahl <jan.git@cominvent.com>
@janhoy janhoy force-pushed the bugfix/shard-failure-primary-not-required branch from bf34dbe to ab66207 Compare February 16, 2026 21:11
Signed-off-by: Jan Høydahl <jan.git@cominvent.com>
@github-actions
Copy link
Copy Markdown
Contributor

Changes Analysis

Commit SHA: c44dc39
Comparing To SHA: 2954600

API Changes

Summary

└─┬Components
  └─┬Schemas
    └─┬_common___ShardFailure
      └──[➖] required (40840:11)❌ 

Document Element Total Changes Breaking Changes
components 1 1
  • BREAKING Changes: 1 out of 1
  • Removals: 1
  • Breaking Removals: 1

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/22077743754/artifacts/5531060714

API Coverage

Before After Δ
Covered (%) 666 (65.23 %) 666 (65.23 %) 0 (0 %)
Uncovered (%) 355 (34.77 %) 355 (34.77 %) 0 (0 %)
Unknown 145 145 0

Copy link
Copy Markdown
Contributor

@reta reta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @janhoy

Copy link
Copy Markdown
Collaborator

@karenyrx karenyrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the correct fix, opened up #1040
cc @reta

@reta
Copy link
Copy Markdown
Contributor

reta commented Feb 16, 2026

I don't think this is the correct fix, opened up #1040 cc @reta

Thank you @karenyrx , I think you are very right

@janhoy
Copy link
Copy Markdown
Author

janhoy commented Feb 17, 2026

Closing in favor of other PR

@janhoy janhoy closed this Feb 17, 2026
@janhoy janhoy deleted the bugfix/shard-failure-primary-not-required branch February 17, 2026 00:16
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

Successfully merging this pull request may close these issues.

[BUG] ShardFailure deserialization fails when OpenSearch omits the primary field in error responses

3 participants