From a0499e81d693cb9ee4fa83644cad22c57b94b2a7 Mon Sep 17 00:00:00 2001 From: Georgiana Dolocan Date: Wed, 19 Jun 2024 14:54:36 +0300 Subject: [PATCH] Skip health checks for binderhubs --- deployer/commands/deployer.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/deployer/commands/deployer.py b/deployer/commands/deployer.py index e8c10cffee..59c55ffdd6 100644 --- a/deployer/commands/deployer.py +++ b/deployer/commands/deployer.py @@ -165,6 +165,28 @@ def run_hub_health_check( print_colour("ERROR: No hubs with this name found!") sys.exit(1) + # Skip the regular hub health check for hubs with binderhub ui that are also launching user servers + for values_file_name in hub.spec["helm_chart_values_files"]: + if not any( + substr in os.path.basename(values_file_name) + for substr in ["secret", "common"] + ): + values_file = config_file_path.parent.joinpath(values_file_name) + config = yaml.load(values_file) + binderhub_ui = ( + config.get("jupyterhub", {}) + .get("custom", {}) + .get("binderhubUI", {}) + .get("enabled") + ) + + if binderhub_ui: + print_colour( + f"Skipping hub health check for {hub.spec['name']} because it's a binderhub...", + "yellow", + ) + return + print_colour(f"Running hub health check for {hub.spec['name']}...") # Check if this hub has a domain override file. If yes, apply override.