From 66bf8795a8274a4309c8e061c79db9290058402a Mon Sep 17 00:00:00 2001 From: Daniel Widdis Date: Sat, 4 May 2024 09:46:45 -0700 Subject: [PATCH 1/2] Add user mapping to Workflow State index Signed-off-by: Daniel Widdis --- CHANGELOG.md | 18 +-------- .../resources/mappings/workflow-state.json | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c31175f..465053a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,27 +12,13 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) ### Maintenance ### Refactoring -## [Unreleased 2.x](https://github.com/opensearch-project/flow-framework/compare/2.13...2.x) +## [Unreleased 2.x](https://github.com/opensearch-project/flow-framework/compare/2.14...2.x) ### Features ### Enhancements -- Add guardrails to default use case params ([#658](https://github.com/opensearch-project/flow-framework/pull/658)) -- Allow strings for boolean workflow step parameters ([#671](https://github.com/opensearch-project/flow-framework/pull/671)) -- Add optional delay parameter to no-op step ([#674](https://github.com/opensearch-project/flow-framework/pull/674)) -- Add model interface support for remote and local custom models ([#701](https://github.com/opensearch-project/flow-framework/pull/701)) - ### Bug Fixes -- Reset workflow state to initial state after successful deprovision ([#635](https://github.com/opensearch-project/flow-framework/pull/635)) -- Silently ignore content on APIs that don't require it ([#639](https://github.com/opensearch-project/flow-framework/pull/639)) -- Hide user and credential field from search response ([#680](https://github.com/opensearch-project/flow-framework/pull/680)) -- Throw the correct error message in status API for WorkflowSteps ([#676](https://github.com/opensearch-project/flow-framework/pull/676)) -- Delete workflow state when template is deleted and no resources exist ([#689](https://github.com/opensearch-project/flow-framework/pull/689)) -- Fixing model group parsing and restoring context ([#695] (https://github.com/opensearch-project/flow-framework/pull/695)) +- Add user mapping to Workflow State index ([#705](https://github.com/opensearch-project/flow-framework/pull/705)) ### Infrastructure -- Switch macos runner to macos-13 from macos-latest since macos-latest is now arm64 ([#686](https://github.com/opensearch-project/flow-framework/pull/686)) - ### Documentation ### Maintenance ### Refactoring -- Improve error messages for workflow states other than NOT_STARTED ([#642](https://github.com/opensearch-project/flow-framework/pull/642)) -- Create a Config XContent model for Config index ([#679](https://github.com/opensearch-project/flow-framework/pull/679)) diff --git a/src/main/resources/mappings/workflow-state.json b/src/main/resources/mappings/workflow-state.json index a42e3b749..6471e686a 100644 --- a/src/main/resources/mappings/workflow-state.json +++ b/src/main/resources/mappings/workflow-state.json @@ -30,6 +30,44 @@ "user_outputs": { "type": "object" }, + "user": { + "type": "nested", + "properties": { + "name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "backend_roles": { + "type" : "text", + "fields" : { + "keyword" : { + "type" : "keyword" + } + } + }, + "roles": { + "type" : "text", + "fields" : { + "keyword" : { + "type" : "keyword" + } + } + }, + "custom_attribute_names": { + "type" : "text", + "fields" : { + "keyword" : { + "type" : "keyword" + } + } + } + } + }, "resources_created": { "type": "nested", "properties": { From c66a1adc0614d5ea60c4926da0f088453a125bea Mon Sep 17 00:00:00 2001 From: Daniel Widdis Date: Tue, 7 May 2024 12:37:12 -0700 Subject: [PATCH 2/2] Increment schema version Signed-off-by: Daniel Widdis --- src/main/resources/mappings/workflow-state.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/mappings/workflow-state.json b/src/main/resources/mappings/workflow-state.json index 6471e686a..ecb635413 100644 --- a/src/main/resources/mappings/workflow-state.json +++ b/src/main/resources/mappings/workflow-state.json @@ -1,7 +1,7 @@ { "dynamic": false, "_meta": { - "schema_version": 2 + "schema_version": 3 }, "properties": { "schema_version": {