opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
338 stars 170 forks source link

[FEATURE] Clean up logic behind admin credential changes in 2.12 onwards #764

Open derek-ho opened 3 months ago

derek-ho commented 3 months ago

Is your feature request related to a problem?

In https://github.com/opensearch-project/opensearch-py/pull/631, logic was introduced in the CI to pass in a different credential based on the version. If the version of opensearch is 2.12 or later, the demo configuration needs a strong password. Prior to that, the defualt "admin" was used. However, this was done in a sub-optimal way, which needed if - else blocks in .sh files. Ideally, this should be done with github env variables (at the top level), with no other changes within the scripting files.

What solution would you like?

Clean up of the conditional code passing in different creds

What alternatives have you considered?

None

Do you have any additional context?

None