From f81cccb7511f068bb5ce43c63d3b52091f88c04a Mon Sep 17 00:00:00 2001 From: Federico Mastellone Date: Sun, 1 Oct 2023 02:33:04 +0000 Subject: [PATCH] workbench: fix bug that deployed topology files randomly --- nix/workbench/topology/topology.jq | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/workbench/topology/topology.jq b/nix/workbench/topology/topology.jq index 608956fe391..8d69eac7b81 100644 --- a/nix/workbench/topology/topology.jq +++ b/nix/workbench/topology/topology.jq @@ -1,6 +1,7 @@ def loopback_node_topology_from_nixops_topology($topo; $i): - $topo.coreNodes[$i].producers as $producers - | ($producers | map(ltrimstr("node-") | fromjson)) as $prod_indices + # DON'T ASSUME NODES ARE ORDERED INSIDE THE GLOBAL TOPOLOGY FILE!!!!!!!!!!!! + ($topo.coreNodes | map(select(.nodeId == $i)) | .[0] | .producers) as $producers + | ($producers | map(ltrimstr("node-") | fromjson)) as $prod_indices | { Producers: ( $prod_indices | map