Skip to content

Conversation

@zane-neo
Copy link
Collaborator

Description

Move HttpClientFactory to common to expose to other components(skills)

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • 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.

compileOnly group: 'com.networknt' , name: 'json-schema-validator', version: '1.4.0'
// Multi-tenant SDK Client
compileOnly "org.opensearch:opensearch-remote-metadata-sdk:${opensearch_build}"
compileOnly (group: 'software.amazon.awssdk', name: 'netty-nio-client', version: "2.30.18") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any impact to other plugins which depend on ml-commons? Like neural-search, flow-framework

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now it's only skills.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dbwiddis I know you wanted dependent plugins to get informed if in ml-commons we change any dependencies.

Copy link
Member

@dbwiddis dbwiddis Sep 26, 2025

Choose a reason for hiding this comment

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

Thanks @dhrubo-os .

@zane-neo Highly recommend you use the version from the OpenSearch version catalog for any awssdk components. I believe 2.30.18 is CVE-impacted. (see https://mvnrepository.com/artifact/software.amazon.awssdk/netty-nio-client/2.30.18)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have quite a few places using hard coded versions of amazon.awssdk, I prefer we change all these in a separate PR:

(base) zaniu@bcd07465d161:~/Documents/code/ml-commons$ grep 'amazon.awssdk' **/*.gradle
common/build.gradle:    compileOnly (group: 'software.amazon.awssdk', name: 'netty-nio-client', version: ${versions.aws}) {
ml-algorithms/build.gradle:    implementation platform('software.amazon.awssdk:bom:2.30.18')
ml-algorithms/build.gradle:    api 'software.amazon.awssdk:auth:2.30.18'
ml-algorithms/build.gradle:    implementation 'software.amazon.awssdk:apache-client'
ml-algorithms/build.gradle:    compileOnly group: 'software.amazon.awssdk', name: 'aws-core', version: "2.30.18"
ml-algorithms/build.gradle:    compileOnly group: 'software.amazon.awssdk', name: 's3', version: "2.30.18"
ml-algorithms/build.gradle:    compileOnly group: 'software.amazon.awssdk', name: 'regions', version: "2.30.18"
ml-algorithms/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:bom:2.30.18'
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 'aws-core', version: "2.30.18"
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 's3', version: "2.30.18"
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 'regions', version: "2.30.18"
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 'aws-xml-protocol', version: "2.30.18"
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 'aws-query-protocol', version: "2.30.18"
plugin/build.gradle:    implementation group: 'software.amazon.awssdk', name: 'protocol-core', version: "2.30.18"
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:bom:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:auth:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:aws-core:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:aws-query-protocol:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:aws-xml-protocol:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:protocol-core:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:regions:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:netty-nio-client:2.30.31'
plugin/build.gradle:    resolutionStrategy.force 'software.amazon.awssdk:s3:2.30.31'

Copy link
Member

Choose a reason for hiding this comment

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

I prefer we change all these in a separate PR:

Didn't this PR fix most of them? https://github.com/opensearch-project/ml-commons/pull/4210/files

We can't release 3.3.0 with these CVE-impacted versions and time is short.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dbwiddis I've made change to the versions, please take a look again.

Copy link
Member

Choose a reason for hiding this comment

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

LGTM!

@ylwu-amzn
Copy link
Collaborator

CI failed

@zane-neo
Copy link
Collaborator Author

CI failed

The CI failed since opensearch-remote-metadata-sdk used ThreadContextAccess which is not for public use, I've created this PR to fix: opensearch-project/opensearch-remote-metadata-sdk#254

Signed-off-by: zane-neo <[email protected]>
@zane-neo zane-neo dismissed stale reviews from pyek-bot and dhrubo-os via d4df6d6 September 30, 2025 00:20
@zane-neo zane-neo force-pushed the fix-websearchtool-security-issue branch from 1e0862e to d4df6d6 Compare September 30, 2025 00:20
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env September 30, 2025 00:22 — with GitHub Actions Inactive
@zane-neo zane-neo temporarily deployed to ml-commons-cicd-env September 30, 2025 00:22 — with GitHub Actions Inactive
@zane-neo
Copy link
Collaborator Author

Failure ITs are flaky

@zane-neo zane-neo merged commit 5883f54 into opensearch-project:main Sep 30, 2025
13 of 21 checks passed
brianf-aws pushed a commit to brianf-aws/ml-commons that referenced this pull request Oct 22, 2025
…earch-project#4175)

* Move HttpClientFactory to common to expose to other componenets

Signed-off-by: zane-neo <[email protected]>

* optimize code for better maintainability

Signed-off-by: zane-neo <[email protected]>

* Optimize code and increase UT coverage

Signed-off-by: zane-neo <[email protected]>

* Address comments

Signed-off-by: zane-neo <[email protected]>

* Use amazon aws version from opensearch core

Signed-off-by: zane-neo <[email protected]>

* address comments

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
brianf-aws pushed a commit to brianf-aws/ml-commons that referenced this pull request Oct 23, 2025
…earch-project#4175)

* Move HttpClientFactory to common to expose to other componenets

Signed-off-by: zane-neo <[email protected]>

* optimize code for better maintainability

Signed-off-by: zane-neo <[email protected]>

* Optimize code and increase UT coverage

Signed-off-by: zane-neo <[email protected]>

* Address comments

Signed-off-by: zane-neo <[email protected]>

* Use amazon aws version from opensearch core

Signed-off-by: zane-neo <[email protected]>

* address comments

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
brianf-aws pushed a commit to brianf-aws/ml-commons that referenced this pull request Oct 24, 2025
…earch-project#4175)

* Move HttpClientFactory to common to expose to other componenets

Signed-off-by: zane-neo <[email protected]>

* optimize code for better maintainability

Signed-off-by: zane-neo <[email protected]>

* Optimize code and increase UT coverage

Signed-off-by: zane-neo <[email protected]>

* Address comments

Signed-off-by: zane-neo <[email protected]>

* Use amazon aws version from opensearch core

Signed-off-by: zane-neo <[email protected]>

* address comments

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
Signed-off-by: Brian Flores <[email protected]>
brianf-aws pushed a commit to brianf-aws/ml-commons that referenced this pull request Oct 27, 2025
…earch-project#4175)

* Move HttpClientFactory to common to expose to other componenets

Signed-off-by: zane-neo <[email protected]>

* optimize code for better maintainability

Signed-off-by: zane-neo <[email protected]>

* Optimize code and increase UT coverage

Signed-off-by: zane-neo <[email protected]>

* Address comments

Signed-off-by: zane-neo <[email protected]>

* Use amazon aws version from opensearch core

Signed-off-by: zane-neo <[email protected]>

* address comments

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
Signed-off-by: Brian Flores <[email protected]>
mingshl pushed a commit that referenced this pull request Oct 27, 2025
* Increment version to 2.19.4-SNAPSHOT

Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Brian Flores <[email protected]>

* fix CVE-2025-55163, CVE-2025-48924 (#4298)

* address commons-lang3 CVE-2025-48924

Signed-off-by: Brian Flores <[email protected]>

* pin netty to 4.2.5.Final version address  CVE-2025-55163

Signed-off-by: Brian Flores <[email protected]>

* force all subProjects to use updated common-lang3 version

Signed-off-by: Brian Flores <[email protected]>

---------

Signed-off-by: Brian Flores <[email protected]>

* Move HttpClientFactory to common to expose to other components (#4175)

* Move HttpClientFactory to common to expose to other componenets

Signed-off-by: zane-neo <[email protected]>

* optimize code for better maintainability

Signed-off-by: zane-neo <[email protected]>

* Optimize code and increase UT coverage

Signed-off-by: zane-neo <[email protected]>

* Address comments

Signed-off-by: zane-neo <[email protected]>

* Use amazon aws version from opensearch core

Signed-off-by: zane-neo <[email protected]>

* address comments

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
Signed-off-by: Brian Flores <[email protected]>

* use mainline versions.aws via hardcode

Signed-off-by: Brian Flores <[email protected]>

* address CVE-2025-58057

Signed-off-by: Brian Flores <[email protected]>

* fix code format

Signed-off-by: Brian Flores <[email protected]>

* empty commit to trigger CI

Signed-off-by: Brian Flores <[email protected]>

* Fix claude model it (#4167)

* fix model it by replace claude v1/v2

Signed-off-by: xinyual <[email protected]>

* remove useless change

Signed-off-by: xinyual <[email protected]>

---------

Signed-off-by: xinyual <[email protected]>
Signed-off-by: Brian Flores <[email protected]>

* Don't convert schema-defined strings to other types during validation (#3761)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Brian Flores <[email protected]>

* fix Cohere IT (#4174)

* fix Cohere IT

Signed-off-by: xinyual <[email protected]>

* apply spotless

Signed-off-by: xinyual <[email protected]>

* delete useless it

Signed-off-by: xinyual <[email protected]>

---------

Signed-off-by: xinyual <[email protected]>
Signed-off-by: Brian Flores <[email protected]>

---------

Signed-off-by: opensearch-ci-bot <[email protected]>
Signed-off-by: Brian Flores <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
Co-authored-by: opensearch-ci-bot <[email protected]>
Co-authored-by: zane-neo <[email protected]>
Co-authored-by: Xinyuan Lu <[email protected]>
Co-authored-by: Daniel Widdis <[email protected]>
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.

7 participants