refactor handling of long libp2p branch name

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-08-08 15:20:38 +02:00
parent 5344827479
commit 8d5d8a3935
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 8 additions and 8 deletions

View File

@ -33,8 +33,10 @@ geth_expo_cont_port: 9400
# Nimbus Beacon Node
beacon_node_network: 'mainnet'
# TODO This is to avoid too long service names.
beacon_node_repo_branch: '{{ (node.branch == "libp2p") | ternary("nim-libp2p-auto-bump-unstable", node.branch) }}'
beacon_node_repo_branch: '{{ node_name_to_branch_map.get(node.branch, node.branch) }}'
# We map short names to branches to avoid too long service names.
node_name_to_branch_map:
libp2p: 'nim-libp2p-auto-bump-unstable'
# TODO Drop this once all nodes have an number.
service_number: '{{ node.get("num", False) | ternary(("-%02d"|format(node.get("num", 0))), "") }}'
beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.branch | mandatory }}{{ service_number }}'

View File

@ -61,12 +61,10 @@ erigon_authrpc_jwtsecret: '{{lookup("bitwarden", "nimbus/jwt-token")}}'
beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.branch }}'
beacon_node_network: 'prater'
beacon_node_era_dir_path: '{{ nimbus_era_files_timer_path }}'
# TODO This is to avoid too long service names.
beacon_node_repo_branch: >-
{{ node.branch_override is defined | ternary(
node.branch_override,
((node.branch == "libp2p") | ternary("nim-libp2p-auto-bump-unstable", node.branch))
) }}
beacon_node_repo_branch: '{{ node_name_to_branch_map.get(node.branch, node.branch) }}'
# We map short names to branches to avoid too long service names.
node_name_to_branch_map:
libp2p: 'nim-libp2p-auto-bump-unstable'
# Ports
beacon_node_discovery_port: '{{ 9000 + idx }}'
beacon_node_listening_port: '{{ 9000 + idx }}'