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

Update httpcomponents dependencies. #554

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Update httpcomponents dependencies. #554

merged 1 commit into from
Jul 5, 2023

Conversation

Yury-Fridlyand
Copy link
Contributor

Description

httpclient5 and httpcore5 were updated in OpenSearch in opensearch-project/OpenSearch#8434. Java client has to be updated to reflect the changes.
These changes are breaking for SQL plugin IT.

opensearch-project-sql $ ./gradlew :integ-test:integTest

...

> Task :integ-test:compileTestJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':integ-test:compileTestJava'.
> Could not resolve all dependencies for configuration ':integ-test:testCompileClasspath'.
   > Conflict(s) found for the following module(s):
       - org.apache.httpcomponents.client5:httpclient5 between versions 5.2.1 and 5.1.4
       - org.apache.httpcomponents.core5:httpcore5 between versions 5.2.2 and 5.1.5
     Run with:
         --scan or
         :integ-test:dependencyInsight --configuration testCompileClasspath --dependency org.apache.httpcomponents.client5:httpclient5
     to get more insight on how to solve the conflict.

...

BUILD FAILED in 14s
35 actionable tasks: 18 executed, 17 up-to-date

opensearch-project-sql $ ./gradlew :integ-test:dependencyInsight --configuration testCompileClasspath --dependency org.apache.httpcomponents.client5:httpclient5
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.6.1
  OS Info               : Windows 11 10.0 (amd64)
  JDK Version           : 17 (Eclipse Temurin JDK)
  JAVA_HOME             : C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot
  Random Testing Seed   : BC32CE6B49344BEF
  In FIPS 140 mode      : false
=======================================

> Task :integ-test:dependencyInsight
Dependency resolution failed because of conflict(s) on the following module(s):
   - org.apache.httpcomponents.client5:httpclient5 between versions 5.2.1 and 5.1.4

org.apache.httpcomponents.client5:httpclient5:5.2.1
  Variant compile:
    | Attribute Name                 | Provided | Requested    |
    |--------------------------------|----------|--------------|
    | org.gradle.status              | release  |              |
    | org.gradle.category            | library  | library      |
    | org.gradle.libraryelements     | jar      | classes      |
    | org.gradle.usage               | java-api | java-api     |
    | org.gradle.dependency.bundling |          | external     |
    | org.gradle.jvm.environment     |          | standard-jvm |
    | org.gradle.jvm.version         |          | 11           |
   Selection reasons:
      - By conflict resolution: between versions 5.2.1 and 5.1.4

org.apache.httpcomponents.client5:httpclient5:5.2.1
\--- org.opensearch.client:opensearch-rest-client-sniffer:3.0.0-SNAPSHOT:20230704.162035-1057
     \--- org.opensearch.test:framework:3.0.0-SNAPSHOT:20230704.162035-1054
          \--- testCompileClasspath

org.apache.httpcomponents.client5:httpclient5:5.1.4 -> 5.2.1
\--- org.opensearch.client:opensearch-rest-client:3.0.0-SNAPSHOT:20230704.155622-1056
     +--- testCompileClasspath
     +--- org.opensearch.test:framework:3.0.0-SNAPSHOT:20230704.162035-1054
     |    \--- testCompileClasspath
     +--- org.opensearch.client:opensearch-rest-high-level-client:3.0.0-SNAPSHOT:20230704.155622-1056
     |    \--- testCompileClasspath
     \--- org.opensearch.client:opensearch-rest-client-sniffer:3.0.0-SNAPSHOT:20230704.162035-1057
          \--- org.opensearch.test:framework:3.0.0-SNAPSHOT:20230704.162035-1054 (*)

(*) - dependencies omitted (listed previously)

A web-based, searchable dependency report is available by adding the --scan option.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
4 actionable tasks: 1 executed, 3 up-to-date

Issues Resolved

This PR supersedes #550 and #549.

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.

@reta
Copy link
Collaborator

reta commented Jul 5, 2023

@Yury-Fridlyand there are pull requests already:
#550
#549

@Yury-Fridlyand
Copy link
Contributor Author

Yury-Fridlyand commented Jul 5, 2023

Hi @reta
As you mentioned in #549 (comment) we have to update both components in one PR.

Copy link
Collaborator

@VachaShah VachaShah left a comment

Choose a reason for hiding this comment

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

Thank you @Yury-Fridlyand!

@reta reta merged commit d786611 into opensearch-project:main Jul 5, 2023
36 checks passed
@reta reta added the backport 2.x Backport to 2.x branch label Jul 5, 2023
@reta
Copy link
Collaborator

reta commented Jul 5, 2023

Thank you @Yury-Fridlyand !

@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-554-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d786611431e78a6c5f7212d6304621f401dbde8f
# Push it to GitHub
git push --set-upstream origin backport/backport-554-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-554-to-2.x.

@Yury-Fridlyand Yury-Fridlyand deleted the update-httpcomponents branch July 5, 2023 18:27
reta pushed a commit to reta/opensearch-java that referenced this pull request Jul 5, 2023
Signed-off-by: Yury-Fridlyand <[email protected]>
(cherry picked from commit d786611)
reta pushed a commit to reta/opensearch-java that referenced this pull request Jul 5, 2023
Signed-off-by: Yury-Fridlyand <[email protected]>
(cherry picked from commit d786611)
Signed-off-by: Andriy Redko <[email protected]>
VachaShah pushed a commit that referenced this pull request Jul 5, 2023
(cherry picked from commit d786611)

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Andriy Redko <[email protected]>
Co-authored-by: Yury-Fridlyand <[email protected]>
@BrendonFaleiro BrendonFaleiro mentioned this pull request Jun 21, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants