From 2245e347c9034112e45c4241237d820cfcb53fae Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 12 Mar 2026 08:26:11 +0100 Subject: [PATCH] fix(argo): add git safe.directory for PVC-persisted checkout The cargo-target PVC retains the source checkout between workflow runs. When the container UID differs from the PVC owner, git refuses to operate with "dubious ownership" error. Adding safe.directory resolves this. Co-Authored-By: Claude Opus 4.6 --- infra/k8s/argo/compile-and-train-template.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infra/k8s/argo/compile-and-train-template.yaml b/infra/k8s/argo/compile-and-train-template.yaml index b27714add..5b998c77c 100644 --- a/infra/k8s/argo/compile-and-train-template.yaml +++ b/infra/k8s/argo/compile-and-train-template.yaml @@ -179,6 +179,9 @@ spec: REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git" BUILD="/cargo-target/src" + # PVC may be owned by a different UID from a previous run + git config --global --add safe.directory "$BUILD" + # Persistent checkout on PVC — only changed files get new mtimes, # so cargo skips recompiling unchanged workspace crates. if [ -d "$BUILD/.git" ]; then