fix: switch rust self-update to CDN bundles#182
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refactors the self-update mechanism in ChangesCDN-based update flow
Sequence Diagram(s)sequenceDiagram
participant Client as Update Checker
participant CDN as CDN Latest<br/>Endpoint
participant GitHubAPI as GitHub API<br/>releases/tags/{tag}
participant CDNDL as CDN Release<br/>Archive
participant GitHubDL as GitHub Release<br/>Assets
Client->>CDN: Fetch latest version
alt HTTP success
CDN-->>Client: Version tag in response
Client->>Client: normalize_tag_from_metadata
Client->>GitHubAPI: Fetch release metadata<br/>by normalized tag
GitHubAPI-->>Client: Release info
Client->>CDNDL: Download archive
alt CDN available
CDNDL-->>Client: Archive (success)
else CDN unavailable
Client->>GitHubDL: Fallback to GitHub<br/>release assets
GitHubDL-->>Client: Archive (fallback)
end
else HTTP error
CDN-->>Client: Error
Client->>Client: Return formatted error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks for the pull request. A maintainer will review it when available. Please keep the PR focused, explain the why in the description, and make sure local checks pass before requesting review. Contribution guide: https://github.com/AI-Shell-Team/aish/blob/main/CONTRIBUTING.md |
|
This pull request description looks incomplete. Please update the missing sections below before review. Missing items:
|
Background
Rust self-update was still checking GitHub release metadata and downloading GitHub release assets first, while the release workflow already publishes stable and beta bundles to the CDN paths used by the installer. This left the Rust line inconsistent with the published release layout.
Changes
Validation
cargo test -p aish-cli update:: -- --nocaptureRisk
Summary by CodeRabbit
New Features
Bug Fixes