Analysis
When running gh aw upgrade, users see this warning:
github/gh-aw-actions/setup: no releases found
Root cause:
pkg/cli/update_actions.go:getLatestActionRelease calls the GitHub Releases API for the repo (after base extraction, e.g. github/gh-aw-actions).
- If there are no Releases (even if there are tags), the API returns [].
- Code then does:
releases := strings.Split(strings.TrimSpace(string(output)), "\n")
if len(releases) == 0 || releases[0] == "" {
return "", "", errors.New("no releases found")
}
- This causes the warning. The fallback to tag scanning with
git ls-remote is only used for authentication errors, not for empty results.
Key snippet from getLatestActionRelease:
output, err := workflow.RunGHCombined("Fetching releases...", "api", fmt.Sprintf("/repos/%s/releases", baseRepo), "--jq", ".[].tag_name")
if err != nil {
// fallback logic for auth errors
}
releases := strings.Split(strings.TrimSpace(string(output)), "\n")
if len(releases) == 0 || releases[0] == "" {
return "", "", errors.New("no releases found")
}
Implementation Plan
-
Enhance Fallback in getLatestActionRelease
- If the releases list is empty and there was no error, fallback to
getLatestActionReleaseViaGit (listing tags, as is done for auth errors).
- Only produce a warning if neither approach finds tags or releases.
- Warnings must make it clear to users if it is safe to ignore them or not
-
Console Formatting
- Use
pkg/console.FormatWarningMessage for any fallback messages and clarify if tags were found and used, or nothing was found at all.
-
Update Tests
- In
pkg/workflow/compiler_custom_actions_test.go, add/extend tests to verify: (a) fallback to tags happens on empty releases, (b) proper warnings.
-
Improve Docs
- Document in the FAQ how action version resolution works with regards to Releases vs tags and how upgrades behave if only tags exist.
-
Validate per Project Guidelines
- Run
make agent-finish.
- Use correct error/console formatting (
pkg/console).
References:
Labels: bug, type: bug, actions, release
cc @github/gh-aw-core-team
Analysis
When running
gh aw upgrade, users see this warning:Root cause:
pkg/cli/update_actions.go:getLatestActionReleasecalls the GitHub Releases API for the repo (after base extraction, e.g.github/gh-aw-actions).git ls-remoteis only used for authentication errors, not for empty results.Key snippet from
getLatestActionRelease:Implementation Plan
Enhance Fallback in
getLatestActionReleasegetLatestActionReleaseViaGit(listing tags, as is done for auth errors).Console Formatting
pkg/console.FormatWarningMessagefor any fallback messages and clarify if tags were found and used, or nothing was found at all.Update Tests
pkg/workflow/compiler_custom_actions_test.go, add/extend tests to verify: (a) fallback to tags happens on empty releases, (b) proper warnings.Improve Docs
Validate per Project Guidelines
make agent-finish.pkg/console).References:
pkg/cli/update_actions.go:getLatestActionReleasepkg/gitutil/gitutil.go:ExtractBaseRepoLabels: bug, type: bug, actions, release
cc @github/gh-aw-core-team