From 4408725b086301e8e65f7a2b61ac8e77ab9a9f3d Mon Sep 17 00:00:00 2001 From: "A. F. Dudley" Date: Mon, 2 Feb 2026 22:49:19 -0500 Subject: [PATCH] Fix repo root path calculation (4 parents from stack path) --- stack_orchestrator/deploy/deployment.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stack_orchestrator/deploy/deployment.py b/stack_orchestrator/deploy/deployment.py index 54f8377a..b76e6486 100644 --- a/stack_orchestrator/deploy/deployment.py +++ b/stack_orchestrator/deploy/deployment.py @@ -322,13 +322,14 @@ def restart(ctx, stack_path, spec_file, config_file, force, expected_ip): # Determine spec file location # Priority: --spec-file argument > repo's deployment/spec.yml > deployment dir + # Stack path is like: repo/stack_orchestrator/data/stacks/stack-name + # So repo root is 4 parents up + repo_root = stack_source.parent.parent.parent.parent if spec_file: # Spec file relative to repo root - repo_root = stack_source.parent.parent.parent # Go up from stack path spec_file_path = repo_root / spec_file else: # Try standard GitOps location in repo - repo_root = stack_source.parent.parent.parent gitops_spec = repo_root / "deployment" / "spec.yml" if gitops_spec.exists(): spec_file_path = gitops_spec