Skip to content

Commit

Permalink
Enable Flow Framework by default (#553)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <widdis@gmail.com>
dbwiddis authored Mar 8, 2024
1 parent 9c49561 commit e9686f7
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
### Enhancements
- Substitute REST path or body parameters in Workflow Steps ([#525](https://github.com/opensearch-project/flow-framework/pull/525))
- Added an optional workflow_step param to the get workflow steps API ([#538](https://github.com/opensearch-project/flow-framework/pull/538))
- Enable Flow Framework by default ([#553](https://github.com/opensearch-project/flow-framework/pull/553))

### Enhancements
### Bug Fixes
### Infrastructure
### Documentation
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ public class FlowFrameworkSettings {
/** This setting enables/disables the Flow Framework REST API */
public static final Setting<Boolean> FLOW_FRAMEWORK_ENABLED = Setting.boolSetting(
"plugins.flow_framework.enabled",
false,
true,
Setting.Property.NodeScope,
Setting.Property.Dynamic
);
Original file line number Diff line number Diff line change
@@ -76,19 +76,8 @@ public abstract class FlowFrameworkRestTestCase extends OpenSearchRestTestCase {
@Before
protected void setUpSettings() throws Exception {

// Enable Flow Framework Plugin Rest APIs
Response response = TestHelpers.makeRequest(
client(),
"PUT",
"_cluster/settings",
null,
"{\"transient\":{\"plugins.flow_framework.enabled\":true}}",
List.of(new BasicHeader(HttpHeaders.USER_AGENT, ""))
);
assertEquals(200, response.getStatusLine().getStatusCode());

// Enable ML Commons to run on non-ml nodes
response = TestHelpers.makeRequest(
Response response = TestHelpers.makeRequest(
client(),
"PUT",
"_cluster/settings",
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public void tearDown() throws Exception {
}

public void testSettings() throws IOException {
assertFalse(flowFrameworkSettings.isFlowFrameworkEnabled());
assertTrue(flowFrameworkSettings.isFlowFrameworkEnabled());
assertEquals(Optional.of(TimeValue.timeValueSeconds(5)), Optional.ofNullable(flowFrameworkSettings.getRetryDuration()));
assertEquals(Optional.of(50), Optional.ofNullable(flowFrameworkSettings.getMaxWorkflowSteps()));
assertEquals(Optional.of(1000), Optional.ofNullable(flowFrameworkSettings.getMaxWorkflows()));

0 comments on commit e9686f7

Please sign in to comment.