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>
This commit is contained in:
Thibault Junin
2025-03-13 17:04:44 +01:00
committed by GitHub
parent e93d122a27
commit 7f0c7da37f

View File

@ -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));
}
}