Skip to content

Commit 989a632

Browse files
fix: Support multiple sequencers: Fix service name for builders [26/N] (#317)
**Description** EL/CL builders had colliding names with their El/CL nodes. On top of that `_` is not allowed for service names so `cl_builder` became `clbuilder` and `el_builder` became `elbuilder`
1 parent 0e7fd19 commit 989a632

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/l2/participant/cl/input_parser.star

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def parse(args, participant_name, network_params, registry):
3030

3131

3232
def parse_builder(args, participant_name, network_params, registry):
33-
return _parse(args, participant_name, network_params, registry, "cl_builder")
33+
return _parse(args, participant_name, network_params, registry, "clbuilder")
3434

3535

3636
def _parse(args, participant_name, network_params, registry, cl_kind):
@@ -60,8 +60,8 @@ def _parse(args, participant_name, network_params, registry, cl_kind):
6060
)
6161

6262
cl_params["name"] = participant_name
63-
cl_params["service_name"] = "op-cl-{}-{}-{}".format(
64-
network_id, participant_name, cl_params["type"]
63+
cl_params["service_name"] = "op-{}-{}-{}-{}".format(
64+
cl_kind, network_id, participant_name, cl_params["type"]
6565
)
6666

6767
# Draft of what the labels could look like

src/l2/participant/el/input_parser.star

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def parse_builder(el_args, participant_name, network_params, registry):
4949
participant_name=participant_name,
5050
network_params=network_params,
5151
registry=registry,
52-
el_kind="el_builder",
52+
el_kind="elbuilder",
5353
)
5454

5555

@@ -80,8 +80,8 @@ def _parse(el_args, default_args, participant_name, network_params, registry, el
8080
)
8181

8282
el_params["name"] = participant_name
83-
el_params["service_name"] = "op-el-{}-{}-{}".format(
84-
network_id, participant_name, el_params["type"]
83+
el_params["service_name"] = "op-{}-{}-{}-{}".format(
84+
el_kind, network_id, participant_name, el_params["type"]
8585
)
8686

8787
# Draft of what the labels could look like

test/l2/participant/el/launcher_test.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def test_l2_participant_el_launcher_op_rbuilder(plan):
454454
expect.eq(
455455
service_config.labels,
456456
{
457-
"op.kind": "el_builder",
457+
"op.kind": "elbuilder",
458458
"op.network.id": "2151908",
459459
"op.network.participant.name": "node0",
460460
"op.el.type": "op-rbuilder",

test/l2/participant/input_parser_test.star

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def test_l2_participant_input_parser_defaults(plan):
8888
name="node0",
8989
type="op-node",
9090
image="us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.3",
91-
service_name="op-cl-1000-node0-op-node",
91+
service_name="op-clbuilder-1000-node0-op-node",
9292
labels={
93-
"op.kind": "cl_builder",
93+
"op.kind": "clbuilder",
9494
"op.network.id": "1000",
9595
"op.network.participant.name": "node0",
9696
"op.cl.type": "op-node",
@@ -130,9 +130,9 @@ def test_l2_participant_input_parser_defaults(plan):
130130
name="node0",
131131
type="op-geth",
132132
image="us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest",
133-
service_name="op-el-1000-node0-op-geth",
133+
service_name="op-elbuilder-1000-node0-op-geth",
134134
labels={
135-
"op.kind": "el_builder",
135+
"op.kind": "elbuilder",
136136
"op.network.id": "1000",
137137
"op.network.participant.name": "node0",
138138
"op.el.type": "op-geth",
@@ -194,9 +194,9 @@ def test_l2_participant_input_parser_defaults(plan):
194194
name="node1",
195195
type="op-node",
196196
image="us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.3",
197-
service_name="op-cl-1000-node1-op-node",
197+
service_name="op-clbuilder-1000-node1-op-node",
198198
labels={
199-
"op.kind": "cl_builder",
199+
"op.kind": "clbuilder",
200200
"op.network.id": "1000",
201201
"op.network.participant.name": "node1",
202202
"op.cl.type": "op-node",
@@ -236,9 +236,9 @@ def test_l2_participant_input_parser_defaults(plan):
236236
name="node1",
237237
type="op-geth",
238238
image="us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest",
239-
service_name="op-el-1000-node1-op-geth",
239+
service_name="op-elbuilder-1000-node1-op-geth",
240240
labels={
241-
"op.kind": "el_builder",
241+
"op.kind": "elbuilder",
242242
"op.network.id": "1000",
243243
"op.network.participant.name": "node1",
244244
"op.el.type": "op-geth",

0 commit comments

Comments
 (0)