From dd4ae3a5ad709319bdf0e59851a2b61319beac7f Mon Sep 17 00:00:00 2001 From: Johnathan Kupferer Date: Thu, 26 Sep 2024 16:23:33 -0400 Subject: [PATCH] Add wait for workshop id assignment --- workshop-manager/operator/workshopprovision.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workshop-manager/operator/workshopprovision.py b/workshop-manager/operator/workshopprovision.py index 0a2f294e..fbdae799 100644 --- a/workshop-manager/operator/workshopprovision.py +++ b/workshop-manager/operator/workshopprovision.py @@ -246,6 +246,10 @@ async def manage(self, logger): raise kopf.TemporaryError("Workshop {self.workshop_name} was not found.", delay=60) raise + if not workshop.workshop_id: + logger.info(f"Waiting for workshop id assignment for {workshop}") + return + async with self.lock: await self.manage_action_schedule_and_lifespan(logger=logger, workshop=workshop) await self.manage_resource_claims(logger=logger, workshop=workshop)