opensearch-sdk-java icon indicating copy to clipboard operation
opensearch-sdk-java copied to clipboard

OpenSearch does not pickup extensions feature flag when enabled via `run.gradle` file

Open DarshitChanpura opened this issue 2 years ago • 3 comments

Note: Unsure if this should be part of OpenSearch repo

Following the Dev guide, when I tried to run OpenSearch ./bin/opensearch with extensions enabled via "run.gradle," OpenSearch didn't pick up on this setting, so the experimental feature flag wasn't turned on.

I was able to work around this by passing the feature flag as command line argument. See below

./bin/opensearch -E opensearch.experimental.feature.extensions.enabled=true

For running via gradle

 ./gradlew run -Dopensearch.experimental.feature.extensions.enabled=true

Expected behaviour

While bootstrapping, Opensearch should pickup the feature flag from the updated run.gradle.


OpenSearch: 3.0.0-SNAPSHOT OS: Mac Arch: aarch64 M1

DarshitChanpura avatar Apr 06 '23 20:04 DarshitChanpura

when I tried to run OpenSearch with extensions enabled via "run.gradle," OpenSearch didn't pick up on this setting

Could you be more specific on what changes you made in run.gradle and how you were running OpenSearch? It may just be unclear documentation.

dbwiddis avatar Apr 07 '23 05:04 dbwiddis

Could you be more specific on what changes you made in run.gradle and how you were running OpenSearch? It may just be unclear documentation.

Yes I modified run.gradle to add the feature flag.

Before After
testClusters {
  runTask {
    testDistribution = 'archive'
    if (numZones > 1) numberOfZones = numZones
    if (numNodes > 1) numberOfNodes = numNodes
  }
}
testClusters {
  runTask {
    testDistribution = 'archive'
    if (numZones > 1) numberOfZones = numZones
    if (numNodes > 1) numberOfNodes = numNodes
    systemProperty 'opensearch.experimental.feature.extensions.enabled', 'true'
  }
}

I assembled and ran OpenSearch at-least 5 times but the feature flag was not picked up

DarshitChanpura avatar Apr 07 '23 17:04 DarshitChanpura

Steps I followed:

  1. Modify run.gradle and assemble OS local distribution
  2. Copy that distribution to another location
  3. cd to that location/opensearch-3.0.0-SNAPSHOT
  4. run using ./bin/opensearch

This didn't work for me.

However, when I modify gradle/run.gradle and run using ./gradlew run the feature flag is picked up.

The steps in the dev-guide section that mentions To run OpenSearch from a compiled binary: didn't work for me without passing the feature-flag as command-line arg.

DarshitChanpura avatar Apr 07 '23 17:04 DarshitChanpura