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

[Refactor] Requests to use MediaType instead of XContentType #6218

Merged
merged 6 commits into from
Feb 8, 2023

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Feb 7, 2023

Refactors various REST requests to use MediaType instead of XContentType to abstract media format from the REST interfaces.

relates #5910

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

Refactors various REST requests to use MediaType instead of XContentType to
abstract media format from the REST interfaces.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #6218 (ded5906) into main (2b77985) will decrease coverage by 0.06%.
The diff coverage is 43.47%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6218      +/-   ##
============================================
- Coverage     70.91%   70.86%   -0.06%     
- Complexity    58898    58915      +17     
============================================
  Files          4780     4780              
  Lines        281380   281453      +73     
  Branches      40635    40639       +4     
============================================
- Hits         199536   199444      -92     
- Misses        65426    65633     +207     
+ Partials      16418    16376      -42     
Impacted Files Coverage Δ
.../java/org/opensearch/common/xcontent/XContent.java 100.00% <ø> (ø)
...rg/opensearch/common/xcontent/XContentFactory.java 64.15% <ø> (+0.94%) ⬆️
.../opensearch/common/xcontent/XContentGenerator.java 73.33% <ø> (ø)
...a/org/opensearch/common/xcontent/XContentType.java 100.00% <ø> (ø)
.../opensearch/common/xcontent/cbor/CborXContent.java 80.00% <ø> (ø)
.../opensearch/common/xcontent/json/JsonXContent.java 100.00% <ø> (ø)
...pensearch/common/xcontent/smile/SmileXContent.java 87.50% <ø> (ø)
.../opensearch/common/xcontent/yaml/YamlXContent.java 84.61% <ø> (ø)
...ction/admin/indices/create/CreateIndexRequest.java 66.22% <0.00%> (-9.32%) ⬇️
...g/opensearch/action/ingest/PutPipelineRequest.java 67.74% <0.00%> (-19.76%) ⬇️
... and 514 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize nknize merged commit 1f4cdd2 into opensearch-project:main Feb 8, 2023
@nknize nknize added the backport 2.x Backport to 2.x branch label Feb 8, 2023
@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:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-6218-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1f4cdd2f75ca5e98bd81f3226566d263ec00455c
# Push it to GitHub
git push --set-upstream origin backport/backport-6218-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

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

andrross pushed a commit to andrross/OpenSearch that referenced this pull request Feb 20, 2023
…rch-project#6218)

Refactors various REST requests to use MediaType instead of XContentType to
abstract media format from the REST interfaces.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 1f4cdd2)
Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross pushed a commit to andrross/OpenSearch that referenced this pull request Feb 20, 2023
…rch-project#6218)

Refactors various REST requests to use MediaType instead of XContentType to
abstract media format from the REST interfaces.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 1f4cdd2)
Signed-off-by: Andrew Ross <andrross@amazon.com>
@andrross
Copy link
Member

@nknize Is this going to be backported? It builds on some changes from #6009 which has not been backported. I spent a couple minutes looking at it and it wasn't immediately obvious to me how to reconcile the changes.

@andrross andrross removed the v2.6.0 'Issues and PRs related to version v2.6.0' label Feb 21, 2023
@nknize
Copy link
Collaborator Author

nknize commented Feb 21, 2023

Yes. I'll take care of both.

nknize added a commit to nknize/OpenSearch that referenced this pull request Feb 22, 2023
…rch-project#6218)

Refactors various REST requests to use MediaType instead of XContentType to
abstract media format from the REST interfaces.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
nknize added a commit that referenced this pull request Feb 22, 2023
…6433)

Refactors various REST requests to use MediaType instead of XContentType to
abstract media format from the REST interfaces.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
Rishikesh1159 added a commit to Rishikesh1159/OpenSearch that referenced this pull request Mar 16, 2023
Rishikesh1159 added a commit to Rishikesh1159/OpenSearch that referenced this pull request Mar 19, 2023
Rishikesh1159 added a commit to Rishikesh1159/OpenSearch that referenced this pull request Mar 30, 2023
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 enhancement Enhancement or improvement to existing feature or request skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants