* Perform artifact discovery in sequential
Run different `fetcher.find()` in sequential
* FuturesResolver: Fallback to other future if one error
* Fix typo
* Apply cargo fmt
* Parallelise `<QuickInstall as Fetcher>::find`
Check for signature in parallel to the package
* Download signature in `<QuickInstall as Fetcher>::find`
So that the signature download can be done in parallel.
* Bump msrv for binstalk-fetchers to 1.70
* Update crates/binstalk-fetchers/src/futures_resolver.rs
Co-authored-by: Félix Saparelli <felix@passcod.name>
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
* cargo fmt
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
* Add new dep zeroize
* Use Zeroizing to avoid leaking the token
* Optimize gh-auth-token
Spawn it as a task, and only await it
when using GhApiClient
* Fix binstalk-git-repo-api unit tests
* Bump msrv of binstalk-downloader, binstalk and cargo-binstall to 1.79
* Update From<io::Error> for DownloadError
to use io::Error::downcast
* Update From<io::Error> for BinstallError
* fix dmt
* Use binary name when searching for artifacts
When there is a single binary declared in the manifest and
it differs from the package name, add it to the list of handles
used for pre-built artifact fetching.
* Simplify `binary_name` assignment with a `match`
* Add e2e test
* Only attempt to use the binary name with `GhCrateMeta` fetcher
* Avoid too much over-allocating.
Technically it should also check if gh-crate-meta resolver is enabled, but it is unlikely for it to be disabled and overallocating for extra n-target should be fine, it is an improvement over doubling the space allocated if the binary_name is Some.
* Fix fmt in crates/binstalk/src/ops/resolve.rs
---------
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
* Log the gh-auth token retrieval failure on debug level
Fixed#1733
* Make gh_token::get an async function
* Improve returned err msg in gh_token::get
* Update use of gh_token::get() in entry.rs
* Fix typos
* Fix unclosed ()
* Fix unclosed ()
* Fix gh_token.rs
* Fix entry.rs
* Fix fmt in entry.rs
* Fix fmt in gh_token.rs
* Fix fmt in gh_token.rs
* Fix fmt in gh_token.rs
* Fix fmt in entry.rs
* Share `remote::Client` between tests when in cargo-test
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Run rate-limited binstalk-git-repo-api test in serial
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Update client-side rate limit to 1 request per 300ms
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Reduce test cases in `rate_limited_test_has_release_artifact_and_download_artifacts`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `cargo-nextest` that I forgot
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit testing: Pass auth-token to restful API
to avoid rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit test for `GhApiClient`
Set client-side rate limit to 1 request per 200 ms
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Only run `detect-targets` test if changed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Only run unit tests for crates that are changed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix job `changed-files`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix job `changed-files`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix shell error in job `changed-files`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* FIx separator for `changed-files`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix passning of craetes to run
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix passing of `CARGO_NEXTEST_ADDITIONAL_ARGS`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix deciding which crates to test on windows
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix just recipe `unit-tests`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Split test into two jobs
so that they will have they own cache (since different feature flags are used).
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Optimize binstalk-git-repo-api
Use a dedicated github token in CI
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Speedup CI using `cargo-nextest`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix release profile override on Windows
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Optimize unit test in binstalk-registry
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Use `secrets.CI_RELEASE_TEST_GITHUB_TOKEN` for just-setup
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit testing in justfile
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add retry on rate limit in unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Only use `CI_UNIT_TEST_GITHUB_TOKEN` in unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `test_get_repo_info`: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `test_has_release_artifact_and_download_artifacts`
Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>