From 935ee3735d5bb693797f225d8ebcee8cd2e14700 Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:46:07 +0100 Subject: [PATCH 1/2] Trim and filter tags --- .../tools/tagsWorkerType/1.0.0/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts index 3e0acef95..793eaebf7 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts @@ -84,7 +84,7 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { requiredTags.push(`require${requiredWorkerType}`); if (requiredNodeTags) { - requiredTags = requiredTags.concat(requiredNodeTags.split(',').map((tag) => tag.trim())); + requiredTags = requiredTags.concat(requiredNodeTags.split(',')); } const currentWorkerType = args.workerType; @@ -102,9 +102,12 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { } if (args.nodeTags) { - currentTags = currentTags.concat(args.nodeTags.split(',').map((tag) => tag.trim())); + currentTags = currentTags.concat(args.nodeTags.split(',')); } + requiredTags = requiredTags.map((tag) => tag.trim()).filter((tag) => tag !== ''); + currentTags = currentTags.map((tag) => tag.trim()).filter((tag) => tag !== ''); + args.jobLog(`Required Tags: ${requiredTags.join(',')}`); args.jobLog(`Current Tags: ${currentTags.join(',')}`); From b6a2df1749e3b394739154a43ce61b51bcf4eb8b Mon Sep 17 00:00:00 2001 From: HaveAGitGat Date: Mon, 10 Jun 2024 12:49:38 +0000 Subject: [PATCH 2/2] Apply auto-build changes --- .../tools/tagsWorkerType/1.0.0/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FlowPlugins/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.js index 247b8de0d..2006d1b1b 100644 --- a/FlowPlugins/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.js +++ b/FlowPlugins/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.js @@ -68,7 +68,7 @@ var plugin = function (args) { var currentTags = []; requiredTags.push("require".concat(requiredWorkerType)); if (requiredNodeTags) { - requiredTags = requiredTags.concat(requiredNodeTags.split(',').map(function (tag) { return tag.trim(); })); + requiredTags = requiredTags.concat(requiredNodeTags.split(',')); } var currentWorkerType = args.workerType; if (requiredWorkerType === 'CPUorGPU') { @@ -86,8 +86,10 @@ var plugin = function (args) { } } if (args.nodeTags) { - currentTags = currentTags.concat(args.nodeTags.split(',').map(function (tag) { return tag.trim(); })); + currentTags = currentTags.concat(args.nodeTags.split(',')); } + requiredTags = requiredTags.map(function (tag) { return tag.trim(); }).filter(function (tag) { return tag !== ''; }); + currentTags = currentTags.map(function (tag) { return tag.trim(); }).filter(function (tag) { return tag !== ''; }); args.jobLog("Required Tags: ".concat(requiredTags.join(','))); args.jobLog("Current Tags: ".concat(currentTags.join(','))); var isSubset = true;