diff --git a/gitops_server/workers/deployer/deploy.py b/gitops_server/workers/deployer/deploy.py index 348d6c8..830b1e5 100644 --- a/gitops_server/workers/deployer/deploy.py +++ b/gitops_server/workers/deployer/deploy.py @@ -163,13 +163,12 @@ async def uninstall_app(self, app: App) -> UpdateAppResult: return update_result async def update_app_deployment(self, app: App) -> UpdateAppResult | None: - with tracer.start_as_current_span("update_app_deployment", attributes={"app": app.name}) as span: - app.set_value("deployment.labels.gitops/deploy_id", self.deploy_id) - app.set_value("deployment.labels.gitops/status", github.STATUSES.in_progress) - if github_deployment_url := app.values.get("github/deployment_url"): - app.set_value("deployment.annotations.github/deployment_url", github_deployment_url) - - async with self.semaphore: + app.set_value("deployment.labels.gitops/deploy_id", self.deploy_id) + app.set_value("deployment.labels.gitops/status", github.STATUSES.in_progress) + if github_deployment_url := app.values.get("github/deployment_url"): + app.set_value("deployment.annotations.github/deployment_url", github_deployment_url) + async with self.semaphore: + with tracer.start_as_current_span("update_app_deployment", attributes={"app": app.name}) as span: logger.info(f"Deploying app {app.name!r}.") from_timestamp = time.time() if app.chart.type == "git":