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

Set httpcore5 to 5.2 to be compatible with httpclient5 5.2.1 #8503

Closed
wants to merge 2 commits into from

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Jul 6, 2023

Description

org.apache.httpcomponents.client5:httpclient5:5.2.1 is compatible with httpcore5:5.2 and the recent upgrade to 5.2.2 is causing problems running an extension using the SDK. I am opening a PR to downgrade the version to 5.2 which is compatible with httpclient:5.2.1

Issues Resolved

opensearch-project/opensearch-sdk-java#857

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.

@cwperks
Copy link
Member Author

cwperks commented Jul 6, 2023

@reta There were issues in the SDK related to the httpcore5 update to 5.2.2 so I created a PR to set it to 5.2 which is compatible with httpclient:5.2.1.

I created another PR in opensearch-java too: opensearch-project/opensearch-java#566

Signed-off-by: Craig Perkins <[email protected]>
Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

LGTM! Unless @reta has anything for downgrading the version.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testPitCreatedOnReplica
      1 org.opensearch.remotestore.RemoteStoreIT.testStaleCommitDeletionWithoutInvokeFlush

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #8503 (3c1ee94) into main (c1c23b4) will decrease coverage by 0.03%.
The diff coverage is 90.74%.

@@             Coverage Diff              @@
##               main    #8503      +/-   ##
============================================
- Coverage     70.90%   70.87%   -0.03%     
- Complexity    56903    56922      +19     
============================================
  Files          4758     4758              
  Lines        269225   269227       +2     
  Branches      39407    39402       -5     
============================================
- Hits         190881   190826      -55     
+ Misses        62256    62251       -5     
- Partials      16088    16150      +62     
Impacted Files Coverage Δ
...opensearch/index/translog/NoOpTranslogManager.java 63.63% <0.00%> (-1.99%) ⬇️
...search/index/shard/RemoteStoreRefreshListener.java 82.84% <66.66%> (-1.16%) ⬇️
...va/org/opensearch/index/store/RemoteDirectory.java 88.37% <87.50%> (-0.52%) ⬇️
...earch/index/store/RemoteSegmentStoreDirectory.java 92.09% <100.00%> (+0.17%) ⬆️
...search/index/translog/InternalTranslogManager.java 67.13% <100.00%> (-4.70%) ⬇️

... and 479 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testDropPrimaryDuringReplication
      1 org.opensearch.remotestore.RemoteStoreIT.testStaleCommitDeletionWithoutInvokeFlush

@dblock
Copy link
Member

dblock commented Jul 6, 2023

Isn't the fix to upgrade httpcore to 5.2.2?

@cwperks
Copy link
Member Author

cwperks commented Jul 6, 2023

@dblock Looking at the source code for HttpClient5:5.2.1, it references HttpCore5:5.2 not HttpCore5:5.2.2

This isn't the case with HttpClient5:4.5.14 which references HttpCore5:4.4.16

@reta
Copy link
Collaborator

reta commented Jul 6, 2023

Isn't the fix to upgrade httpcore to 5.2.2?

We use 5.2.2 explicitly, the transient 5.2 dependency from HttpClient5 should not be used:

httpcleint5         = 5.2.1
httpcore5         = 5.2.2

@reta
Copy link
Collaborator

reta commented Jul 6, 2023

Fix is sent to opensearch-project/opensearch-sdk-java#861

@cwperks
Copy link
Member Author

cwperks commented Jul 6, 2023

Thank you @reta ! Closing this PR.

@cwperks cwperks closed this Jul 6, 2023
@reta
Copy link
Collaborator

reta commented Jul 7, 2023

For the record, rest-high-level dependencies:

> Task :client:rest-high-level:dependencyInsight
org.apache.httpcomponents.core5:httpcore5:5.2.2
  Variant runtime:
    | Attribute Name                 | Provided     | Requested    |
    |--------------------------------|--------------|--------------|
    | org.gradle.status              | release      |              |
    | org.gradle.category            | library      | library      |
    | org.gradle.libraryelements     | jar          | jar          |
    | org.gradle.usage               | java-runtime | java-runtime |
    | org.gradle.dependency.bundling |              | external     |
    | org.gradle.jvm.environment     |              | standard-jvm |
    | org.gradle.jvm.version         |              | 11           |

org.apache.httpcomponents.core5:httpcore5:5.2.2
\--- project :client:rest
     \--- runtimeClasspath

org.apache.httpcomponents.core5:httpcore5-h2:5.2.2
  Variant runtime:
    | Attribute Name                 | Provided     | Requested    |
    |--------------------------------|--------------|--------------|
    | org.gradle.status              | release      |              |
    | org.gradle.category            | library      | library      |
    | org.gradle.libraryelements     | jar          | jar          |
    | org.gradle.usage               | java-runtime | java-runtime |
    | org.gradle.dependency.bundling |              | external     |
    | org.gradle.jvm.environment     |              | standard-jvm |
    | org.gradle.jvm.version         |              | 11           |

org.apache.httpcomponents.core5:httpcore5-h2:5.2.2
\--- project :client:rest
     \--- runtimeClasspath

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.

4 participants