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

Backport/backport 16818 to 2.x take2 #17142

Merged

Conversation

msfroh
Copy link
Collaborator

@msfroh msfroh commented Jan 27, 2025

Description

This is an attempt to tweak #17105 to maintain API compatibility for the 2.x branch. Instead of extracting an interface, I just subclassed QueryRewriteContext.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

github-actions bot and others added 2 commits January 23, 2025 23:45
Introduce template query that holds the content of query which can contain placeholders and can be filled by the variables from PipelineProcessingContext produced by search processors. This allows query rewrite by the search processors.

---------

Signed-off-by: Mingshi Liu <[email protected]>
Co-authored-by: Michael Froh <[email protected]>
(cherry picked from commit 13ab4ec)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Instead of extracting an interface from QueryRewriteContext, we
can keep it as a base class and subclass it for QueryCoordinatorContext.

Signed-off-by: Michael Froh <[email protected]>
@mingshl
Copy link
Contributor

mingshl commented Jan 27, 2025

Thanks @msfroh . I tried @dbwiddis 's approach, but because of changing QueryShardContext(QueryShardContextDelegate delegate) using deletgate, I have to changes a lot places. This is much easier approach.

@andrross @reta can you please help review? trying to get into 2.19 release.

Copy link
Contributor

❌ Gradle check result for d7aa359: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for d7aa359: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for d7aa359: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for b5d218f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❕ Gradle check result for b5d218f: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreIT.testCloseIndexWithNoOpSyncAndFlushForAsyncTranslog

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 82.55814% with 15 lines in your changes missing coverage. Please review.

Project coverage is 71.97%. Comparing base (452cf38) to head (b5d218f).
Report is 9 commits behind head on 2.x.

Files with missing lines Patch % Lines
...g/opensearch/index/query/TemplateQueryBuilder.java 90.16% 3 Missing and 3 partials ⚠️
...pensearch/index/query/QueryCoordinatorContext.java 50.00% 3 Missing ⚠️
...rg/opensearch/index/query/QueryRewriteContext.java 76.92% 2 Missing and 1 partial ⚠️
...java/org/opensearch/index/query/QueryBuilders.java 0.00% 1 Missing ⚠️
...rch/search/pipeline/PipelineProcessingContext.java 0.00% 1 Missing ⚠️
...g/opensearch/search/pipeline/PipelinedRequest.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #17142      +/-   ##
============================================
- Coverage     71.98%   71.97%   -0.01%     
+ Complexity    65854    65834      -20     
============================================
  Files          5326     5328       +2     
  Lines        306531   306604      +73     
  Branches      44712    44719       +7     
============================================
+ Hits         220641   220686      +45     
- Misses        67469    67478       +9     
- Partials      18421    18440      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msfroh msfroh merged commit 1c7f719 into opensearch-project:2.x Jan 28, 2025
45 checks passed
@msfroh msfroh deleted the backport/backport-16818-to-2.x-take2 branch January 28, 2025 17:48
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.

3 participants