fix(portal): Uniq nodes before counting (#9352)

While we shouldn't have any duplicates in this list, it would be a good
idea to unique the node names before counting just to be sure.
This commit is contained in:
Jamil
2025-06-01 18:00:30 -07:00
committed by GitHub
parent 37ae1a4e92
commit 6d4d3a34a0

View File

@@ -187,7 +187,9 @@ defmodule Domain.Cluster.GoogleComputeLabelsStrategy do
end
defp connected_node_count(nodes, target_app) do
Enum.count(nodes, fn node_name ->
nodes
|> Enum.uniq()
|> Enum.count(fn node_name ->
app =
node_name
|> Atom.to_string()