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

[Feature] Publish plugins SNAPSHOT artifacts (along with SNASPHOT distribution) #5096

Open
reta opened this issue Oct 11, 2024 · 22 comments · Fixed by #5165
Open

[Feature] Publish plugins SNAPSHOT artifacts (along with SNASPHOT distribution) #5096

reta opened this issue Oct 11, 2024 · 22 comments · Fixed by #5165
Assignees
Labels
Build Libraries & Interfaces enhancement New Enhancement jenkins Jenkins related issue

Comments

@reta
Copy link
Contributor

reta commented Oct 11, 2024

Is your feature request related to a problem? Please describe

At the moment, we do not publish plugins SNAPSHOT artifacts but min distribution only (see please https://build.ci.opensearch.org/job/publish-opensearch-min-snapshots/). However, it becomes increasingly demanded to have plugins SNAPSHOT artifacts published as well.

Describe the solution you'd like

Publish plugins SNAPSHOT artifacts under S3 bucket https://artifacts.opensearch.org/snapshots/plugins/ so OpenSearch tooling (opensearch-plugin, etc) could be used to install them for SNAPSHOT distributions.

Describe alternatives you've considered

Publish ZIPs to Apache Maven but that would change completely the distribution model for releases and snapshots.

Additional context

See please opensearch-project/OpenSearch#16219

@reta reta added enhancement New Enhancement untriaged Issues that have not yet been triaged labels Oct 11, 2024
@reta
Copy link
Contributor Author

reta commented Oct 11, 2024

CC @prudhvigodithi

@reta
Copy link
Contributor Author

reta commented Oct 11, 2024

@peterzhuamazon @cwperks @reta can we just the leverage this ? :)

Thanks @prudhvigodithi . So this is somewhat inconsistent: all these 3 URLs point to the same plugin (at least they should) because the distributions of the plugins do not depend on the OpenSearch packaging. We could leverage that, indeed, but looks more like a workaround, not a solution.

@peterzhuamazon
Copy link
Member

At the moment we just let every distribution build the native plugins zip, but when release we only release x64/tar version.

@peterzhuamazon
Copy link
Member

So that we do not need to change the workflow too much.

@dblock
Copy link
Member

dblock commented Oct 23, 2024

Will this address my problem in opensearch-project/opensearch-api-specification#610?

I am using the 3.0 docker build and need to install one of the optional plugins.

Normal docker reference:

FROM opensearchstaging/opensearch:2.18.0@sha256:f311da085b968663fadf041bafc78b24dc21556f0726e625caf3560f7323a020

# attempt to install the plugin here
RUN ./bin/opensearch-plugin install https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.18.0/10380/linux/x64/tar/builds/opensearch/core-plugins/analysis-phonenumber-2.18.0.zip

