opensearch-project / index-management

🗃 Automate periodic data operations, such as deleting indices at a certain age or performing a rollover at a certain size
https://opensearch.org/docs/latest/im-plugin/index/
Apache License 2.0
53 stars 111 forks source link

Accepts https as a property to set securityEnabled flag #1100

Closed DarshitChanpura closed 7 months ago

DarshitChanpura commented 7 months ago

Upon investigation I discovered that the integration tests triggered by opensearch-build do not pass security as an inline argument, instead they pass https (code-line). This cause the index-management tests in RC builds run with-security to fail with Not a valid SSL/TLS record: NotSslRecordException which translates to mismatch between http vs https. The protocol is set here conditionally to https via securityEnabled flag via https://github.com/opensearch-project/index-management/blob/bc10724d39ced73e9f05ab94a554033d338784ce/build.gradle#L514

This PR adds an additional check to toggle securityEnabled flag by checking if https was passed.

CheckList:

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.

DarshitChanpura commented 7 months ago

@bowenlan-amzn @r1walz mind reviewing this one?

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4d8ef69) 75.37% compared to head (bc10724) 75.36%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1100 +/- ## ============================================ - Coverage 75.37% 75.36% -0.01% - Complexity 2813 2814 +1 ============================================ Files 367 367 Lines 17038 17038 Branches 2370 2370 ============================================ - Hits 12842 12841 -1 - Misses 2893 2894 +1 Partials 1303 1303 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.