Skip to content

Create WaitForClusterSetup gradle plugin to abstract common logic across multiple plugins#18892

Closed
cwperks wants to merge 4 commits intoopensearch-project:mainfrom
cwperks:check-for-status-plugin
Closed

Create WaitForClusterSetup gradle plugin to abstract common logic across multiple plugins#18892
cwperks wants to merge 4 commits intoopensearch-project:mainfrom
cwperks:check-for-status-plugin

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Aug 1, 2025

Description

Many plugins have the following logic copied to help setting up integTests running with security: https://github.com/search?q=org%3Aopensearch-project%20%22def%20waitForClusterSetup%22&type=code

The reason for the logic is to configure the protocol (http:// vs https://) and then also configured username and password for configuring basic auth authentication which is the predominant type of auth using for automated testing across the plugins. (The security repo has tests that run with many other auth types, but for plugins they exclusively test with basic auth for testing integration with security)

Tested by publishing these changes and run on the reporting repo. See opensearch-project/reporting#1111 for testing details.

Related Issues

Resolves opensearch-project/opensearch-plugins#245

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.

…oss multiple plugins

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks requested a review from a team as a code owner August 1, 2025 14:02
@cwperks
Copy link
Member Author

cwperks commented Aug 1, 2025

@epugh you may be interested in this one. This has been on my TODO list for a while...I will create a PR on the search-relevance repo after this is merged.

cwperks added 2 commits August 1, 2025 10:09
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@prudhvigodithi
Copy link
Member

Thanks for this change @cwperks, seeing this PR opensearch-project/reporting#1111 lot of code is removed by using this plugin. Will review this PR soon.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

❌ Gradle check result for ce6d933: 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?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

❌ Gradle check result for 2f9a184: 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?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

✅ Gradle check result for 2f9a184: SUCCESS

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 0% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.81%. Comparing base (9b22c9b) to head (2f9a184).
⚠️ Report is 133 commits behind head on main.

Files with missing lines Patch % Lines
...g/opensearch/gradle/WaitForClusterSetupTask.groovy 0.00% 65 Missing ⚠️
...opensearch/gradle/WaitForClusterSetupPlugin.groovy 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18892      +/-   ##
============================================
+ Coverage     72.77%   72.81%   +0.04%     
- Complexity    68690    68819     +129     
============================================
  Files          5582     5590       +8     
  Lines        315456   315796     +340     
  Branches      45778    45827      +49     
============================================
+ Hits         229568   229952     +384     
+ Misses        67290    67233      -57     
- Partials      18598    18611      +13     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@epugh
Copy link
Contributor

epugh commented Aug 1, 2025

@epugh you may be interested in this one. This has been on my TODO list for a while...I will create a PR on the search-relevance repo after this is merged.

Thanks for doing this. There is way too much boiler plate code that gets copied from plugin repo to plugin repo!

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Sep 1, 2025
@cwperks
Copy link
Member Author

cwperks commented Sep 3, 2025

Closing as this is already possible in testclusters by passing the following system props: -Dtests.opensearch.secure=true -Dtests.opensearch.username=admin -Dtests.opensearch.password=admin

@cwperks cwperks closed this Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure all plugins in the default distribution have a PR check to run integ tests w/ security

3 participants