Skip to content

Make native-tls dependency optional for azure_messaging_eventhubs #2797

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cargo_metadata = "0.18.1"
clap = { version = "4.4.16", features = ["derive"] }
criterion = { version = "0.5", features = ["async_tokio"] }
dyn-clone = "1.0"
fe2o3-amqp = { version = "0.14", features = ["native-tls", "tracing", "uuid"] }
fe2o3-amqp = { version = "0.14", features = ["tracing", "uuid"] }
fe2o3-amqp-ext = { version = "0.14" }
fe2o3-amqp-management = { version = "0.14", features = ["tracing"] }
fe2o3-amqp-cbs = { version = "0.14" }
Expand Down
2 changes: 2 additions & 0 deletions sdk/core/azure_core_amqp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ fe2o3_amqp = [
"serde_amqp",
"serde_bytes",
]
native_tls = ["fe2o3-amqp?/native-tls"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem there's a choice, but any native-tls feature would have to be sans provider like we do in typespec_client_core's reqwest_rustls feature e.g., reqwest/rustls-tls-native-roots-no-provider. We absolutely cannot take a dependency on ring.

Now, it could be it's not actually used, but this would need to be investigated further.

rustls = ["fe2o3-amqp?/rustls"]

[lints]
workspace = true
Expand Down
3 changes: 3 additions & 0 deletions sdk/eventhubs/azure_messaging_eventhubs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }

[features]
default = ["native_tls"]
test = []
blob_checkpoint_store = []
native_tls = ["azure_core_amqp/native_tls"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Features cannot be mutually exclusive, so is there a reason to make native_tls a feature? Why not just rustls like we did in azure_core?

rustls = ["azure_core_amqp/rustls"]

[[bench]]
name = "benchmarks"
Expand Down
Loading