From 478c53058e348ab858a721f8d5cd7d4bef4a9e67 Mon Sep 17 00:00:00 2001 From: Rick van de Loo Date: Wed, 24 Dec 2025 10:00:57 +0100 Subject: [PATCH 1/2] for more robust waitForAvailability see https://github.com/ByteInternet/hypernode-deploy/pull/184 --- src/BrancherServer.php | 20 ++++++++++++++++++++ src/Server.php | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/BrancherServer.php b/src/BrancherServer.php index 87171a8..0cc79bf 100644 --- a/src/BrancherServer.php +++ b/src/BrancherServer.php @@ -35,4 +35,24 @@ public function setSettings(array $settings): self $this->setOption(self::OPTION_HN_BRANCHER_SETTINGS, $settings); return $this; } + + /** + * @param int $count Number of consecutive successful reachability checks required + * @return $this + */ + public function setBrancherReachabilityCheckCount(int $count): self + { + $this->setOption(self::OPTION_HN_BRANCHER_REACHABILITY_CHECK_COUNT, $count); + return $this; + } + + /** + * @param int $seconds Seconds between reachability checks + * @return $this + */ + public function setBrancherReachabilityCheckInterval(int $seconds): self + { + $this->setOption(self::OPTION_HN_BRANCHER_REACHABILITY_CHECK_INTERVAL, $seconds); + return $this; + } } diff --git a/src/Server.php b/src/Server.php index c7329bc..3b38bd4 100644 --- a/src/Server.php +++ b/src/Server.php @@ -10,6 +10,8 @@ class Server public const OPTION_HN_BRANCHER = 'hn_brancher'; public const OPTION_HN_BRANCHER_LABELS = 'hn_brancher_labels'; public const OPTION_HN_BRANCHER_SETTINGS = 'hn_brancher_settings'; + public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_COUNT = 'hn_brancher_reachability_check_count'; + public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_INTERVAL = 'hn_brancher_reachability_check_interval'; public const OPTION_HN_PARENT_APP = 'hn_parent_app'; /** From c6e320b22afdecbaaf4168748a9c5b532edabb57 Mon Sep 17 00:00:00 2001 From: Rick van de Loo Date: Wed, 24 Dec 2025 10:21:25 +0100 Subject: [PATCH 2/2] add hn_brancher_timeout as well --- src/BrancherServer.php | 10 ++++++++++ src/Server.php | 1 + 2 files changed, 11 insertions(+) diff --git a/src/BrancherServer.php b/src/BrancherServer.php index 0cc79bf..c877a6a 100644 --- a/src/BrancherServer.php +++ b/src/BrancherServer.php @@ -36,6 +36,16 @@ public function setSettings(array $settings): self return $this; } + /** + * @param int $timeout Maximum time in seconds to wait for brancher availability + * @return $this + */ + public function setBrancherTimeout(int $timeout): self + { + $this->setOption(self::OPTION_HN_BRANCHER_TIMEOUT, $timeout); + return $this; + } + /** * @param int $count Number of consecutive successful reachability checks required * @return $this diff --git a/src/Server.php b/src/Server.php index 3b38bd4..66c94cb 100644 --- a/src/Server.php +++ b/src/Server.php @@ -10,6 +10,7 @@ class Server public const OPTION_HN_BRANCHER = 'hn_brancher'; public const OPTION_HN_BRANCHER_LABELS = 'hn_brancher_labels'; public const OPTION_HN_BRANCHER_SETTINGS = 'hn_brancher_settings'; + public const OPTION_HN_BRANCHER_TIMEOUT = 'hn_brancher_timeout'; public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_COUNT = 'hn_brancher_reachability_check_count'; public const OPTION_HN_BRANCHER_REACHABILITY_CHECK_INTERVAL = 'hn_brancher_reachability_check_interval'; public const OPTION_HN_PARENT_APP = 'hn_parent_app';