Skip to content

Commit

Permalink
Upgrade rust and opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
kushudai committed Nov 20, 2023
1 parent 9003898 commit 3d2e2e2
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
format-code:
runs-on: "ubuntu-latest"
container: rust:1.72.0
container: rust:1.74

steps:
- name: Checkout the code on merge
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
lint:
runs-on: "ubuntu-latest"
container: rust:1.72.0
container: rust:1.74

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
features: ["", "--no-default-features --features rustls-native"]
runs-on: "ubuntu-latest"
container: rust:1.72.0
container: rust:1.74

steps:
- uses: actions/checkout@v2
Expand All @@ -26,7 +26,7 @@ jobs:
matrix:
features: ["", "--no-default-features --features rustls-native"]
runs-on: "ubuntu-latest"
container: rust:1.72.0
container: rust:1.74
services:
consul:
image: consul:1.11.11
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container: rust:1.72.0
container: rust:1.74
services:
consul:
image: consul:1.11.11
Expand All @@ -25,7 +25,7 @@ jobs:

dry-run:
runs-on: ubuntu-latest
container: rust:1.72.0
container: rust:1.74

steps:
- uses: actions/checkout@v2
Expand All @@ -36,7 +36,7 @@ jobs:
publish:
needs: [test, dry-run]
runs-on: ubuntu-latest
container: rust:1.72.0
container: rust:1.74
environment: crates-publish

steps:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

## 0.5.0 - 2023-11-20

### Added

- Added support for `deregister-entity`.

### Changed

- `opentelemetry` updated to version `0.21` from `0.20`.

### Changed

- `opentelemetry` updated to version `0.20` from `0.19`.

## 0.4.0 - 2023-08-25

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ http = "0.2"
hyper = { version = "0.14", features = ["full"] }
hyper-rustls = { version = "0.24" }
lazy_static = { version = "1", optional = true }
opentelemetry = { version = "0.20", features = ["rt-tokio"], optional = true }
opentelemetry = { version = "0.21", optional = true }
prometheus = { version = "0.13", optional = true }
quick-error = "2"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.72
1.74
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ fn https_connector() -> hyper_rustls::HttpsConnector<HttpConnector> {
.https_or_http()
.enable_http1()
.build();
#[allow(unreachable_code)]
// Clippy doesn't realize if the feature is disabled, this code would execute.
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.https_or_http()
Expand Down Expand Up @@ -1069,20 +1071,19 @@ mod tests {
lock_delay: std::time::Duration::from_secs(0),
..Default::default()
};
let start_index: u64;
let res = consul.get_lock(req, string_value.as_bytes()).await;
assert!(res.is_ok());
let lock = res.unwrap();
let res2 = consul.get_lock(req, string_value.as_bytes()).await;
assert!(res2.is_err());
let err = res2.unwrap_err();
match err {
ConsulError::LockAcquisitionFailure(index) => start_index = index,
let start_index = match err {
ConsulError::LockAcquisitionFailure(index) => index,
_ => panic!(
"Expected ConsulError::LockAcquisitionFailure, got {:#?}",
err
),
}
};

assert!(start_index > 0);
let watch_req = LockWatchRequest {
Expand Down

0 comments on commit 3d2e2e2

Please sign in to comment.