fix(ci): use partial clone for robust SHA resolution + upgrade compile node to POP2-HC

- Replace fragile `git fetch --depth=1 origin "$SHA"` (fails with short SHAs)
  with `git clone --no-checkout --filter=blob:none` + `git checkout "$SHA"`
  across all 3 Argo templates (5 clone blocks total)
- Upgrade CI compile pool from POP2-32C-128G to POP2-HC-32C-64G
  (higher clock EPYC cores, 28% cheaper at €0.851/hr vs €1.18/hr)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-10 22:16:08 +01:00
parent 9278561ec5
commit 53eb82c193
5 changed files with 17 additions and 43 deletions

View File

@@ -84,15 +84,10 @@ spec:
SHA="{{inputs.parameters.commit-sha}}"
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
if [ "$SHA" = "HEAD" ]; then
git clone --depth=1 "$REPO" /workspace/src
else
git clone --depth=1 "$REPO" /workspace/src
cd /workspace/src
git fetch --depth=1 origin "$SHA"
git checkout "$SHA"
fi
echo "Checked out $(cd /workspace/src && git rev-parse --short HEAD)"
git clone --no-checkout --filter=blob:none "$REPO" /workspace/src
cd /workspace/src
git checkout "$SHA"
echo "Checked out $(git rev-parse --short HEAD)"
container:
image: gcr.io/kaniko-project/executor:debug
command: ["/busybox/sh", "-c"]

View File

@@ -561,14 +561,9 @@ spec:
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
WORKSPACE="/tmp/workspace"
if [ "$SHA" = "HEAD" ]; then
git clone --depth=1 "$REPO" "$WORKSPACE"
else
git clone --depth=1 "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git fetch --depth=1 origin "$SHA"
git checkout "$SHA"
fi
git clone --no-checkout --filter=blob:none "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git checkout "$SHA"
cd "$WORKSPACE/web-dashboard"
echo "=== Building web dashboard ==="
@@ -644,15 +639,9 @@ spec:
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
WORKSPACE="/tmp/workspace"
if [ "$SHA" = "HEAD" ]; then
git clone --depth=1 "$REPO" "$WORKSPACE"
else
git clone --depth=1 "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git fetch --depth=1 origin "$SHA"
git checkout "$SHA"
fi
git clone --no-checkout --filter=blob:none "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git checkout "$SHA"
echo "Checked out $(git rev-parse --short HEAD)"
export FOXHUNT_BUILD_VERSION="{{inputs.parameters.tag}}"
@@ -788,15 +777,9 @@ spec:
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
WORKSPACE="/tmp/workspace"
if [ "$SHA" = "HEAD" ]; then
git clone --depth=1 "$REPO" "$WORKSPACE"
else
git clone --depth=1 "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git fetch --depth=1 origin "$SHA"
git checkout "$SHA"
fi
git clone --no-checkout --filter=blob:none "$REPO" "$WORKSPACE"
cd "$WORKSPACE"
git checkout "$SHA"
echo "Checked out $(git rev-parse --short HEAD)"
export FOXHUNT_BUILD_VERSION="{{inputs.parameters.tag}}"

View File

@@ -176,13 +176,9 @@ spec:
REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"
BUILD="/tmp/workspace"
if [ "$SHA" = "HEAD" ]; then
git clone --depth=1 "$REPO" "$BUILD"
else
git clone --depth=1 "$REPO" "$BUILD"
cd "$BUILD" && git fetch --depth=1 origin "$SHA" && git checkout "$SHA"
fi
git clone --no-checkout --filter=blob:none "$REPO" "$BUILD"
cd "$BUILD"
git checkout "$SHA"
SHORT_SHA=$(git rev-parse --short HEAD)
echo "Checked out ${SHORT_SHA}"

View File

@@ -23,9 +23,9 @@ inputs = {
enable_gitlab_pool = true
gitlab_type = "GP1-XS"
# CPU compile pool (POP2-32C-128G for cargo check/build — 32 vCPU, 128GB RAM, no GPU)
# CPU compile pool (POP2-HC-32C-64G for cargo check/build — 32 vCPU, 64GB RAM, high clock, no GPU)
enable_ci_compile_cpu_pool = true
ci_compile_cpu_type = "POP2-32C-128G"
ci_compile_cpu_type = "POP2-HC-32C-64G"
ci_compile_cpu_max_size = 4
# L40S training pool (48GB VRAM, CUDA CC 89 — supervised hyperopt)

View File

@@ -148,9 +148,9 @@ variable "enable_ci_compile_cpu_pool" {
}
variable "ci_compile_cpu_type" {
description = "Instance type for the CPU compile pool (32 vCPU, 128GB RAM, no GPU)"
description = "Instance type for the CPU compile pool (32 vCPU, 64GB RAM, high clock, no GPU)"
type = string
default = "POP2-32C-128G"
default = "POP2-HC-32C-64G"
}
variable "ci_compile_cpu_max_size" {