id stringlengths 22 133 | text stringlengths 40 40.2k | arch stringclasses 1
value | syntax stringclasses 1
value | kind stringclasses 4
values | repo stringclasses 27
values | path stringlengths 5 116 | license stringclasses 6
values | commit stringlengths 40 40 | source_host stringclasses 1
value | category stringclasses 16
values | source_url stringlengths 85 196 | line_start int64 1 4.28k | line_end int64 4 4.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | trace!(request = ?request, "transmitting request");
let http_client = halt_on_err!([ctx] => runtime_components.http_client().ok_or_else(||
OrchestratorError::other("No HTTP client was available to send this request. \
Enable the `default-https-client` crate feature or configure an HT... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | match maybe_deserialized {
Some(output_or_error) => output_or_error,
None => read_body(response)
.instrument(debug_span!("read_body"))
.await
.map_err(OrchestratorError::response)
.and_then(|_| {
let _span = debu... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | modify_before_completion(ctx, runtime_components, cfg);
read_after_execution(ctx, runtime_components, cfg);
});
}
#[cfg(all(test, any(feature = "test-util", feature = "legacy-test-util")))]
mod tests {
use crate::client::auth::no_auth::{NoAuthRuntimePluginV2, NO_AUTH_SCHEME_ID};
use crate::client::... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | use aws_smithy_runtime_api::client::ser_de::{
SharedRequestSerializer, SharedResponseDeserializer,
};
use aws_smithy_runtime_api::shared::IntoShared;
use aws_smithy_types::body::SdkBody;
use aws_smithy_types::config_bag::{ConfigBag, FrozenLayer, Layer};
use aws_smithy_types::timeout::Timeout... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | .body(SdkBody::empty())
.expect("OK response is valid")
.try_into()
.unwrap()))
}
}
#[derive(Debug)]
struct TestOperationRuntimePlugin {
builder: RuntimeComponentsBuilder,
}
impl TestOperationRuntimePlugin {
fn new() -> Self {... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | fn runtime_components(
&self,
_: &RuntimeComponentsBuilder,
) -> Cow<'_, RuntimeComponentsBuilder> {
Cow::Borrowed(&self.builder)
}
}
macro_rules! interceptor_error_handling_test {
(read_before_execution, $ctx:ty, $expected:expr,) => {
int... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | _ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorB called!");
Err("FailingInterceptorB".into())
}
}
#[derive(Debug)]
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | impl FailingInterceptorsOperationRuntimePlugin {
fn new() -> Self {
Self(
RuntimeComponentsBuilder::new("test")
.with_interceptor(SharedInterceptor::new(FailingInterceptorB))
.with_interceptor(SharedInter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeExecution, interceptor_name: Some("FailingInterceptorC"), source: Some("FailingInterceptorC") } })"#.to_string();
interceptor_error_handling_test!(
read_before_execution,
&BeforeSeriali... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | #[tokio::test]
#[traced_test]
async fn test_modify_before_retry_loop_error_handling() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeRetryLoop, interceptor_name: Some("FailingInterceptorC")"#.to_string();
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | &BeforeTransmitInterceptorContextRef<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_after_signing_error_handling() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ReadAfte... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | async fn test_read_after_transmit_error_handling() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterTransmit, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!(
read_after_transmit,
&BeforeDeserializationI... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | }
#[tokio::test]
#[traced_test]
async fn test_modify_before_attempt_completion_error_handling() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | read_after_execution,
&FinalizerInterceptorContextRef<'_>,
expected
);
}
macro_rules! interceptor_error_redirection_test {
(read_before_execution, $origin_ctx:ty, $destination_interceptor:ident, $destination_ctx:ty, $expected:expr) => {
interceptor_error_redi... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | ) -> Result<(), BoxError> {
tracing::debug!("DestinationInterceptor called!");
Err("DestinationInterceptor".into())
}
}
#[derive(Debug)]
struct InterceptorsTestOperationRuntimePlugin(RuntimeComponentsBuilder);
impl ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | };
}
#[tokio::test]
#[traced_test]
async fn test_read_before_execution_error_causes_jump_to_modify_before_completion() {
let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("DestinationInterceptor")"#;
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | }
#[tokio::test]
#[traced_test]
async fn test_read_after_serialization_error_causes_jump_to_modify_before_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("D... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | #[tokio::test]
#[traced_test]
async fn test_modify_before_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: So... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | #[tokio::test]
#[traced_test]
async fn test_modify_before_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: S... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | #[traced_test]
async fn test_modify_before_deserialization_error_causes_jump_to_modify_before_attempt_completion(
) {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_er... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | #[tokio::test]
#[traced_test]
async fn test_modify_before_attempt_completion_error_causes_jump_to_read_after_attempt() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterAttempt, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_error_redire... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | &runtime_plugins(),
StopPoint::None,
)
.await
.expect("success");
assert!(context.response().is_some());
// StopPoint::BeforeTransmit will exit right before sending the request, so there should be no response
let context = invoke_with_stop_point(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | &self,
_context: &mut BeforeTransmitInterceptorContextMut<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.modify_before_retry_loop_called
.store(true, Ordering:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 591c4c2d30408a0fb10cdae69818110b857061fb | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/591c4c2d30408a0fb10cdae69818110b857061fb/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | modify_before_completion(ctx, runtime_components, cfg);
read_after_execution(ctx, runtime_components, cfg);
});
}
#[cfg(all(test, any(feature = "test-util", feature = "legacy-test-util")))]
mod tests {
use crate::client::auth::no_auth::{NoAuthRuntimePluginV2, NO_AUTH_SCHEME_ID};
use crate::client::... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 670e6cc3654e72be13ff8189134e42a490d100f2 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/670e6cc3654e72be13ff8189134e42a490d100f2/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | use aws_smithy_runtime_api::client::ser_de::{
SharedRequestSerializer, SharedResponseDeserializer,
};
use aws_smithy_runtime_api::shared::IntoShared;
use aws_smithy_types::body::SdkBody;
use aws_smithy_types::config_bag::{ConfigBag, FrozenLayer, Layer};
use aws_smithy_types::timeout::Timeout... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 670e6cc3654e72be13ff8189134e42a490d100f2 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/670e6cc3654e72be13ff8189134e42a490d100f2/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | match maybe_deserialized {
Some(output_or_error) => output_or_error,
None => read_body(response)
.instrument(debug_span!("read_body"))
.await
.map_err(OrchestratorError::response)
.and_then(|_| {
let _span = debu... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | modify_before_completion(ctx, runtime_components, cfg);
read_after_execution(ctx, runtime_components, cfg);
});
}
#[cfg(all(test, any(feature = "test-util", feature = "legacy-test-util")))]
mod tests {
use crate::client::auth::no_auth::{NoAuthRuntimePlugin, NO_AUTH_SCHEME_ID};
use crate::client::or... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | _ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorB called!");
Err("FailingInterceptorB".into())
}
}
#[derive(Debug)]
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | impl FailingInterceptorsOperationRuntimePlugin {
fn new() -> Self {
Self(
RuntimeComponentsBuilder::new("test")
.with_interceptor(SharedInterceptor::new(FailingInterceptorB))
.with_interceptor(SharedInter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | ) -> Result<(), BoxError> {
tracing::debug!("DestinationInterceptor called!");
Err("DestinationInterceptor".into())
}
}
#[derive(Debug)]
struct InterceptorsTestOperationRuntimePlugin(RuntimeComponentsBuilder);
impl ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | #[tokio::test]
#[traced_test]
async fn test_modify_before_attempt_completion_error_causes_jump_to_read_after_attempt() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterAttempt, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_error_redire... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | &self,
_context: &mut BeforeTransmitInterceptorContextMut<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.modify_before_retry_loop_called
.store(true, Ordering:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:34 | impl RuntimePlugin for TestInterceptorRuntimePlugin {
fn runtime_components(
&self,
_: &RuntimeComponentsBuilder,
) -> Cow<'_, RuntimeComponentsBuilder> {
Cow::Borrowed(&self.builder)
}
}
let interceptor = TestIntercept... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | ab9867f7ca15b63f6751386db21d7f496082ddf3 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/ab9867f7ca15b63f6751386db21d7f496082ddf3/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,321 | 1,369 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:1 | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
use self::auth::orchestrate_auth;
use crate::client::interceptors::Interceptors;
use crate::client::orchestrator::http::{log_response_body, read_body};
use crate::client::timeout::{MaybeTimeout, MaybeTim... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1 | 60 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:2 | /// Defines types that work with HTTP types
mod http;
/// Utility for making one-off unmodeled requests with the orchestrator.
pub mod operation;
macro_rules! halt {
([$ctx:ident] => $err:expr) => {{
debug!("encountered orchestrator error; halting");
$ctx.fail($err.into());
return;
}};... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 41 | 100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:3 | (halt_on_err: { $($interceptor:ident($ctx:ident, $rc:ident, $cfg:ident);)+ }) => {
$(run_interceptors!(halt_on_err: $interceptor($ctx, $rc, $cfg));)+
};
(halt_on_err: $interceptor:ident($ctx:ident, $rc:ident, $cfg:ident)) => {
halt_on_err!([$ctx] => run_interceptors!(__private $interceptor($ctx,... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:4 | pub enum StopPoint {
/// Don't stop orchestration early
None,
/// Stop the orchestrator before transmitting the request
BeforeTransmit,
}
/// Same as [`invoke`], but allows for returning early at different points during orchestration.
///
/// Orchestration will cease at the point specified by `stop_po... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:5 | if !ctx.is_failed() {
try_op(&mut ctx, cfg, &runtime_components, stop_point).await;
}
finally_op(&mut ctx, cfg, &runtime_components).await;
if ctx.is_failed() {
Err(ctx.finalize().expect_err("it is failed"))
} else {
Ok(ctx)... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:6 | let resolved_timeout_config = cfg.load::<MergeTimeoutConfig>();
debug!(
"timeout settings for this operation: {:?}",
resolved_timeout_config
);
cfg.interceptor_state().store_put(resolved_timeout_config);
components.validate_final_config(cfg)?;
Ok(components)
}
#[instrument(skip_all... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:7 | let mut body = SdkBody::taken();
mem::swap(&mut body, ctx.request_mut().expect("set above").body_mut());
let loaded_body = halt_on_err!([ctx] =>
ByteStream::new(body).collect().await.map_err(OrchestratorError::other)
)
.into_bytes();
*ctx.request_mut().as_mut().expect... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 241 | 300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:8 | }
}
// Save a request checkpoint before we make the request. This will allow us to "rewind"
// the request in the case of retry attempts.
ctx.save_checkpoint();
let mut retry_delay = None;
for i in 1u32.. {
// Break from the loop if we can't rewind the request's state. This will always ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 281 | 340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:9 | // We continue when encountering a timeout error. The retry classifier will decide what to do with it.
continue_on_err!([ctx] => maybe_timeout);
// If we got a retry strategy from the bag, ask it what to do.
// If no strategy was set, we won't retry.
let should_attempt = halt_on_err!([c... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:10 | run_interceptors!(halt_on_err: {
modify_before_signing(ctx, runtime_components, cfg);
read_before_signing(ctx, runtime_components, cfg);
});
halt_on_err!([ctx] => orchestrate_auth(ctx, runtime_components, cfg).await.map_err(OrchestratorError::other));
run_interceptors!(halt_on_err: {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | runtime_components,
connector.call(request),
);
response_future.await.map_err(OrchestratorError::connector)
});
trace!(response = ?response, "received response from service");
ctx.set_response(response);
ctx.enter_before_deserialization_phase();
run_interceptors!(halt_on... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | trace!(output_or_error = ?output_or_error);
ctx.set_output_or_error(output_or_error);
ctx.enter_after_deserialization_phase();
run_interceptors!(halt_on_err: read_after_deserialization(ctx, runtime_components, cfg));
}
async fn finally_attempt(
ctx: &mut InterceptorContext,
cfg: &mut ConfigBag,
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | use aws_smithy_runtime_api::box_error::BoxError;
use aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolver;
use aws_smithy_runtime_api::client::auth::{
AuthSchemeOptionResolverParams, SharedAuthSchemeOptionResolver,
};
use aws_smithy_runtime_api::client::endpoint:... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | }
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedResponseDeserializer::new(
Response::builder()
.status(StatusCode::OK)
.body(SdkBody::empty())
.map_err(|err| OrchestratorError::other(Box::new(err)))
.map(Outp... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | builder: RuntimeComponentsBuilder::for_tests()
.with_retry_strategy(Some(SharedRetryStrategy::new(NeverRetryStrategy::new())))
.with_endpoint_resolver(Some(SharedEndpointResolver::new(
StaticUriEndpointResolver::http_localhost(8080),
))... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | };
(__private $interceptor:ident, $ctx:ty, $expected:expr, $($rc_arg:tt)*) => {
#[derive(Debug)]
struct FailingInterceptorA;
impl Intercept for FailingInterceptorA {
fn name(&self) -> &'static str { "FailingInterceptorA" }
fn $interceptor(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | &self,
_ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorC called!");
Err("FailingInterceptorC".into())
}
}
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_client_plugin(FailingInterceptorsClientRuntimePlugin::new())
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_handling() {
let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ReadBeforeSerialization, interceptor_name: Some("FailingInterceptorC"), source: Some("Faili... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ReadBeforeAttempt, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!(
read_before_attempt,
&BeforeTransmitInterceptorContextRef... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | #[tokio::test]
#[traced_test]
async fn test_modify_before_transmit_error_handling() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeTransmit, interceptor_name: Some("FailingInterceptorC")"#;
intercepto... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | &mut BeforeDeserializationInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_handling() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadBeforeDeserialization, intercept... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | async fn test_read_after_attempt_error_handling() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterAttempt, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!(
read_after_attempt,
&FinalizerInterceptorConte... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | struct OriginInterceptor;
impl Intercept for OriginInterceptor {
fn name(&self) -> &'static str { "OriginInterceptor" }
fn $origin_interceptor(
&self,
_ctx: $origin_ctx,
$($rc_arg)*
_cfg: &mut Co... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | }
}
impl RuntimePlugin for InterceptorsTestOperationRuntimePlugin {
fn runtime_components(&self, _: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> {
Cow::Borrowed(&self.0)
}
}
let input = Input::doesnt_... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | #[tokio::test]
#[traced_test]
async fn test_modify_before_serialization_error_causes_jump_to_modify_before_completion() {
let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("DestinationInterceptor")"#;
inter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | #[tokio::test]
#[traced_test]
async fn test_modify_before_retry_loop_error_causes_jump_to_modify_before_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("Destinat... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | #[traced_test]
async fn test_read_before_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("DestinationInterc... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | async fn test_read_before_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("DestinationInterceptor")"#;
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | async fn test_read_before_deserialization_error_causes_jump_to_modify_before_attempt_completion(
) {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_error_redirection_test!... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | #[traced_test]
async fn test_modify_before_completion_error_causes_jump_to_read_after_execution() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterExecution, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_error_redirection_test!(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | .await
.expect("success");
assert!(context.response().is_none());
}
/// The "finally" interceptors should run upon error when the StopPoint is set to BeforeTransmit
#[tokio::test]
async fn test_stop_points_error_handling() {
#[derive(Debug, Default)]
struct Inner {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | _cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.modify_before_completion_called
.store(true, Ordering::Relaxed);
Ok(())
}
fn read_after_execution(
&self,
_context: &... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:34 | .with_operation_plugin(NoAuthRuntimePlugin::new())
.with_operation_plugin(TestInterceptorRuntimePlugin {
builder: RuntimeComponentsBuilder::new("test")
.with_interceptor(SharedInterceptor::new(interceptor.clone()))
.with_http_client(Som... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/1b5a5c21d6fbdc30eddd14622189fe9c5cca8cbf/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,321 | 1,354 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:3 | (halt_on_err: { $($interceptor:ident($ctx:ident, $rc:ident, $cfg:ident);)+ }) => {
$(run_interceptors!(halt_on_err: $interceptor($ctx, $rc, $cfg));)+
};
(halt_on_err: $interceptor:ident($ctx:ident, $rc:ident, $cfg:ident)) => {
halt_on_err!([$ctx] => run_interceptors!(__private $interceptor($ctx,... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 81 | 140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:4 | pub enum StopPoint {
/// Don't stop orchestration early
None,
/// Stop the orchestrator before transmitting the request
BeforeTransmit,
}
/// Same as [`invoke`], but allows for returning early at different points during orchestration.
///
/// Orchestration will cease at the point specified by `stop_po... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:5 | finally_op(&mut ctx, cfg, &runtime_components).await;
if ctx.is_failed() {
Err(ctx.finalize().expect_err("it is failed"))
} else {
Ok(ctx)
}
}
.maybe_timeout(operation_timeout_config)
.await
}
.instrument(debug_span!(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:9 | .map_err(|err| OrchestratorError::timeout(err.into_source().unwrap()));
// We continue when encountering a timeout error. The retry classifier will decide what to do with it.
continue_on_err!([ctx] => maybe_timeout);
// If we got a retry strategy from the bag, ask it what to do.
// If ... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 321 | 380 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:10 | .await
.map_err(OrchestratorError::other));
run_interceptors!(halt_on_err: {
modify_before_signing(ctx, runtime_components, cfg);
read_before_signing(ctx, runtime_components, cfg);
});
halt_on_err!([ctx] => orchestrate_auth(ctx, runtime_components, cfg).await.ma... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 361 | 420 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:11 | let response_future = MaybeUploadThroughputCheckFuture::new(
cfg,
runtime_components,
connector.call(request),
);
response_future.await.map_err(OrchestratorError::connector)
});
trace!(response = ?response, "received response from service");
ctx.set_respon... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 401 | 460 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:12 | .instrument(debug_span!("deserialization"))
.await;
trace!(output_or_error = ?output_or_error);
ctx.set_output_or_error(output_or_error);
ctx.enter_after_deserialization_phase();
run_interceptors!(halt_on_err: read_after_deserialization(ctx, runtime_components, cfg));
}
async fn finally_attempt(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 441 | 500 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:13 | };
use aws_smithy_http_client::test_util::NeverClient;
use aws_smithy_runtime_api::box_error::BoxError;
use aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolver;
use aws_smithy_runtime_api::client::auth::{
AuthSchemeOptionResolverParams, SharedAuthSchemeOptionRes... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 481 | 540 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:14 | fn new_request_serializer() -> CannedRequestSerializer {
CannedRequestSerializer::success(HttpRequest::empty())
}
fn new_response_deserializer() -> CannedResponseDeserializer {
CannedResponseDeserializer::new(
Response::builder()
.status(StatusCode::OK)
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 521 | 580 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:15 | fn new() -> Self {
Self {
builder: RuntimeComponentsBuilder::for_tests()
.with_retry_strategy(Some(SharedRetryStrategy::new(NeverRetryStrategy::new())))
.with_endpoint_resolver(Some(SharedEndpointResolver::new(
StaticUriEndpoint... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 561 | 620 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:16 | ($interceptor:ident, $ctx:ty, $expected:expr) => {
interceptor_error_handling_test!(__private $interceptor, $ctx, $expected, _rc: &RuntimeComponents,);
};
(__private $interceptor:ident, $ctx:ty, $expected:expr, $($rc_arg:tt)*) => {
#[derive(Debug)]
struct FailingInter... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 601 | 660 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:17 | fn $interceptor(
&self,
_ctx: $ctx,
$($rc_arg)*
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
tracing::debug!("FailingInterceptorC called!");
Err("FailingInterceptorC".into())
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 641 | 700 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:18 | }
let input = Input::doesnt_matter();
let runtime_plugins = RuntimePlugins::new()
.with_client_plugin(FailingInterceptorsClientRuntimePlugin::new())
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlug... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 681 | 740 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:19 | modify_before_serialization,
&mut BeforeSerializationInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_serialization_error_handling() {
let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorE... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 721 | 780 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:20 | #[traced_test]
async fn test_read_before_attempt_error_handling() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ReadBeforeAttempt, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!(
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 761 | 820 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:21 | );
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_transmit_error_handling() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeTransmit, interceptor_name: Some("FailingInterceptorC")"#;
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 801 | 860 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:22 | interceptor_error_handling_test!(
modify_before_deserialization,
&mut BeforeDeserializationInterceptorContextMut<'_>,
expected
);
}
#[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_handling() {
let expected = r#"ResponseEr... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 841 | 900 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:23 | #[tokio::test]
#[traced_test]
async fn test_read_after_attempt_error_handling() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterAttempt, interceptor_name: Some("FailingInterceptorC")"#;
interceptor_error_handling_test!(
read_after_attempt,
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 881 | 940 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:24 | (__private $origin_interceptor:ident, $origin_ctx:ty, $destination_interceptor:ident, $destination_ctx:ty, $expected:expr, $($rc_arg:tt)*) => {
#[derive(Debug)]
struct OriginInterceptor;
impl Intercept for OriginInterceptor {
fn name(&self) -> &'static str { "OriginIn... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 921 | 980 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:25 | .with_interceptor(SharedInterceptor::new(DestinationInterceptor))
)
}
}
impl RuntimePlugin for InterceptorsTestOperationRuntimePlugin {
fn runtime_components(&self, _: &RuntimeComponentsBuilder) -> Cow<'_, RuntimeComponentsBuilder> {
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 961 | 1,020 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:26 | );
}
#[tokio::test]
#[traced_test]
async fn test_modify_before_serialization_error_causes_jump_to_modify_before_completion() {
let expected = r#"ConstructionFailure(ConstructionFailure { source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("DestinationInterceptor")"#;... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,001 | 1,060 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:27 | }
#[tokio::test]
#[traced_test]
async fn test_modify_before_retry_loop_error_causes_jump_to_modify_before_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeCompletion, interceptor_name: Some("D... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,041 | 1,100 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:28 | #[tokio::test]
#[traced_test]
async fn test_read_before_signing_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,081 | 1,140 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:29 | #[tokio::test]
#[traced_test]
async fn test_read_before_transmit_error_causes_jump_to_modify_before_attempt_completion() {
let expected = r#"DispatchFailure(DispatchFailure { source: ConnectorError { kind: Other(None), source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Som... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,121 | 1,180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:30 | #[tokio::test]
#[traced_test]
async fn test_read_before_deserialization_error_causes_jump_to_modify_before_attempt_completion(
) {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ModifyBeforeAttemptCompletion, interceptor_name: Some("DestinationInterceptor")"#;
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,161 | 1,220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:31 | #[tokio::test]
#[traced_test]
async fn test_modify_before_completion_error_causes_jump_to_read_after_execution() {
let expected = r#"ResponseError(ResponseError { source: InterceptorError { kind: ReadAfterExecution, interceptor_name: Some("DestinationInterceptor")"#;
interceptor_error_redirectio... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,201 | 1,260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:32 | StopPoint::BeforeTransmit,
)
.await
.expect("success");
assert!(context.response().is_none());
}
/// The "finally" interceptors should run upon error when the StopPoint is set to BeforeTransmit
#[tokio::test]
async fn test_stop_points_error_handling() {
#[derive(... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,241 | 1,300 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:33 | _context: &mut FinalizerInterceptorContextMut<'_>,
_rc: &RuntimeComponents,
_cfg: &mut ConfigBag,
) -> Result<(), BoxError> {
self.inner
.modify_before_completion_called
.store(true, Ordering::Relaxed);
O... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,281 | 1,340 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:34 | RuntimePlugins::new()
.with_operation_plugin(TestOperationRuntimePlugin::new())
.with_operation_plugin(NoAuthRuntimePlugin::new())
.with_operation_plugin(TestInterceptorRuntimePlugin {
builder: RuntimeComponentsBuilder::new("test")
... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 95985251a79e723c6926dad655628ba111dc4789 | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/95985251a79e723c6926dad655628ba111dc4789/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 1,321 | 1,356 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:4 | pub enum StopPoint {
/// Don't stop orchestration early
None,
/// Stop the orchestrator before transmitting the request
BeforeTransmit,
}
/// Same as [`invoke`], but allows for returning early at different points during orchestration.
///
/// Orchestration will cease at the point specified by `stop_po... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 3b61e78010e79d30cc38661acebacc6ff89ed84a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3b61e78010e79d30cc38661acebacc6ff89ed84a/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 121 | 180 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:5 | finally_op(&mut ctx, cfg, &runtime_components).await;
if ctx.is_failed() {
Err(ctx.finalize().expect_err("it is failed"))
} else {
Ok(ctx)
}
}
.maybe_timeout(operation_timeout_config)
.await
}
// Include a random, intern... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 3b61e78010e79d30cc38661acebacc6ff89ed84a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3b61e78010e79d30cc38661acebacc6ff89ed84a/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 161 | 220 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:6 | debug!(
"timeout settings for this operation: {:?}",
resolved_timeout_config
);
cfg.interceptor_state().store_put(resolved_timeout_config);
components.validate_final_config(cfg)?;
Ok(components)
}
#[instrument(skip_all, level = "debug")]
async fn try_op(
ctx: &mut InterceptorContex... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 3b61e78010e79d30cc38661acebacc6ff89ed84a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3b61e78010e79d30cc38661acebacc6ff89ed84a/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 201 | 260 |
awslabs/aws-sdk-rust:sdk/aws-smithy-runtime/src/client/orchestrator.rs:7 | mem::swap(&mut body, ctx.request_mut().expect("set above").body_mut());
let loaded_body = halt_on_err!([ctx] =>
ByteStream::new(body).collect().await.map_err(OrchestratorError::other)
)
.into_bytes();
*ctx.request_mut().as_mut().expect("set above").body_mut() =
Sd... | rust | rust | macro-heavy | awslabs/aws-sdk-rust | sdk/aws-smithy-runtime/src/client/orchestrator.rs | Apache-2.0 | 3b61e78010e79d30cc38661acebacc6ff89ed84a | github | sdk | https://github.com/awslabs/aws-sdk-rust/blob/3b61e78010e79d30cc38661acebacc6ff89ed84a/sdk/aws-smithy-runtime/src/client/orchestrator.rs | 241 | 300 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.