Skip to content

Fix confusing error when release binaries not yet available#18

Merged
gmoon merged 1 commit intomainfrom
fix/update-assets-not-ready
Mar 15, 2026
Merged

Fix confusing error when release binaries not yet available#18
gmoon merged 1 commit intomainfrom
fix/update-assets-not-ready

Conversation

@gmoon
Copy link
Contributor

@gmoon gmoon commented Mar 15, 2026

Summary

  • lattice update now shows a clear error when a release exists but binaries haven't been uploaded yet (e.g., release workflow still building)
  • Before: Error: No asset found for target https://github.com/.../lattice-0.1.15-aarch64-apple-darwin.tar.gz
  • After: Error: Release v0.1.15 exists but binaries are not yet available (release may still be building)

Changes

  • Added AssetsNotReady error variant with descriptive message
  • Added ReleaseInfo struct to carry release metadata (tag, version, asset names)
  • Extracted parse_release_response to share between fetch_latest_version and fetch_specific_version
  • Checks release asset list from GitHub API before attempting binary download

Test plan

  • make pre-commit passes (fmt + clippy)
  • Manual verification: the error was triggered by running lattice update while v0.1.15 release workflow was still building

🤖 Generated with Claude Code

When a release exists on GitHub but the cross-compilation workflow
hasn't finished uploading binaries, `lattice update` now shows
"Release vX.Y.Z exists but binaries are not yet available" instead
of the confusing "No asset found for target <url>" error.

Checks the release's asset list from the GitHub API before attempting
download. Also extracts shared parse_release_response to eliminate
duplication between fetch_latest_version and fetch_specific_version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gmoon gmoon merged commit e4b8eb1 into main Mar 15, 2026
5 checks passed
@gmoon gmoon deleted the fix/update-assets-not-ready branch March 15, 2026 01:22
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