Skip to content

Commit

Permalink
Merge pull request #429 from 0xPolygon/bridge_ui_port_wait
Browse files Browse the repository at this point in the history
Bridge UI port wait + Bridge UI optional
  • Loading branch information
xavier-romero authored Dec 23, 2024
2 parents 37e2830 + 1af8aa6 commit 97dbb4e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
21 changes: 11 additions & 10 deletions cdk_bridge_infra.star
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ zkevm_bridge_package = import_module("./lib/zkevm_bridge.star")
databases = import_module("./databases.star")


def run(plan, args, contract_setup_addresses):
def run(plan, args, contract_setup_addresses, deploy_bridge_ui=True):
db_configs = databases.get_db_configs(
args["deployment_suffix"], args["sequencer_type"]
)
Expand All @@ -24,16 +24,17 @@ def run(plan, args, contract_setup_addresses):
config=bridge_service_config,
)

# Start the bridge UI.
bridge_ui_config_artifact = create_bridge_ui_config_artifact(
plan, args, contract_setup_addresses
)
zkevm_bridge_package.start_bridge_ui(plan, args, bridge_ui_config_artifact)
if deploy_bridge_ui:
# Start the bridge UI.
bridge_ui_config_artifact = create_bridge_ui_config_artifact(
plan, args, contract_setup_addresses
)
zkevm_bridge_package.start_bridge_ui(plan, args, bridge_ui_config_artifact)

# Start the bridge UI reverse proxy. This is only relevant / needed if we have a fake l1
if args["use_local_l1"]:
proxy_config_artifact = create_reverse_proxy_config_artifact(plan, args)
zkevm_bridge_package.start_reverse_proxy(plan, args, proxy_config_artifact)
# Start the bridge UI reverse proxy. This is only relevant / needed if we have a fake l1
if args["use_local_l1"]:
proxy_config_artifact = create_reverse_proxy_config_artifact(plan, args)
zkevm_bridge_package.start_reverse_proxy(plan, args, proxy_config_artifact)


def create_bridge_config_artifact(plan, args, contract_setup_addresses, db_configs):
Expand Down
2 changes: 2 additions & 0 deletions input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ DEFAULT_DEPLOYMENT_STAGES = {
"deploy_cdk_central_environment": True,
# Deploy CDK bridge infrastructure.
"deploy_cdk_bridge_infra": True,
# Deploy CDK bridge UI.
"deploy_cdk_bridge_ui": True,
# Deploy the agglayer.
"deploy_agglayer": True,
# Deploy cdk-erigon node.
Expand Down
4 changes: 3 additions & 1 deletion lib/zkevm_bridge.star
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def start_bridge_ui(plan, args, config_artifact):

def get_bridge_ui_ports(args):
ports = {
"web-ui": PortSpec(args["zkevm_bridge_ui_port"], application_protocol="http")
"web-ui": PortSpec(
args["zkevm_bridge_ui_port"], application_protocol="http", wait="1m"
)
}
public_ports = ports_package.get_public_ports(
ports, "zkevm_bridge_ui_start_port", args
Expand Down
1 change: 1 addition & 0 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def run(plan, args={}):
plan,
args | {"use_local_l1": deployment_stages.get("deploy_l1", False)},
contract_setup_addresses,
deployment_stages.get("deploy_cdk_bridge_ui", True),
)
else:
plan.print("Skipping the deployment of cdk/bridge infrastructure")
Expand Down

0 comments on commit 97dbb4e

Please sign in to comment.