Skip to content

Commit

Permalink
Merge pull request #1254 from muzarski/rustls-support-muzarski
Browse files Browse the repository at this point in the history
Rustls support with dynamic choice of TLS provider for cloud
  • Loading branch information
Lorak-mmk authored Feb 25, 2025
2 parents 370506e + bf62952 commit 58d1aef
Show file tree
Hide file tree
Showing 36 changed files with 1,866 additions and 679 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ jobs:
run: cargo clippy --verbose --all-targets --all-features
- name: Cargo check with cpp_rust_unstable cfg
run: RUSTFLAGS="--cfg cpp_rust_unstable" cargo clippy --verbose --all-targets --all-features

# Features checks.
# No features.
- name: Cargo check without features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features ""
- name: Cargo check with all serialization features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "full-serialization"

# All features.
- name: Cargo check with all features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --all-features

# Various (de)serialization features.
- name: Cargo check with all serialization features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "full-serialization"
- name: Cargo check with secrecy-08 feature
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "secrecy-08"
- name: Cargo check with chrono-04 feature
Expand All @@ -59,6 +66,14 @@ jobs:
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "num-bigint-04"
- name: Cargo check with bigdecimal-04 feature
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "bigdecimal-04"

# TLS-related feature sets.
- name: Cargo check with openssl-x feature
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "openssl-010"
- name: Cargo check with rustls-x feature
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "rustls-023"
# (openssl-x, rustls-x) is checked in tls.yml.

- name: Build scylla-cql
run: cargo build --verbose --all-targets --manifest-path "scylla-cql/Cargo.toml" --features "full-serialization"
- name: Build
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: -Dwarnings

jobs:
build:
Expand All @@ -31,8 +32,18 @@ jobs:
run: rustup update
- name: Check
run: cargo check --verbose
- name: Run cloud example
run: cargo run --example cloud -- $HOME/.ccm/serverless/config_data.yaml
# Cloud-related feature sets.
- name: Cargo check with unstable-cloud and openssl-x features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "unstable-cloud" --features "openssl-010"
- name: Cargo check with unstable-cloud and rustls-x features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "unstable-cloud" --features "rustls-023"
- name: Cargo check with unstable-cloud, openssl-x and rustls-x features
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "unstable-cloud" --features "openssl-010" --features "rustls-023"

- name: Run cloud-openssl example
run: cargo run --example cloud-openssl -- $HOME/.ccm/serverless/config_data.yaml
- name: Run cloud-rustls example
run: cargo run --example cloud-rustls -- $HOME/.ccm/serverless/config_data.yaml
- name: Run cloud tests
run: CLOUD_CONFIG_PATH=$HOME/.ccm/serverless/config_data.yaml RUSTFLAGS="--cfg scylla_cloud_tests" RUST_LOG=trace cargo test --verbose

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ jobs:
run: rustup update

- name: Check
run: cargo check --verbose --features "ssl"
run: cargo check --verbose --features "openssl-010" --features "rustls-023"
working-directory: ${{env.working-directory}}

- name: Start the cluster
run: docker compose -f test/tls/docker-compose-tls.yml up -d

- name: Run tests
run: SCYLLA_URI=172.44.0.2 RUST_LOG=trace cargo run --example tls
- name: Run openssl example
run: SCYLLA_URI=172.44.0.2 RUST_LOG=trace cargo run --example tls-openssl
- name: Run rustls example
run: SCYLLA_URI=172.44.0.2 RUST_LOG=trace cargo run --example tls-rustls

- name: Stop the cluster
if: ${{ always() }}
Expand Down
Loading

0 comments on commit 58d1aef

Please sign in to comment.