The above example is problematic because (it doesn't work), but I also need to manually match the version to the docker image SHA somehow.

@reta
Copy link
Contributor Author

reta commented Oct 23, 2024

Will this address my problem in opensearch-project/opensearch-api-specification#610?

It will @dblock

@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Oct 24, 2024
@peterzhuamazon
Copy link
Member

After some talk on the triage meeting I fully understand what @reta is talking about.

Similar to:
https://artifacts.opensearch.org/snapshots/core/opensearch/3.0.0-SNAPSHOT/<>.tar.gz

Do a:
https://artifacts.opensearch.org/snapshots/plugins/opensearch/3.0.0-SNAPSHOT/<>.zip

We can start this with opensearch first, as I just checked we havent done any core snapshot for OSD core on artifacts.opensearch.org for a long time.

Thanks.

@Divyaasm
Copy link
Collaborator

Acceptance criteria:
Publish native plugins along side the core snapshot ->
https://artifacts.opensearch.org/snapshots/core/opensearch/3.0.0-SNAPSHOT/<>.tar.gz

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Oct 28, 2024

We also need to add the checksum files alongside the native plugin zips.
Probably need to use the same folder structure for snapshot as the release ones.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Oct 28, 2024

Hi @reta if we put the snapshot native plugins zips on s3, I assume you can directly run opensearch-plugin install <>? Or do we need to make changes in core to make it happen.

@reta
Copy link
Contributor Author

reta commented Oct 28, 2024

Hi @reta if we put the snapshot native plugins zips on s3, I assume you can directly run opensearch-plugin install <>? Or do we need to make changes in core to make it happen.

Thanks @peterzhuamazon, we only need to know the location, if it is different from the released versions fe

@peterzhuamazon
Copy link
Member

Take a look in the next two days, assuming we should be able to add it as part of min snapshot workflows.

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Oct 30, 2024

After offline sync, we will use this folder structure:

https://artifacts.opensearch.org/snapshots/plugins/analysis-icu/2.10.0-SNAPSHOT/analysis-icu-2.10.0-SNAPSHOT.zip

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Oct 31, 2024

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Nov 6, 2024

Hi @reta confirms 2.19.0-SNAPSHOT is up with core plugins
https://build.ci.opensearch.org/job/publish-opensearch-min-snapshots/1947/console

Ex: https://artifacts.opensearch.org/snapshots/plugins/analysis-icu/2.19.0-SNAPSHOT/analysis-icu-2.19.0-SNAPSHOT.zip

3.0.0-SNAPSHOT still in progress here: https://build.ci.opensearch.org/job/publish-opensearch-min-snapshots/1948/console
Should follow the same url pattern as above.

Thanks.

@reta
Copy link
Contributor Author

reta commented Nov 6, 2024

Thanks @peterzhuamazon , we have one more issue to clarify, for official plugins we also sign them and publish signature, it seems like we don't do this for snapshots?

/opensearch-2.19.0-SNAPSHOT$ ./bin/opensearch-plugin install transport-reactor-netty4                                                                                                                                                                                                     [15/178]
-> Installing transport-reactor-netty4                                                                                                                                     
-> Downloading transport-reactor-netty4 from opensearch                                                                                                                    
[=================================================] 100%                                                                                                                   
-> Failed installing transport-reactor-netty4                                                                                                                              
-> Rolling back transport-reactor-netty4                                                                                                                                   
-> Rolled back transport-reactor-netty4                                                                                                                                    
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://artifacts.opensearch.org/snapshots/plugins/transport-reactor-netty4/2.19.0-SNAPSHOT/transport-reactor-netty4-2.19.0-SNAPSHOT.zip.sig
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2013)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1614)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
        at java.base/java.net.URL.openStream(URL.java:1325)                                                                                                                
        at org.opensearch.plugins.InstallPluginCommand.urlOpenStream(InstallPluginCommand.java:490)
        at org.opensearch.plugins.InstallPluginCommand.verifySignature(InstallPluginCommand.java:630)
        at org.opensearch.plugins.InstallPluginCommand.downloadAndValidate(InstallPluginCommand.java:608)
        at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:316)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:271)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:248)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)

@peterzhuamazon
Copy link
Member

Thanks @peterzhuamazon , we have one more issue to clarify, for official plugins we also sign them and publish signature, it seems like we don't do this for snapshots?

/opensearch-2.19.0-SNAPSHOT$ ./bin/opensearch-plugin install transport-reactor-netty4                                                                                                                                                                                                     [15/178]
-> Installing transport-reactor-netty4                                                                                                                                     
-> Downloading transport-reactor-netty4 from opensearch                                                                                                                    
[=================================================] 100%                                                                                                                   
-> Failed installing transport-reactor-netty4                                                                                                                              
-> Rolling back transport-reactor-netty4                                                                                                                                   
-> Rolled back transport-reactor-netty4                                                                                                                                    
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://artifacts.opensearch.org/snapshots/plugins/transport-reactor-netty4/2.19.0-SNAPSHOT/transport-reactor-netty4-2.19.0-SNAPSHOT.zip.sig
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2013)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1614)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
        at java.base/java.net.URL.openStream(URL.java:1325)                                                                                                                
        at org.opensearch.plugins.InstallPluginCommand.urlOpenStream(InstallPluginCommand.java:490)
        at org.opensearch.plugins.InstallPluginCommand.verifySignature(InstallPluginCommand.java:630)
        at org.opensearch.plugins.InstallPluginCommand.downloadAndValidate(InstallPluginCommand.java:608)
        at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:316)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:271)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:248)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)

Yes we dont have signings for snapshots, on both plugins zips and min artifacts.
Do we need them in order to install?

@reta
Copy link
Contributor Author

reta commented Nov 6, 2024

Do we need them in order to install?

Could we do that? I think it will be helpful, or there are any drawbacks?

@peterzhuamazon
Copy link
Member

Do we need them in order to install?

Could we do that? I think it will be helpful, or there are any drawbacks?

The existing min pipeline is not designed to have signing in mind, let me take a look on it today.

@peterzhuamazon peterzhuamazon reopened this Nov 6, 2024
@github-actions github-actions bot added the untriaged Issues that have not yet been triaged label Nov 6, 2024
@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Nov 6, 2024
@peterzhuamazon
Copy link
Member

Related OS PR that is pending due to this:

@peterzhuamazon
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Libraries & Interfaces enhancement New Enhancement jenkins Jenkins related issue
Projects
Status: 🏗 In progress
Status: Not started
Development

Successfully merging a pull request may close this issue.

5 participants