From 7f0c7da37fe52882f4199ebf39146bf6eb52a5db Mon Sep 17 00:00:00 2001 From: Thibault Junin Date: Thu, 13 Mar 2025 17:04:44 +0100 Subject: [PATCH] Fix `FindViableNodeService` to actually filter `Tags` (#1080) * fix viable node service to take into account tags * Update app/Services/Deployment/FindViableNodesService.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --------- Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> --- app/Services/Deployment/FindViableNodesService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Deployment/FindViableNodesService.php b/app/Services/Deployment/FindViableNodesService.php index 113c2a2a3..55d074902 100644 --- a/app/Services/Deployment/FindViableNodesService.php +++ b/app/Services/Deployment/FindViableNodesService.php @@ -29,7 +29,7 @@ class FindViableNodesService ->get(); return $nodes - ->filter(fn (Node $node) => !$tags || collect($node->tags)->intersect($tags)) + ->filter(fn (Node $node) => !$tags || collect($node->tags)->intersect($tags)->isNotEmpty()) ->filter(fn (Node $node) => $node->isViable($memory, $disk, $cpu)); } }