Skip to content

Commit

Permalink
Increase rust version from 1.70 to 1.73 (#63)
Browse files Browse the repository at this point in the history
The zip crate has required at least 1.73 since 2.0.0

The more recent versions of the zip 1.x.x series have been yanked so
alternatively downgrading to 1.1.4 would allow CI to pass with toolchain
1.70.

This also resolves the complaints from the latest version of clippy.

It changes `Run::update` to return the `trace_update_interval` value,
the alternative would be removing it or tagging it as unused.
  • Loading branch information
sjoerdsimons authored Jan 16, 2025
2 parents eb98c35 + 96415cd commit cef1c89
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 56 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.70"
toolchain: "1.73"
- run: cargo check --all-targets --all-features

fmt:
Expand All @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.70"
toolchain: "1.73"
components: rustfmt
- run: cargo fmt --all --check

Expand All @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.70"
toolchain: "1.73"
- run: cargo test --all-targets --all-features
- run: cargo test --doc

Expand All @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.70"
toolchain: "1.73"
components: clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

Expand Down
99 changes: 50 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gitlab-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serde = { version = "1.0.200", features = [ "derive" ] }
serde_json = "1.0.64"
thiserror = "1.0.59"
bytes = "1.0.1"
zip = "1.2.3"
zip = "2.2.2"
pin-project = "1.0.7"
futures = "0.3.15"
async-trait = "0.1.50"
Expand Down
4 changes: 4 additions & 0 deletions gitlab-runner/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ struct JobUpdate<'a> {

#[derive(Debug, Clone)]
pub struct JobUpdateReply {
// GitLabs job update endpoint can include a suggested request rate in the response's HTTP header.
// Currently we only use this value from trace calls (e.g. appending to the jobs log).
// This field is kept around to document it's existence.
#[allow(dead_code)]
pub trace_update_interval: Option<Duration>,
}

Expand Down
2 changes: 1 addition & 1 deletion gitlab-runner/src/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct Dependency<'a> {
dependency: &'a JobDependency,
}

impl<'a> Dependency<'a> {
impl Dependency<'_> {
/// The id of the dependency
///
/// This id matches the job id of the generated this depenency
Expand Down
2 changes: 1 addition & 1 deletion gitlab-runner/src/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub struct UploadFile<'a> {
state: UploadFileState<'a>,
}

impl<'a> AsyncWrite for UploadFile<'a> {
impl AsyncWrite for UploadFile<'_> {
fn poll_write(
self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
Expand Down

0 comments on commit cef1c89

Please sign in to comment.