github-actions[bot]
08d8946dde
release: binstalk-git-repo-api v0.4.0 ( #1845 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-07-26 09:39:17 +00:00
github-actions[bot]
78f26622b2
release: binstalk-downloader v0.12.0 ( #1842 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-07-26 09:11:23 +00:00
dependabot[bot]
0fe605f7f0
build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group ( #1817 )
...
* build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group
Bumps the deps group with 1 update: [compact_str](https://github.com/ParkMyCar/compact_str ).
Updates `compact_str` from 0.7.1 to 0.8.0
- [Changelog](https://github.com/ParkMyCar/compact_str/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ParkMyCar/compact_str/commits )
---
updated-dependencies:
- dependency-name: compact_str
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: deps
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix compilation error and deprecations
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Use `CompactString::const_new` when possible
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-07-13 04:10:11 +00:00
github-actions[bot]
384789d1c9
release: binstalk-git-repo-api v0.3.0 ( #1785 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 14:44:56 +00:00
github-actions[bot]
4bd5e79115
release: binstalk-downloader v0.11.5 ( #1784 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-18 14:21:59 +00:00
Jiahao XU
ef7ca1ba9f
Re enable h3 in reqwest and remove impl Sync
on returned Future in binstalk-git-repo-api
( #1783 )
...
* Upgrade transitive dependencies
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Re-enable h3
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `binstalk-git-repo-api`
Remove `Sync` bound on returned `Future`, since `tokio::spawn` does not require it
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-18 13:30:23 +00:00
github-actions[bot]
ee16116583
release: binstalk-downloader v0.11.4 ( #1777 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-15 16:05:37 +00:00
github-actions[bot]
ed31bc17e5
release: binstalk-git-repo-api v0.2.0 ( #1771 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-15 06:02:41 +00:00
Jiahao XU
fff6aa8122
Improve use of github token ( #1769 )
...
* 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
2024-06-15 05:42:09 +00:00
github-actions[bot]
b71b3ce472
release: binstalk-downloader v0.11.3 ( #1759 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-14 12:38:01 +00:00
github-actions[bot]
734906d5fd
release: binstalk-git-repo-api v0.1.1 ( #1740 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-13 03:41:38 +00:00
github-actions[bot]
f567e3bd9e
release: binstalk-downloader v0.11.2 ( #1739 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-13 02:54:38 +00:00
Jiahao XU
4687726c66
Improve derbugg logging ( #1738 )
...
* Improve derbugg logging
Make it more readable
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix excessive logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-13 00:25:24 +10:00
github-actions[bot]
8fe7b92631
release: binstalk-git-repo-api v0.1.0 ( #1728 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-12 11:31:53 +00:00
Jiahao XU
6622bf1ae3
Speedup binstalk-git-repo-api unit testing ( #1731 )
...
* 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>
2024-06-12 20:34:50 +10:00
Jiahao XU
2feac66e14
Speedup ci: Only run tests on change ( #1729 )
...
* 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>
2024-06-12 12:29:16 +10:00
github-actions[bot]
9a0367b3ec
release: binstalk-downloader v0.11.1 ( #1726 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-11 13:31:35 +00:00
Jiahao XU
238e0f6318
Fix rate limit checking in GhApiClient
( #1725 )
...
* Fix rate limit checking in `GhApiClient`
- Mv logic into `binstalk_downloader`
- Check for `RETRY_AFTER` and `x-ratelimit-remaining` on any status code
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lint
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-11 22:37:48 +10:00
Jiahao XU
3aae883467
Speedup ci ( #1724 )
...
* 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>
2024-06-11 00:12:44 +10:00
github-actions[bot]
5bcc243741
release: binstalk-downloader v0.11.0 ( #1722 )
...
chore: Release
Co-authored-by: github-actions <github-actions@github.com>
2024-06-10 08:11:05 +00:00
Jiahao XU
1dbd2460a3
Support private github repository ( #1690 )
...
* Refactor: Create new crate binstalk-git-repo-api
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix CI lint warnings
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `just check`: Rm deleted features from `cargo-hack` check
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Extract new mod error
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Ret artifact url in `has_release_artifact`
So that we can use it to download from private repositories.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Move `test_graph_ql_error_type` to mod `error`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix running `cargo test` in `binstalk-git-repo-api``
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Remove unnecessary import in mod `error::test`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rename mod `request`` to `release_artifacts`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl draft version of fetching repo info
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Move `HasReleaseArtifacts` failure variants into `GhApiError`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Use `GhRepo` in `GhRelease`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Return `'static` future
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Make sure `'static` Future is returned
To make it easier to create generic function
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add logging to unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Extract new fn `GhApiClient::do_fetch`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rm unused `percent_encode_http_url_path`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `cargo test` run on CI
`cargo test` run all tests in one process.
As such, `set_global_default` would fail on the second call.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Optimize `GhApiClient::do_fetch`: Avoid unnecessary restful API call
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Rm param `auth_token` for restful API fn
which is always set to `None`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl new API `GhApiClient::get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix unit test for `GhApiClient::get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor testing: Parameter-ize testing
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Parallelise `test_get_repo_info`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: Create parameter-ised `test_has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Parallelize `test_has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Refactor: `gh_api_client::test::create_client` shall not be `async`
as there is no `.await` in it.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Return `Url` in `GhApiClient::has_release_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Impl new API `GhApiClient::download_artifact`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Remove unused deps added to binstalk-git-repo-api
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new API `GhApiClient::remote_client`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `GhApiClient::has_gh_token`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add `GhRepo::try_extract_from_url`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Rename `ReleaseArtifactUrl` to `GhReleaseArtifactUrl`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add new fn `Download::with_data_verifier`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* feature: Support private repository
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add e2e-test/private-github-repo
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix clippy lints
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `launch_baseline_find_tasks`: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix test failure: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Temporarily enable debug output for e2e-test-private-github-repo
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix `get_repo_info`: Retry on rate limit
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Improve `debug!` logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debug logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debugging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add more debug logging
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Apply suggestions from code review
* Fix compilation
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Fix cargo fmt
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
* Add crate binstalk-git-repo-api to release-pr.yml
* Update crates/binstalk-git-repo-api/Cargo.toml
* Apply suggestions from code review
* Update crates/binstalk/Cargo.toml
---------
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-10 06:02:12 +00:00