opensearch-project / opensearch-project/OpenSearch

Allow External Plugins to use StandaloneRestTestPlugin gradle plugin

Open
#2,811 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Plugins
Dominant language
Java
Stars
13.7k
Forks
3k
Avg merge
2d 23h
Merged PRs (30d)
108

Description

Is your feature request related to a problem? Please describe.
For the k-NN plugin, I wanted to clean up our build.gradle a little bit and pull BWC tests out into a separate subproject. For this, I would like to apply the StandaloneRestTestPlugin or StandaloneTestPlugin as is done for OpenSearch.

However, I am unable to apply the plugin because it adds a project dependency on test-framework, which external plugins do not have access to.

I am wondering if it is possible to modify this so that external plugins can use this gradle plugin? External plugins are able to add dependencies like this:

testImplementation "org.opensearch.test:framework:${opensearch_version}"

Describe the solution you'd like
StandaloneRestTestPlugin can be applied to external plugin build scripts.

Describe alternatives you've considered
Currently, in https://github.com/opensearch-project/k-NN/pull/359, I apply the opensearch build plugin and disable several tasks it adds.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with buildSrc/main/groovy/org/opensearch/gradle/test/StandaloneRestTestPlugin.groovy, especially the project dependency described in the issue, and compare its use in qa/full-cluster-restart/build.gradle. Check how an external plugin declares test-framework with testImplementation; done means an external plugin can apply StandaloneRestTestPlugin or StandaloneTestPlugin without lacking that dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.