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

Support installing plugin SNAPSHOTs with SNASPHOT distribution #16581

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reta
Copy link
Collaborator

@reta reta commented Nov 6, 2024

Description

Support installing plugin SNAPSHOTs with SNASPHOT distribution

/opensearch-2.19.0-SNAPSHOT$ ./bin/opensearch-plugin install transport-reactor-netty4
-> Installing transport-reactor-netty4                                                                                                                                     
-> Downloading transport-reactor-netty4 from opensearch                                                                                                                    
[=================================================] 100%                                                                                                                   

Related Issues

Part of opensearch-project/opensearch-build#5096, addresses #16219

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

pluginId,
version,
stagingHash
version + "-SNAPSHOT"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is tricky one: OpenSearch version has no SNAPSHOT suffix, but Build.CURRENT does

Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we use the same as release distributions Build.CURRENT.getQualifiedVersion() ?
Sounds like the only diff is the artifacts URL, could we consolidate the if-else ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @saratvemulapalli

This is tricky one: OpenSearch version has no SNAPSHOT suffix, but Build.CURRENT does

We don't pass build version here, only the version (which is current) + isSnapshot, I think it is fine (vs adding additional arguments)

Sounds like the only diff is the artifacts URL, could we consolidate the if-else ?

This if-else is only about artifacts URL (baseUrl)

@reta
Copy link
Collaborator Author

reta commented Nov 6, 2024

The signature part is not yet settled:

/opensearch-2.19.0-SNAPSHOT$ ./bin/opensearch-plugin install transport-reactor-netty4                                                                                                                                                                                                     
-> 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)

Copy link
Contributor

github-actions bot commented Nov 6, 2024

❌ Gradle check result for 6268761: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Nov 6, 2024

❌ Gradle check result for 422c83e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Nov 6, 2024

❌ Gradle check result for 65d5cc9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Nov 6, 2024

❌ Gradle check result for e7a48c0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Nov 6, 2024

✅ Gradle check result for 1774f1d: SUCCESS

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.07%. Comparing base (e688388) to head (7b24470).
Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16581      +/-   ##
============================================
- Coverage     72.15%   72.07%   -0.08%     
+ Complexity    65128    65055      -73     
============================================
  Files          5315     5315              
  Lines        303573   303568       -5     
  Branches      43925    43924       -1     
============================================
- Hits         219036   218799     -237     
- Misses        66565    66795     +230     
- Partials      17972    17974       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Nov 8, 2024

❌ Gradle check result for 1255cf8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Nov 8, 2024

❕ Gradle check result for 7b24470: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@reta
Copy link
Collaborator Author

reta commented Nov 11, 2024

Success!

$ ./bin/opensearch-plugin install transport-nio
-> Installing transport-nio
-> Downloading transport-nio from opensearch
[=================================================] 100%   
-> Installed transport-nio with folder name transport-nio

@reta
Copy link
Collaborator Author

reta commented Nov 12, 2024

$ /home/opensearch-3.0.0-SNAPSHOT$ ./bin/opensearch-plugin install transport-nio
-> Installing transport-nio
-> Downloading transport-nio from opensearch
[=================================================] 100%   
-> Installed transport-nio with folder name transport-nio

$ ll plugins/transport-nio/
total 3.3M
-rw-r--r-- 1 user group  12K Nov 12 14:15 LICENSE.txt
-rw-r--r-- 1 user group 329K Nov 12 14:15 netty-buffer-4.1.114.Final.jar
-rw-r--r-- 1 user group 344K Nov 12 14:15 netty-codec-4.1.114.Final.jar
-rw-r--r-- 1 user group 653K Nov 12 14:15 netty-codec-http-4.1.114.Final.jar
-rw-r--r-- 1 user group 679K Nov 12 14:15 netty-common-4.1.114.Final.jar
-rw-r--r-- 1 user group 564K Nov 12 14:15 netty-handler-4.1.114.Final.jar
-rw-r--r-- 1 user group  37K Nov 12 14:15 netty-resolver-4.1.114.Final.jar
-rw-r--r-- 1 user group 510K Nov 12 14:15 netty-transport-4.1.114.Final.jar
-rw-r--r-- 1 user group  44K Nov 12 14:15 netty-transport-native-unix-common-4.1.114.Final.jar
-rw-r--r-- 1 user group  16K Nov 12 14:15 NOTICE.txt
-rw-r--r-- 1 user group  59K Nov 12 14:15 opensearch-nio-3.0.0-SNAPSHOT.jar
-rw-r--r-- 1 user group 1.9K Nov 12 14:15 plugin-descriptor.properties
-rw-r--r-- 1 user group 1.7K Nov 12 14:15 plugin-security.policy
-rw-r--r-- 1 user group  66K Nov 12 14:15 transport-nio-client-3.0.0-SNAPSHOT.jar

@reta
Copy link
Collaborator Author

reta commented Nov 13, 2024

@saratvemulapalli LGTY? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants