-
Notifications
You must be signed in to change notification settings - Fork 173
Add provided dependency section to ml-client POM #4131
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Daniel Widdis <[email protected]>
8ef79c2
to
3c8413b
Compare
withXml { | ||
def dependencies = asNode().appendNode('dependencies') | ||
|
||
def addProvidedDependency = { group, artifact, version -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this issue. Have you verified this? Any impact to other plugins using ml-commons clients like neural-search?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really only changes the POM which wouuld in theory add transitive dependencies, ecxept:
- we don't do transitive dependencies in OpenSearch (the source of the problem!)
- it's in scope
<provided>
which means it wouldn't be imported transitively if it did. This is purely a user documentation change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did test it with flow framework by deleting those imports (and getting runtime errors) even with the new snapshot containing the new values in the pom in my maven local repository, so it confirms these imports aren't included.
Description
The ML Client requires a few runtime dependencies that are not included in the shadow JAR, primarily associated with validation of ML Connector fields. The requirement to have these dependencies by downstream consumers of the client is not documented nor obvious.
In the Maven dependency ecosystem, the
provided
dependency scope is a clear indicator of a required runtime dependency that the project is not providing itself:This PR appends a
<dependency>
section to the published opensearch-ml-client POM file on the Central Repository. The additional section added will be:Note that there is an additional dependency in
StringUtils
oncom.networknt:json-schema-validator:1.4.0
. Currently this is not required by the ML Client, but if any future changes to the client include schema validation, that should be added to this list.This has no impact on actual included dependencies; it's simply a documentation signal to clearly indicate to consumers of this client that they must provide these dependencies themselves.
Related Issues
Check List
--signoff
.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.