From c0a9ae30b2bb302628e011ebe52beb62c8fbe686 Mon Sep 17 00:00:00 2001 From: jplorier Date: Thu, 29 Oct 2026 15:19:11 -0300 Subject: [PATCH] fix(sso): force-fetch the upstream tag in apply.sh The CI checkout of the fork (fetch-depth 0) copies every tag the fork holds. If one matches the upstream tag being built, the non-forced fetch refuses with "would clobber existing tag" and the build dies before the overlay is applied: the build for #2 failed this way on @hyperdx/app@2.42.0. Fetch with + so upstream's tag always wins. --- sso/apply.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sso/apply.sh b/sso/apply.sh index 59a2572aed..f7114b749b 100755 --- a/sso/apply.sh +++ b/sso/apply.sh @@ -23,7 +23,11 @@ if ! git remote get-url upstream >/dev/null 2>&1; then fi echo "[sso] fetching tag $TAG" -git fetch --no-tags upstream "refs/tags/${TAG}:refs/tags/${TAG}" +# Forced (+): a same-named tag may already exist locally (e.g. the CI checkout +# of the fork, fetch-depth 0, copies every tag the fork holds). Without + git +# refuses with "would clobber existing tag" and the build dies before the +# overlay is applied. Upstream is the source of truth for upstream tags. +git fetch --no-tags upstream "+refs/tags/${TAG}:refs/tags/${TAG}" echo "[sso] preparing worktree at $OUT" git worktree remove --force "$OUT" 2>/dev/null || true