Repository navigation
perf(aqua): skip public probes for private releases - #10914
Conversation
📝 WalkthroughWalkthrough
ChangesAqua private package downloads
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant AquaPackage
participant AquaBackend
participant GitHubRelease
AquaPackage->>AquaBackend: provide private metadata and release URLs
AquaBackend->>GitHubRelease: select API URL directly for private packages
GitHubRelease-->>AquaBackend: download artifact or provenance asset
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Greptile SummaryThis PR adds a
Confidence Score: 4/5Safe to merge for the common case; one edge case in apply_override means packages declaring private: true only inside a version_overrides block will silently lose that flag and still probe the browser URL. The main optimization path and all three call sites in aqua.rs are correct. The gap is in apply_override in types.rs: no_asset (an identically-typed bool) is explicitly propagated but private is not. A registry package that sets private: true exclusively inside a version_overrides block would have the flag dropped after override application, causing the unnecessary browser-URL probe to fire anyway for those versions. crates/aqua-registry/src/types.rs — the apply_override function needs a Important Files Changed
|
|
Addressed the Greptile concern with a regression test confirming that top-level I intentionally did not merge This comment was generated by an AI coding assistant. |
Summary
privatepackage field in YAML and compiled registry dataprivateis absent or falseWhy
Aqua registries can mark GitHub-hosted packages as private. Mise previously discarded that field, so private release downloads always made a browser-URL probe that is known to fail before selecting the authenticated API asset endpoint.
This keeps the fallback behavior for registries with missing or incorrect metadata while avoiding the unnecessary request for correctly declared private packages. The same selection applies to auxiliary release assets such as checksums, signatures, and provenance.
Validation
cargo fmt --all -- --checkcargo test -p aqua-registry privatecargo test -p aqua-registry test_rkyv_package_roundtrip_preserves_var_defaultcargo test test_private_github_release_uses_api_url_without_probecargo test test_github_release_without_api_url_uses_browser_urlThe full
cargo test -p aqua-registryrun passed 107 tests and hit one pre-existing platform-dependent failure intest_override_envs_all_matches_any_platform(.exeexpectation). The repository-widemise run formattask could not complete becauseajvis unavailable on PATH.Summary by CodeRabbit