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

13776: allow adding query parameters to RequestOptions #13777

Merged
merged 9 commits into from
May 31, 2024

Conversation

oliverlockwood
Copy link
Contributor

@oliverlockwood oliverlockwood commented May 22, 2024

Description

Allows adding query parameters to RequestOptions, e.g. to be able to set ?filter-path=<something> as documented in https://opensearch.org/docs/2.3/opensearch/common-parameters/#filtered-responses.

Related Issues

Resolves #13776.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • API changes companion pull request created.
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • 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.

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
Copy link
Contributor

❌ Gradle check result for 0a5736f: 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 618b4dd: 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?

@oliverlockwood
Copy link
Contributor Author

oliverlockwood commented May 22, 2024

❌ Gradle check result for 618b4dd: 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?

❌ Gradle check result for 0a5736f: 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?

These failures are flaky tests described by, respectively, #5329 and #13600

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
Copy link
Contributor

❌ Gradle check result for d0420a3: 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?

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
@reta reta added the backport 2.x Backport to 2.x branch label May 28, 2024
Copy link
Contributor

❌ Gradle check result for 963f929: 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?

@reta
Copy link
Collaborator

reta commented May 28, 2024

❌ Gradle check result for 963f929: FAILURE

#13473

Copy link
Contributor

✅ Gradle check result for e760d86: SUCCESS

@reta
Copy link
Collaborator

reta commented May 28, 2024

@gaobinlong any concerns from your side? thank you!

Copy link
Contributor

✅ Gradle check result for f29c2e3: SUCCESS

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
@oliverlockwood
Copy link
Contributor Author

I've just fixed the CHANGELOG merge conflict. Is there anything else required from me on this PR? @reta @gaobinlong ?

Copy link
Contributor

✅ Gradle check result for fcfcae3: SUCCESS

@reta
Copy link
Collaborator

reta commented May 30, 2024

I've just fixed the CHANGELOG merge conflict. Is there anything else required from me on this PR? @reta @gaobinlong ?

LGTM to me! Thank you @oliverlockwood !

Copy link
Collaborator

@gaobinlong gaobinlong left a comment

Choose a reason for hiding this comment

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

LGTM.

@reta reta merged commit a32859b into opensearch-project:main May 31, 2024
28 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-13777-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a32859bb5a5acc54b62df5384c7b7c949c647c2b
# Push it to GitHub
git push --set-upstream origin backport/backport-13777-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-13777-to-2.x.

@reta
Copy link
Collaborator

reta commented May 31, 2024

Backport #13778

parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
…oject#13777)

* 13776: allow adding query parameters to RequestOptions

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Fix bug highlighted by unit testing

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Address code review comments

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Run spotlessApply to satisfy formatting rules

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Fix more queryParams->parameters cases

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Apply code review feedback

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

---------

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
…oject#13777)

* 13776: allow adding query parameters to RequestOptions

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Fix bug highlighted by unit testing

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Address code review comments

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Run spotlessApply to satisfy formatting rules

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Fix more queryParams->parameters cases

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

* Apply code review feedback

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>

---------

Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed Clients Clients within the Core repository such as High level Rest client and low level client enhancement Enhancement or improvement to existing feature or request v2.15.0 Issues and PRs related to version 2.15.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow setting query parameters on requests
3 participants