diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff94704..85de049 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,10 @@ name: Etcd Client Test run-name: ${{ github.actor }} is testing out etcd client on: - pull_request_target: - branches: ['**'] + pull_request: + branches: [ '**' ] push: - branches: ['**'] + branches: [ '**' ] jobs: regression-test: @@ -12,12 +12,12 @@ jobs: steps: - run: echo "Get latest etcd from docker hub" - run: docker --version - - run: sudo docker pull bitnami/etcd:latest + - run: sudo docker pull bitnami/etcd:latest - run: sudo docker network create app-tier --driver bridge - run: sudo docker run -d --name Etcd-server --network app-tier --publish 2379:2379 --publish 2380:2380 --env ALLOW_NONE_AUTHENTICATION=yes --env ETCD_ADVERTISE_CLIENT_URLS=http://etcd-server:2379 bitnami/etcd:latest - run: sudo apt install -y protobuf-compiler libprotobuf-dev - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: cargo --version --verbose - run: rustc --version --verbose - name: format check diff --git a/Cargo.toml b/Cargo.toml index 911369b..5816c68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,29 +13,30 @@ keywords = ["etcd", "v3", "api", "client", "async"] [features] tls = ["tonic/tls"] -tls-openssl = ["openssl", "hyper-openssl", "hyper"] +tls-openssl = ["openssl", "hyper-openssl", "hyper", "hyper-util"] tls-openssl-vendored = ["tls-openssl", "openssl/vendored"] tls-roots = ["tls", "tonic/tls-roots"] pub-response-field = ["visible"] [dependencies] -tonic = "0.11.0" -prost = "0.12.0" -tokio = "1.38.0" -tokio-stream = "0.1.15" -tower-service = "0.3.2" -http = "0.2.12" +tonic = "0.12" +prost = "0.13" +tokio = "1.38" +tokio-stream = "0.1" +tower-service = "0.3" +http = "1.1" visible = { version = "0.0.1", optional = true } -tower = { version = "0.4.13", default-features = false } +tower = { version = "0.4", default-features = false } openssl = { version = "0.10", optional = true } -hyper = { version = "0.14.26", features = ["h2", "client"], optional = true } -hyper-openssl = { version = "0.9", optional = true } +hyper = { version = "1.4", features = ["client"], optional = true } +hyper-openssl = { version = "0.10", features = ["client-legacy", "tokio"], optional = true } +hyper-util = { version = "0.1", features = ["client-legacy"], optional = true } [dev-dependencies] -tokio = { version = "1.38.0", features = ["full"] } +tokio = { version = "1.38", features = ["full"] } [build-dependencies] -tonic-build = { version = "0.11.0", default-features = false, features = ["prost"] } +tonic-build = { version = "0.12", default-features = false, features = ["prost"] } [package.metadata.docs.rs] features = ["tls", "tls-roots"] diff --git a/src/openssl_tls/transport.rs b/src/openssl_tls/transport.rs index d22d8a7..89770ae 100644 --- a/src/openssl_tls/transport.rs +++ b/src/openssl_tls/transport.rs @@ -2,8 +2,8 @@ use std::time::Duration; use super::backoff::{BackOffStatus, BackOffWhenFail}; use http::{Request, Uri}; -use hyper::client::HttpConnector; -use hyper_openssl::HttpsConnector; +use hyper_openssl::client::legacy::HttpsConnector; +use hyper_util::client::legacy::connect::HttpConnector; use openssl::{ error::ErrorStack, pkey::PKey,