Skip to content

Fix e2e-install test failing on tag pushes#304

Merged
jarugupj merged 1 commit into
mainfrom
hypeship/fix-e2e-install-tag-ref
Jul 8, 2026
Merged

Fix e2e-install test failing on tag pushes#304
jarugupj merged 1 commit into
mainfrom
hypeship/fix-e2e-install-tag-ref

Conversation

@jarugupj

@jarugupj jarugupj commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The e2e-install job in the Test workflow runs on every push, tags included. On a tag push the checkout is a detached HEAD, so git rev-parse --abbrev-ref HEAD in scripts/e2e-install-test.sh returns the literal string HEAD instead of a ref name.
  • That value is passed to install.sh as BRANCH, producing git clone --branch HEAD, which fails with fatal: Remote branch HEAD not found in upstream origin and aborts the job.
  • Fix: prefer GITHUB_REF_NAME (the tag or branch GitHub provides), falling back to git rev-parse for local runs. A tag is a valid --branch argument to git clone, so the source build resolves correctly on release tags.

Not a new regression: the e2e-install job has failed with this same error on every tag whose Test run completed (v0.1.0 and v0.2.0). It went unnoticed because it runs in the Test workflow, separate from the release workflow that publishes the tag.

Validation

  • bash -n scripts/e2e-install-test.sh

🤖 Generated with Claude Code


Note

Low Risk
Single-line CI script change with no production runtime impact.

Overview
Fixes e2e-install failing on tag pushes when the workflow checks out a detached HEAD.

scripts/e2e-install-test.sh now sets BRANCH from GITHUB_REF_NAME when GitHub Actions provides it (tag or branch name), and only falls back to git rev-parse --abbrev-ref HEAD for local runs. Previously, detached tag checkouts produced BRANCH=HEAD, which made install.sh run git clone --branch HEAD and fail.

Reviewed by Cursor Bugbot for commit b0f0799. Bugbot is set up for automated code reviews on this repo. Configure here.

The e2e-install job runs on every push, including tags. On a tag push the
checkout is a detached HEAD, so `git rev-parse --abbrev-ref HEAD` returns the
literal "HEAD" rather than a ref name. That value was passed to install.sh as
BRANCH, producing `git clone --branch HEAD`, which fails with "Remote branch
HEAD not found in upstream origin".

Prefer GITHUB_REF_NAME (the tag or branch GitHub provides) and fall back to
rev-parse for local runs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jarugupj jarugupj force-pushed the hypeship/fix-e2e-install-tag-ref branch from f64ed56 to b0f0799 Compare July 8, 2026 22:35
@jarugupj jarugupj marked this pull request as ready for review July 8, 2026 22:43
@jarugupj jarugupj requested a review from sjmiller609 July 8, 2026 22:45
@jarugupj jarugupj merged commit 96437d7 into main Jul 8, 2026
13 of 14 checks passed
@jarugupj jarugupj deleted the hypeship/fix-e2e-install-tag-ref branch July 8, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants