Commit graph

1934 commits

Author SHA1 Message Date
Jiahao XU
c22d5a208e
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>
2024-06-12 01:00:07 +10:00
Jiahao XU
7f7eaa8beb
Fix just recipe unit-tests
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:47:19 +10:00
Jiahao XU
2cd7ee9c04
Fix deciding which crates to test on windows
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:44:26 +10:00
Jiahao XU
8a1f329389
Fix passing of CARGO_NEXTEST_ADDITIONAL_ARGS
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:43:53 +10:00
Jiahao XU
661a5f18d4
Fix passning of craetes to run
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:40:18 +10:00
Jiahao XU
5245e6d6c1
FIx separator for changed-files
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:38:32 +10:00
Jiahao XU
36c7ff6534
Fix shell error in job changed-files
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:35:32 +10:00
Jiahao XU
c0d3f75738
Fix job changed-files
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:34:37 +10:00
Jiahao XU
97a360aae9
Fix job changed-files
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:30:31 +10:00
Jiahao XU
7f1994e205
Only run unit tests for crates that are changed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:29:02 +10:00
Jiahao XU
0f7928f65f
Only run detect-targets test if changed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-12 00:20:29 +10:00
Jiahao XU
2d126668bd
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>
2024-06-11 23:53:48 +10: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
Jiahao XU
52f172c713
Fix binstalk_fetchers::FetchError definition (#1711)
Rm useless cfg on it
2024-06-10 12:17:45 +00: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
github-actions[bot]
48ee0b0e3e
release: cargo-binstall v1.6.9 (#1719)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-06-08 06:00:33 +00:00
github-actions[bot]
02dbe21500
release: atomic-file-install v1.0.4 (#1718)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-06-08 03:41:59 +00:00
github-actions[bot]
bd058392bb
dep: Upgrade transitive dependencies (#1717)
Co-authored-by: github-actions <github-actions@github.com>
2024-06-08 02:46:07 +00:00
dependabot[bot]
ed173e2b5f
build(deps): bump windows from 0.56.0 to 0.57.0 in the deps group (#1716)
Bumps the deps group with 1 update: [windows](https://github.com/microsoft/windows-rs).


Updates `windows` from 0.56.0 to 0.57.0
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.56.0...0.57.0)

---
updated-dependencies:
- dependency-name: windows
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 01:31:46 +00:00
github-actions[bot]
dc229e7fc7
dep: Upgrade transitive dependencies (#1715)
Co-authored-by: github-actions <github-actions@github.com>
2024-06-07 03:51:09 +00:00
github-actions[bot]
734c24b926
dep: Upgrade transitive dependencies (#1713)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-31 09:19:59 +00:00
github-actions[bot]
2d221debd8
release: cargo-binstall v1.6.8 (#1710)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-25 01:39:17 +00:00
github-actions[bot]
88b4dd4e65
dep: Upgrade transitive dependencies (#1709)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-24 08:40:07 +00:00
github-actions[bot]
4545b16e0b
release: cargo-binstall v1.6.7 (#1707)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-18 06:13:50 +00:00
github-actions[bot]
6cede2e8dc
release: binstalk v0.23.1 (#1706)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-18 05:20:48 +00:00
github-actions[bot]
abc0dbee67
release: binstalk-fetchers v0.4.1 (#1705)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-18 04:23:54 +00:00
dependabot[bot]
45307909c3
build(deps): bump the deps group with 2 updates (#1704)
Bumps the deps group with 2 updates: [itertools](https://github.com/rust-itertools/itertools) and [thiserror](https://github.com/dtolnay/thiserror).


Updates `itertools` from 0.12.1 to 0.13.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0)

Updates `thiserror` from 1.0.60 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.60...1.0.61)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-18 03:28:12 +00:00
github-actions[bot]
ec08340fc3
dep: Upgrade transitive dependencies (#1703)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-17 09:03:37 +00:00
github-actions[bot]
496eda8439
release: cargo-binstall v1.6.6 (#1697)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-11 03:35:50 +00:00
dependabot[bot]
e74127b04e
build(deps): bump file-format from 0.24.0 to 0.25.0 in the deps group (#1696)
Bumps the deps group with 1 update: [file-format](https://github.com/mmalecot/file-format).


Updates `file-format` from 0.24.0 to 0.25.0
- [Release notes](https://github.com/mmalecot/file-format/releases)
- [Changelog](https://github.com/mmalecot/file-format/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mmalecot/file-format/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: file-format
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-11 01:43:39 +00:00
github-actions[bot]
331e0efb51
dep: Upgrade transitive dependencies (#1695)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-10 03:38:43 +00:00
github-actions[bot]
dfdaf6952e
release: cargo-binstall v1.6.5 (#1686)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 08:19:06 +00:00
github-actions[bot]
25a21830cc
dep: Upgrade transitive dependencies (#1685)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 05:43:23 +00:00
github-actions[bot]
11f5feac08
release: binstalk v0.23.0 (#1678)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 02:07:00 +00:00
github-actions[bot]
27bc4a2d2a
release: detect-targets v0.1.17 (#1682)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 00:29:20 +00:00
github-actions[bot]
bf077e1e3a
release: binstalk-downloader v0.10.3 (#1684)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-03 00:19:19 +00:00
Jiahao XU
2d856bf1c0
Speedup ci by using personal access token for testing (#1680)
* Use secrets,CI_TEST_GITHUB_TOKEN for testing in ci.yml

* Run e2e-test in release-packages.yml using secrets.CI_TEST_GITHUB_TOKEN

* Use CI_RELEASE_TEST_GITHUB_TOKEN in e2e-test in release-packages.yml
2024-05-02 23:44:23 +00:00
Jiahao XU
6ef3b665f4
Fix clippy lint error in 1.78.0 (#1679)
* Bump msrv of binstalk-downloader to 1.70.0

* Fix trait bound in multiple places

for copy_file_to_mpsc

* Rm super-trait trait bounds for FusedStream

* Bump detect-targets msrv to 1.62.0

* Bump cargo-binstall msrv to 1.70.0
2024-05-02 23:03:12 +00:00
github-actions[bot]
aaaa2b1387
release: atomic-file-install v1.0.3 (#1673)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 12:06:53 +00:00
github-actions[bot]
ce5f37738f
release: binstalk-registry v0.8.0 (#1677)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 11:15:21 +00:00
github-actions[bot]
a9fad9fce4
release: cargo-toml-workspace v6.0.0 (#1676)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 10:22:24 +00:00
github-actions[bot]
d515e11a8b
release: binstalk-downloader v0.10.2 (#1675)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 09:08:24 +00:00
github-actions[bot]
65a3c2c918
release: detect-targets v0.1.16 (#1674)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2024-05-02 09:02:44 +00:00
Jiahao XU
3198712328
Bump release-pr to v2.1.1 (#1672) 2024-05-02 05:27:20 +00:00
github-actions[bot]
ecd8942897
dep: Upgrade transitive dependencies (#1670)
Co-authored-by: github-actions <github-actions@github.com>
2024-04-26 03:31:43 +00:00
Jiahao XU
fda8cac41a
Bump reqwest to 0.12.4 and enable feature zstd (#1667)
to support compression using zstd.

Also enable `http2` (which is now enabled by other deps of this crate).

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-04-24 07:32:39 +00:00
dependabot[bot]
55024b0771
build(deps): bump the deps group with 2 updates (#1664)
Bumps the deps group with 2 updates: [toml_edit](https://github.com/toml-rs/toml) and [cargo_toml](https://gitlab.com/lib.rs/cargo_toml).


Updates `toml_edit` from 0.22.11 to 0.22.12
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.11...v0.22.12)

Updates `cargo_toml` from 0.19.2 to 0.20.0
- [Commits](https://gitlab.com/lib.rs/cargo_toml/compare/v0.19.2...v0.20.0)

---
updated-dependencies:
- dependency-name: toml_edit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: cargo_toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-20 02:12:40 +00:00
dependabot[bot]
f45dd80b4d
build(deps): bump rustls from 0.21.10 to 0.21.11 (#1663)
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.10 to 0.21.11.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-20 01:54:12 +00:00