Skip to content

Conversation

@qianheng-aws
Copy link
Collaborator

@qianheng-aws qianheng-aws commented Jul 3, 2025

Description

Allow warning header for yaml test. Only see such failure for 3102.yml and 3312.yml so far.

OpenSearchQueryRequest relies on _id to preserve sort location for PIT search:

// Workaround to preserve sort location more exactly,
// see https://github.com/opensearch-project/sql/pull/3061
this.sourceBuilder.sort(METADATA_FIELD_ID, ASC);

However, OpenSearch has deprecated the sort or aggregation behavior on id:
https://github.com/opensearch-project/OpenSearch/blob/36c2d5930ab3c036f19760942f95ea4bdb126137/server/src/main/java/org/opensearch/index/mapper/IdFieldMapper.java#L84-L87

So it will has warning message in the header of response, but the reason why it's flakey remains unclear. This PR make it workaround by allowing this warning header in yaml test.

For long term consideration, this issue should be addressed by this one: #3064

Related Issues

Resolves #3845

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Copy link
Member

@LantaoJin LantaoJin left a comment

Choose a reason for hiding this comment

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

LGTM as a workaround.

Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

It should not impact DSL aggregation query.

@penghuo penghuo merged commit 877835e into opensearch-project:main Jul 9, 2025
23 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 22, 2025
* Allow warning header for yaml test

Signed-off-by: Heng Qian <[email protected]>

* Allow warning header for all yaml tests

Signed-off-by: Heng Qian <[email protected]>

---------

Signed-off-by: Heng Qian <[email protected]>
(cherry picked from commit 877835e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
LantaoJin pushed a commit that referenced this pull request Jul 22, 2025
* Allow warning header for yaml test



* Allow warning header for all yaml tests



---------


(cherry picked from commit 877835e)

Signed-off-by: Heng Qian <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev bug Something isn't working flaky-test Flaky build or test issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Flakey failure for yaml test

3 participants