Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rust to 1.74 and open-telemetry to 0.21 #41

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rs-consul"
version = "0.4.0"
version = "0.5.0"
authors = ["Roblox"]
edition = "2021"
description = "This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)"
Expand All @@ -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
Loading