opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.65k stars 1.78k forks source link

[Feature Request] Add ./gradlew :plugins:xyz:run #11839

Open dblock opened 9 months ago

dblock commented 9 months ago

Is your feature request related to a problem? Please describe

Developers want an easy way to run a plugin during development.

Describe the solution you'd like

In https://github.com/opensearch-project/OpenSearch/pull/11844 we've added the ability to do ./gradlew run -PinstalledPlugins="['plugin1', 'plugin2']". For one plugin this is a bit of a convoluted syntax (the name can't be plugins), so I'd like to be able to do ./gradlew :plugins:xyz:run when developing an xyz plugin in the plugins folder which should end up doing what ./gradlew run -PinstalledPlugins="['xyz']" does.

Related component

Build

Describe alternatives you've considered

Currently you can modify gradle/run.gradle as follows.

testClusters {
  runTask {
    testDistribution = 'archive'
    if (numZones > 1) numberOfZones = numZones
    if (numNodes > 1) numberOfNodes = numNodes
    // add plugin(s) to load in ./gradlew run
    plugin(':plugins:xyz') // <-------- add this to load xyz plugin
  }
}

Additional context

Some people might want to load more than one plugin via command line.

reta commented 9 months ago

@dblock do you think this is related? https://github.com/opensearch-project/OpenSearch/issues/6285

dblock commented 9 months ago

It's the same intent but a different syntax.