Skip to content

Commit c6e5379

Browse files
authored
Fix event streams in the orchestrator implementation (#2673)
## Motivation and Context This PR gets event streams working in the client orchestrator implementation, and depends on #2671. The orchestrator's `TypeErasedBox` enforces a `Send + Sync` requirement on inputs and outputs. For the most part, this isn't an issue since almost all generated inputs/outputs are `Send + Sync`, but it turns out the `EventStreamSender` wasn't `Sync` due to an omission of the `Sync` bound. Thus, this PR is a breaking change, as it adds a `Sync` requirement for anyone who passes a stream to an event stream operation. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent 0beb890 commit c6e5379

File tree

16 files changed

+757
-499
lines changed

16 files changed

+757
-499
lines changed

CHANGELOG.next.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,15 @@ See the changes in https://github.com/awslabs/smithy-rs/pull/2671 for an example
5050
references = ["smithy-rs#2671"]
5151
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "client" }
5252
author = "jdisanti"
53+
54+
[[aws-sdk-rust]]
55+
message = "For event stream operations such as S3 SelectObjectContent or Transcribe StartStreamTranscription, the `EventStreamSender` in the input now requires the passed in `Stream` impl to implement `Sync`."
56+
references = ["smithy-rs#2673"]
57+
meta = { "breaking" = true, "tada" = false, "bug" = false }
58+
author = "jdisanti"
59+
60+
[[smithy-rs]]
61+
message = "For event stream operations, the `EventStreamSender` in inputs/outputs now requires the passed in `Stream` impl to implement `Sync`."
62+
references = ["smithy-rs#2673"]
63+
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all"}
64+
author = "jdisanti"

aws/rust-runtime/aws-runtime/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ edition = "2021"
77
license = "Apache-2.0"
88
repository = "https://github.com/awslabs/smithy-rs"
99

10+
[features]
11+
event-stream = ["dep:aws-smithy-eventstream", "aws-sigv4/sign-eventstream"]
12+
1013
[dependencies]
1114
aws-credential-types = { path = "../aws-credential-types" }
1215
aws-http = { path = "../aws-http" }
1316
aws-sigv4 = { path = "../aws-sigv4" }
17+
aws-smithy-eventstream = { path = "../../../rust-runtime/aws-smithy-eventstream", optional = true }
1418
aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" }
1519
aws-smithy-runtime = { path = "../../../rust-runtime/aws-smithy-runtime" }
1620
aws-smithy-runtime-api = { path = "../../../rust-runtime/aws-smithy-runtime-api" }
@@ -22,6 +26,7 @@ tracing = "0.1"
2226
uuid = { version = "1", features = ["v4", "fast-rng"] }
2327

2428
[dev-dependencies]
29+
aws-credential-types = { path = "../aws-credential-types", features = ["test-util"] }
2530
aws-smithy-protocol-test = { path = "../../../rust-runtime/aws-smithy-protocol-test" }
2631
proptest = "1"
2732
serde = { version = "1", features = ["derive"]}

0 commit comments

Comments
 (0)