-
Notifications
You must be signed in to change notification settings - Fork 30
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
Change js to jar dependency #74
Change js to jar dependency #74
Conversation
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
Signed-off-by: zane-neo <[email protected]>
6106bb5
to
161732b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #74 +/- ##
=========================================
Coverage 81.76% 81.76%
Complexity 86 86
=========================================
Files 8 8
Lines 521 521
Branches 70 70
=========================================
Hits 426 426
Misses 54 54
Partials 41 41 ☔ View full report in Codecov by Sentry. |
Could you add more details on the reasoning for this change, what it is changing exactly, and what the blockers are in AD and SQL plugin to do the same? From my understanding it is that AD, for example, doesn't have jars in sonatype? I see it does exist there for job-scheduler. Do we have a path forward to add? Additionally, I see you added forced versions for some dependencies - was this due to jarhell issues when changing the dependency model for JS? I'm worried this will be more of an issue if more plugins with their dependencies are added this way. |
Signed-off-by: zane-neo <[email protected]>
@ohltyler Updated the description, please take a look. |
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 the details! Makes sense to me.
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/skills/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/skills/backport-2.x
# Create a new branch
git switch --create backport/backport-74-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 edf31505ba25c38aa61bb5908e827dc784e62ee6
# Push it to GitHub
git push --set-upstream origin backport/backport-74-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/skills/backport-2.x Then, create a pull request where the |
Description
There're two types of dependency in our repo:
on jar
which usually underorg.opensearch
: https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/ andon plugin
which usually underorg.opensearch.plugin
: https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/.For most common cases, we should depend on jars instead of plugins, because depend on plugin is a workaround and depend on jar is the most natural way.
We're depending on sql's plugin because sql doesn't publish jars for
ppl.jar
andprotocol.jar
and sql team refused to publish these jars, so we have to extract them from sql plugin zip.Job-scheduler publishes jars to this location:
org.opensearch:opensearch-job-scheduler-${version}
: https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/opensearch-job-scheduler/, so we can depend on jar directly. This PR is to make this change.For Anomaly-detection, the jars also not published to
org.opensearch
: https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/ , and the reason I assume is missing publishAllPublicationsToStagingRepository in scripts/build.sh, for now to not break compilation,we can only extracting jars from ad plugin. If ad in the future publishes jars to sonatype, we can change ad's dependency to jar's approach just like job-scheduler.
For forced versions: I published ad jars in my local so I can change ad dependency to jar type but found there's jar version conflicts, so forced the versions, after publish the PR, I found ad jars are not in sonatype, so rolled back ad to plugin dependency but didn't remove this force version. I've update this part to remove them.
Issues Resolved
Change js to jar dependency
Check List
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.