-
Notifications
You must be signed in to change notification settings - Fork 277
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
Publish plugin distribution ZIPs to Maven, get rid of checked in snapshot builds #716
Comments
to reply to @dblock's comment from the original issue:
this would require the build to connect to the "outside world" every time - using maven allows us to cache things locally with a well-established process (our internal maven server has the public maven servers as remotes and caches all packages downloaded from there). |
@rursprung if you or someone else wants to contribute this change, starting with snapshots, we'd take it given the proliferation of checked in zips; I think the work is to include the contents of |
I'd like us to consider this for 1.3.0, labelled as such. |
Is publishing the core-plugins zips to maven in scope of this change? |
I would imagine that yes. |
[Grooming] Need to get more information on the scenario that we need this from Maven. |
The issue is to publish zips to maven so that maven can be used for dependency management. |
Can we not use artifacts.opensearch.org for dependency management? BWC tests should be able to use the artifacts directly from artifacts.opensearch.org. |
It would ideally be a maven repo, which is a system with a bunch of well designed dependency management tools. We could get away with artifacts.opensearch.org, too, but we've been asked for maven explicitly in a few issues linked above. We're reinventing the wheel and using different tools for the same purpose. |
@gaiksaya @peterzhuamazon I think core-plugins zips would be helpful. I want to be able to run integration tests for k-NN on Mac. The INTEG_TEST testDistibution only ships with the transport modules (ARCHIVE does not work on mac). I need the lang-painless module because it needs to be installed on the cluster for k-NN to work. I can pick up the artifacts for lang-painless from https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/ but I am unable to install the module on the integ test cluster. I tried zipping the lang-painless artifacts up in a custom gradle task, but it still fails to install due to a missing plugin-descriptors file, which is not included in the artifacts link above. It would be nice to be able to declare dependencies on core plugins and easily be able to install them on the integ test clusters. I am not sure if there is a better workaround to this (if so, please let me know). The TestClusters plugin already has the ability to add modules/plugins from zips. More details in OpenSearch issue for what I have tried in particular: opensearch-project/OpenSearch#1676 (comment). |
#1689, as we support latest artifact URL, we will try latest link first, like https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.1/latest/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-1.3.1.0.zip, https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.1/latest/linux/x64/builds/opensearch/plugins/opensearch-ml-1.3.1.0.zip , @amitgalitz will work on removing job-scheduler local zip in AD, @jackiehanyang Can you take a look for moving local |
I can see with current setup that publishes maven jars to snapshot repo has an added date suffix format example The publish location can be as follows: plugin zips for snapshot type to https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/<plugin_name>/<2.0.0.0-alpha1-SNAPSHOT>/.zip I already see this path https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin for core plugins, we can leverage this path or they can go under https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/opensearch// The main releases plugin zips, once finalized to releases repo, once the path is finalized |
@prudhvigodithi Leave that decision to maven. Maven adds these suffixes to allow multiple -SNAPSHOT versions to be uploaded, so for .zips I would do the exact same thing as for other artifacts such as JARs. For the released version of the artifact I imagine the suffix is dropped. |
Hey @dblock
but for plugin zips this date is not added (currently)Example as
So when we upload the zips (mvn deploy )after every distribution build under snapshot repo, with each build the zip files will be overridden as they constantly generate with same suffix as -2.0.0.0-alpha1-SNAPSHOT.zip considering above example. But if we are ok to always pick the latest build zips like under 2.0.0.0-alpha1-SNAPSHOT folder, then it should be good to be like opensearch-job-scheduler-2.0.0.0-alpha1-SNAPSHOT.zip (as example). |
I am not super familiar with how it works, but I would want to take a maven dependency on |
Proposed Solution Almost inclined with the same setup on how the current jars are published to maven repo, but the key difference is instead of creating a directory(as maven coordinates and then deploy) we allow maven to do it, by creating local file system as temp maven repo. Example:
With the above cli command now we have folder created as maven coordinates This will have pom file and zip file stored in loacalrepo/org/opensearch/plugin/pgplugin/0.0.1 Snapshot zips: Upload the snapshot plugin zips to https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/ settings.xml
Release zips: settings.xml
Create a staging repo
|
i just re-read this ticket to see whether it'll land in 2.0 and have some comments to add:
|
Hey @rursprung Coming to the Roadmap, yes I agree it would make sense to add to the roadmap. Right now the plugin creation part is done that does the zip publications to maven, the target is to add this to each existing plugin repo, that follow certain guidelines (PR for document is under review) and make sure the zips are added to maven. The maven for releases should be central maven along with nexus. |
as i had already mentioned in #20 (comment) and #20 (comment) (and i think also various other places) we'd actually want to pull in the opensearch distribution also via maven as it brings a ton of benefits (caching amongst them). |
you're right, i mean the
let's do that! will you edit the ticket description or should i add a comment there? |
@rursprung @prudhvigodithi Looks like current issues talk about publishing "plugin zips". After @prudhvigodithi is done with that all those will get closed rather than expanding their scope. I think we need two more related issues: one to publish the min distribution (e.g. https://artifacts.opensearch.org/releases/core/opensearch/1.3.1/opensearch-min-1.3.1-linux-x64.tar.gz) to maven, and another to publish the distribution zip (e.g. https://artifacts.opensearch.org/releases/bundle/opensearch/1.3.1/opensearch-1.3.1-linux-x64.tar.gz) to maven, in this repo. Note that there are cons to doing that because it effectively creates 2 different places where we publish signed binaries. If you agree, care to open them @rursprung? |
i was going to raise a new ticket, but then i realised again that the title of this ticket here literally is "publish distribution ZIPs to Maven", so based on that i think it should cover it? and you raised this ticket here out of our discussion over on #20 (comment) i'm fine with raising a new ticket (or even two, as you suggested), just wondering on how to word it so that we can ensure that we then are talking about the same thing and don't get a scope change again. because so far i fully expected this ticket here to contain the distributions (min & full) and the plugins just as a (very welcome & also needed!) side-effect ;) |
@rursprung yeah let's not assume side effects :) you're right though it was all zips in this issue - I decided to scope this down and rename this issue to one to only focus on publishing plugin zips - care to open 2 more for the other kind of artifacts, one for each? |
Hey @dblock we have now, a mechanism to publish the zips to maven repo using opensearch.pluginzip, can we close this issue ? |
This issue is about leveraging this mechanism. At least these two need to be resolved, and we need to check that we're not doing something similar elsewhere before closing this. |
Hey Starting with release 2.1.0, we now have plugin zips in maven repo Pending items related to this issue before it can be closed: Thank you |
Closing this issue as associated tasks are marked as complete, please feel free to re-open this issue if required. :) |
Is your feature request related to a problem? Please describe
Coming from #20 (comment), publish distribution zips to maven.
Maven can be used for things other than java dependencies and is also actively used in such cases.
Describe the solution you'd like
Dependencies with plugins
Describe alternatives you've considered
No response
Additional context
Some examples of others which also publish ZIPs on maven:
Acceptance Criteria
The text was updated successfully, but these errors were encountered: