diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts index 7431802..4348e5b 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/tagsWorkerType/1.0.0/index.ts @@ -109,22 +109,26 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => { let isSubset = true; - for (let i = 0; i < currentTags.length; i += 1) { - if (!requiredTags.includes(currentTags[i])) { + for (let i = 0; i < requiredTags.length; i += 1) { + if (!currentTags.includes(requiredTags[i])) { isSubset = false; break; } } + // requiredTags needs to be subset of currentTags + args.jobLog(`Current tags: ${currentTags}`); + args.jobLog(`Required tags: ${requiredTags}`); + args.jobLog(`Is Subset: ${isSubset}`); if (isSubset) { // eslint-disable-next-line no-param-reassign args.variables.queueTags = ''; - args.jobLog('Worker type and tags are subset of required tags'); + args.jobLog('Required tags are subset of current tags, continuing to next plugin.'); } else { + args.jobLog('Required tags are not subset of current tags, requeueing.'); // eslint-disable-next-line no-param-reassign args.variables.queueTags = requiredTags.join(','); - args.jobLog('Worker type and tags are not subset of required tags,' - + ` requeueing with tags ${args.variables.queueTags}`); + args.jobLog(`Requeueing with tags ${args.variables.queueTags}`); } return {