Commit 57a6a2de authored by Victor Colombo's avatar Victor Colombo

Rename

parent 3e76bedb
# this is a dictionary as this will get serialzed to JSON def wait_for_healthy(service_id, port_id):
def wait(service_id, port_id):
recipe = struct( recipe = struct(
service_id = service_id, service_id = service_id,
method= "GET", method= "GET",
...@@ -7,4 +6,4 @@ def wait(service_id, port_id): ...@@ -7,4 +6,4 @@ def wait(service_id, port_id):
content_type = "application/json", content_type = "application/json",
port_id = port_id port_id = port_id
) )
return wait(recipe, "code", "IN", [200, 206, 503]) return wait(recipe, "code", "IN", [200, 206, 503])
\ No newline at end of file
...@@ -3,6 +3,7 @@ parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_i ...@@ -3,6 +3,7 @@ parse_input = import_module("github.com/kurtosis-tech/eth2-package/src/package_i
cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_client_context.star") cl_client_context = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star") cl_node_metrics = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_metrics_info.star")
mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star") mev_boost_context_module = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/mev_boost/mev_boost_context.star")
cl_node_health_checker = import_module("github.com/kurtosis-tech/eth2-package/src/participant_network/cl/cl_node_health_checker.star")
package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star") package_io = import_module("github.com/kurtosis-tech/eth2-package/src/package_io/constants.star")
...@@ -64,9 +65,6 @@ LIGHTHOUSE_LOG_LEVELS = { ...@@ -64,9 +65,6 @@ LIGHTHOUSE_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace", package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "trace",
} }
BEACON_ENR_FACT_NAME = "beacon-enr-fact"
BEACON_HEALTH_FACT_NAME = "beacon-health-fact"
def launch( def launch(
launcher, launcher,
service_id, service_id,
...@@ -98,15 +96,7 @@ def launch( ...@@ -98,15 +96,7 @@ def launch(
beacon_service = add_service(beacon_node_service_id, beacon_config) beacon_service = add_service(beacon_node_service_id, beacon_config)
# TODO check whether its 200, 206 or 503 like golang cl_node_health_checker.wait_for_healthy(beacon_node_service_id, BEACON_HTTP_PORT_ID)
health_recipe = struct(
service_id = beacon_node_service_id,
method= "GET",
endpoint = "/eth/v1/node/health",
content_type = "application/json",
port_id = BEACON_HTTP_PORT_ID,
)
wait(health_recipe, "code", "IN", [200, 206, 503])
beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID]
......
...@@ -83,7 +83,7 @@ def launch( ...@@ -83,7 +83,7 @@ def launch(
beacon_http_port = beacon_service.ports[HTTP_PORT_ID] beacon_http_port = beacon_service.ports[HTTP_PORT_ID]
cl_node_health_checker.wait(beacon_node_service_id, HTTP_PORT_ID) cl_node_health_checker.wait_for_healthy(beacon_node_service_id, HTTP_PORT_ID)
# Launch validator node # Launch validator node
......
...@@ -57,9 +57,6 @@ NIMBUS_LOG_LEVELS = { ...@@ -57,9 +57,6 @@ NIMBUS_LOG_LEVELS = {
package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE", package_io.GLOBAL_CLIENT_LOG_LEVEL.trace: "TRACE",
} }
ENR_FACT_NAME = "enr-fact"
HEALTH_FACT_NAME = "health-fact"
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
def launch( def launch(
...@@ -83,7 +80,7 @@ def launch( ...@@ -83,7 +80,7 @@ def launch(
nimbus_service = add_service(service_id, config) nimbus_service = add_service(service_id, config)
cl_node_health_checker.wait(service_id, HTTP_PORT_ID) cl_node_health_checker.wait_for_healthy(service_id, HTTP_PORT_ID)
cl_node_identity_recipe = struct( cl_node_identity_recipe = struct(
service_id = service_id, service_id = service_id,
......
...@@ -103,7 +103,7 @@ def launch( ...@@ -103,7 +103,7 @@ def launch(
beacon_service = add_service(beacon_node_service_id, beacon_config) beacon_service = add_service(beacon_node_service_id, beacon_config)
cl_node_health_checker.wait(beacon_node_service_id, HTTP_PORT_ID) cl_node_health_checker.wait_for_healthy(beacon_node_service_id, HTTP_PORT_ID)
beacon_http_port = beacon_service.ports[HTTP_PORT_ID] beacon_http_port = beacon_service.ports[HTTP_PORT_ID]
......
...@@ -87,7 +87,7 @@ def launch( ...@@ -87,7 +87,7 @@ def launch(
teku_service = add_service(service_id, config) teku_service = add_service(service_id, config)
cl_node_health_checker.wait(service_id, HTTP_PORT_ID) cl_node_health_checker.wait_for_healthy(service_id, HTTP_PORT_ID)
node_identity_recipe = struct( node_identity_recipe = struct(
service_id = service_id, service_id = service_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment