opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 895 forks source link

[Tests] Use release min artifact if available #1201

Open kavilla opened 2 years ago

kavilla commented 2 years ago

Is your feature request related to a problem? Please describe.

https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/packages/osd-opensearch/src/artifact.js#L189 Only accepts from -SNAPSHOT builds, but when a release is a cut for OpenSearch we can use the release min if it's available.

Describe the solution you'd like

On the branch 1.2 I can run the integration tests yarn test:jest_integration and it will use the artifact from https://artifacts.opensearch.org/releases/core/opensearch/1.2.0/opensearch-min-1.2.0-linux-x64.tar.gz instead of attempting to use the https://artifacts.opensearch.org/snapshots/core/opensearch/1.2.0-SNAPSHOT/opensearch-min-1.2.0-SNAPSHOT-linux-x64-latest.tar.gz

Describe alternatives you've considered

n/a

Additional context

Will need to verify the non-snapshot works fine.

dblock commented 2 years ago

The code should first attempt to get a released version of OpenSearch, then fallback to a -SNAPSHOT version if that's not available.

joshuarrrr commented 2 years ago

@kavilla Can you provide a little bit of additional context about the difference between the min and the snapshot builds, and under which circumstances we'd prefer one over the other? Should we fall back to the snapshot artifact if the min build is unavailable? Do we need to allow users to specify their preference via a CLI arg?

Will any of the logic need to change to accomodate a switch from ci.opensearch.org to artifacts.opensearch.org as suggested in https://github.com/opensearch-project/opensearch-build/issues/2114?