Skip to content

Minor fixes to address testing failures#17

Merged
brhkim merged 3 commits into
mainfrom
daaf_dev
May 4, 2026
Merged

Minor fixes to address testing failures#17
brhkim merged 3 commits into
mainfrom
daaf_dev

Conversation

@brhkim
Copy link
Copy Markdown
Collaborator

@brhkim brhkim commented May 4, 2026

No description provided.

DAAF Container and others added 3 commits May 4, 2026 03:14
When CI triggers on a tag push (e.g., v2.1.0), DAAF_BRANCH resolves to
the tag name. update_daaf.sh validates this via
git rev-parse --verify origin/<value>, which fails for tags because they
live at refs/tags/, not refs/remotes/origin/. This produces a confusing
"branch not found" error instead of explaining that tags can't be used
for updates.

- Add tag detection (refs/tags/ probe) to update_daaf.sh and
  update_daaf.ps1 after the branch check fails, with a clear error
  message explaining tags are immutable snapshots
- Override DAAF_BRANCH="" on all update_daaf.sh CI steps so tag-triggered
  runs auto-detect main/master
- Add BATS and Pester tests for tag detection and regression tests for
  values that are neither branches nor tags
- Fix existing "nonexistent branch" bash test mock to explicitly fail the
  new tag probe (prevent catch-all from triggering wrong error path)
- Clarify in user docs that DAAF_BRANCH accepts tags for install but only
  branches for update

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git clone --depth 1 -b <ref> implies --single-branch, which locks the
fetch refspec to only the cloned ref. After overriding DAAF_BRANCH=""
for tag-triggered CI runs, the auto-detect path tries origin/main —
but main was never fetched because the refspec was still narrow.

Add a refspec check before git fetch in both update_daaf.sh and
update_daaf.ps1 that widens to the standard wildcard
(+refs/heads/*:refs/remotes/origin/*) if it detects a narrow
single-branch refspec. This ensures all remote branches are visible
for both auto-detect and user-specified DAAF_BRANCH values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without --replace-all, git config appends a second value rather than
replacing the narrow single-branch refspec. The wildcard still works
(git processes all refspecs), but --replace-all produces a cleaner
single-value result and avoids leaving a redundant narrow entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brhkim brhkim merged commit 6102fdf into main May 4, 2026
30 of 38 checks passed
@brhkim brhkim deleted the daaf_dev branch May 4, 2026 03:42
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.

1 participant