Skip to content

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

Merged
nknize merged 6 commits intoopensearch-project:mainfrom
nknize:hlrcMediaTypeMethods
Feb 8, 2023
Merged

[Refactor] Requests to use MediaType instead of XContentType#6218
nknize merged 6 commits intoopensearch-project:mainfrom
nknize:hlrcMediaTypeMethods

Conversation

@nknize
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

@nknize nknize force-pushed the hlrcMediaTypeMethods branch from 29abae8 to 739d524 Compare February 7, 2023 15:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Copy Markdown
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>
@nknize nknize force-pushed the hlrcMediaTypeMethods branch from 6978118 to ded5906 Compare February 8, 2023 14:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 8, 2023

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 8, 2023

Codecov Report

❌ Patch coverage is 50.94340% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.77%. Comparing base (2b77985) to head (2f0ec23).
⚠️ Report is 4208 commits behind head on main.

Files with missing lines Patch % Lines
.../opensearch/client/indices/CreateIndexRequest.java 7.69% 12 Missing ⚠️
...ction/admin/indices/create/CreateIndexRequest.java 0.00% 12 Missing ⚠️
...g/opensearch/client/indices/PutMappingRequest.java 25.00% 9 Missing ⚠️
...g/opensearch/action/ingest/PutPipelineRequest.java 0.00% 7 Missing ⚠️
...org/opensearch/common/xcontent/XContentHelper.java 66.66% 4 Missing and 3 partials ⚠️
...search/client/indices/PutIndexTemplateRequest.java 42.85% 4 Missing ⚠️
...ch/common/xcontent/json/JsonXContentGenerator.java 95.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6218      +/-   ##
============================================
- Coverage     70.91%   70.77%   -0.14%     
+ Complexity    58898    58842      -56     
============================================
  Files          4780     4780              
  Lines        281380   281467      +87     
  Branches      40635    40639       +4     
============================================
- Hits         199536   199207     -329     
- Misses        65426    65848     +422     
+ Partials      16418    16412       -6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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