From c03fe0af38c31278f595cb25b85a0ffc64e1c0fc Mon Sep 17 00:00:00 2001 From: Charlie Kolb Date: Tue, 7 Jan 2025 15:57:03 +0100 Subject: [PATCH] feat(Execute Workflow Node): Remove ignoreTypeMismatch option (no-changelog) (#12482) --- cypress/fixtures/Test_Subworkflow-Inputs.json | 1 - .../utils/validateValueAgainstSchema.ts | 6 +----- .../ResourceMapper/ResourceMapper.vue | 18 ------------------ .../editor-ui/src/plugins/i18n/locales/en.json | 2 -- packages/workflow/src/Interfaces.ts | 1 - 5 files changed, 1 insertion(+), 27 deletions(-) diff --git a/cypress/fixtures/Test_Subworkflow-Inputs.json b/cypress/fixtures/Test_Subworkflow-Inputs.json index aeb4d601fd..ee2b34513e 100644 --- a/cypress/fixtures/Test_Subworkflow-Inputs.json +++ b/cypress/fixtures/Test_Subworkflow-Inputs.json @@ -19,7 +19,6 @@ "value": {}, "matchingColumns": [], "schema": [], - "ignoreTypeMismatchErrors": false, "attemptToConvertTypes": false, "convertFieldsToString": true }, diff --git a/packages/core/src/node-execution-context/utils/validateValueAgainstSchema.ts b/packages/core/src/node-execution-context/utils/validateValueAgainstSchema.ts index adac8c3a78..d058c50a52 100644 --- a/packages/core/src/node-execution-context/utils/validateValueAgainstSchema.ts +++ b/packages/core/src/node-execution-context/utils/validateValueAgainstSchema.ts @@ -61,11 +61,7 @@ const validateResourceMapperValue = ( }); if (!validationResult.valid) { - if (!resourceMapperField.ignoreTypeMismatchErrors) { - return { ...validationResult, fieldName: key }; - } else { - paramValues[key] = resolvedValue; - } + return { ...validationResult, fieldName: key }; } else { // If it's valid, set the casted value paramValues[key] = validationResult.newValue; diff --git a/packages/editor-ui/src/components/ResourceMapper/ResourceMapper.vue b/packages/editor-ui/src/components/ResourceMapper/ResourceMapper.vue index 9e4459a8f0..c4ef8d8161 100644 --- a/packages/editor-ui/src/components/ResourceMapper/ResourceMapper.vue +++ b/packages/editor-ui/src/components/ResourceMapper/ResourceMapper.vue @@ -63,7 +63,6 @@ const state = reactive({ value: {}, matchingColumns: [] as string[], schema: [] as ResourceMapperField[], - ignoreTypeMismatchErrors: false, attemptToConvertTypes: false, // This should always be true if `showTypeConversionOptions` is provided // It's used to avoid accepting any value as string without casting it @@ -664,23 +663,6 @@ defineExpose({ } " /> - diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index ace6ef4c98..017390398e 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -1600,8 +1600,6 @@ "resourceMapper.staleDataWarning.notice": "Refresh to see the updated fields", "resourceMapper.attemptToConvertTypes.displayName": "Attempt to convert types", "resourceMapper.attemptToConvertTypes.description": "Attempt to convert types when mapping fields", - "resourceMapper.ignoreTypeMismatchErrors.displayName": "Ignore type mismatch errors", - "resourceMapper.ignoreTypeMismatchErrors.description": "Whether type mismatches should be ignored, rather than returning an Error", "runData.openSubExecution": "Inspect Sub-Execution {id}", "runData.openParentExecution": "Inspect Parent Execution {id}", "runData.emptyItemHint": "This is an item, but it's empty.", diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index f6dfb3b977..0a94261cf8 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -2710,7 +2710,6 @@ export type ResourceMapperValue = { value: { [key: string]: string | number | boolean | null } | null; matchingColumns: string[]; schema: ResourceMapperField[]; - ignoreTypeMismatchErrors: boolean; attemptToConvertTypes: boolean; convertFieldsToString: boolean; };