Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster setting to control ppl execution #344

Merged
merged 5 commits into from
Jul 10, 2024

Conversation

zane-neo
Copy link
Collaborator

@zane-neo zane-neo commented Jul 3, 2024

Description

Add cluster setting to control ppl execution

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

@xinyual
Copy link
Collaborator

xinyual commented Jul 3, 2024

We already have a Tool level execution controller, why we need a cluster level one? Is this for OASIS?

@zane-neo
Copy link
Collaborator Author

zane-neo commented Jul 3, 2024

We already have a Tool level execution controller, why we need a cluster level one? Is this for OASIS?

Yes, in serverless currently the ppl execution will be disabled by default.

@@ -227,7 +226,7 @@ public <T> void run(Map<String, String> parameters, ActionListener<T> listener)
return;
}
String ppl = parseOutput(dataAsMap.get("response"), indexName);
if (!this.execute) {
if (!clusterSettingHelper.getClusterSettings(SkillSettings.PPL_EXECUTION_ENABLED) || !this.execute) {
Map<String, String> ret = ImmutableMap.of("ppl", ppl);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a log here when cluster setting and tool setting are conflict? For example, "To execute PPL, please set lugins.skills.ppl_execution_enabled to true". It may be confused if customer set tool setting to true but it is not executed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will add debug log here.

@zane-neo zane-neo merged commit 14d9ef2 into opensearch-project:main Jul 10, 2024
8 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 17, 2024
* Add cluster setting to control ppl execution

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Add debug log to indicate the ppl execution settings

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit 14d9ef2)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
zane-neo pushed a commit that referenced this pull request Jul 17, 2024
* Add cluster setting to control ppl execution



* format code



* format code



* Add debug log to indicate the ppl execution settings



* format code



---------


(cherry picked from commit 14d9ef2)

Signed-off-by: zane-neo <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants