[Feature] Adjusts request signing timestamps - #3906
Conversation
1b3f4d1 to
969f1d6
Compare
| @@ -320,6 +309,10 @@ HttpResponseOutcome AWSClient::AttemptExhaustively(const Aws::Http::URI& uri, | |||
| {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}}); | |||
| if (outcome.IsSuccess()) | |||
| { | |||
| if (m_enableClockSkewAdjustment && outcome.GetResult()) | |||
There was a problem hiding this comment.
why are we only measuring clockskew if the result is success? wouldnt we also want to measure for failures?
There was a problem hiding this comment.
On a failed attempt, AdjustClockSkew runs (AWSClient.cpp:358) and calls m_clientSkew->EvaluateFailure(...), which calls RecordResponse as its first step
|
|
||
| // A MockAWSClient whose error responses carry a service error code via the x-amzn-errortype header | ||
| // (the header a JSON error marshaller reads), so a clock-skew retry can be exercised end to end. | ||
| class ClockSkewMockAWSClient : public MockAWSClient |
There was a problem hiding this comment.
why do you need this in addition to mock aws client? why do you need to override BuildAWSError when supplying a expected response to a public API is how that class is supposed to be used?
There was a problem hiding this comment.
We needed a separate class because MockAWSClient::BuildAWSError doesnt return the service error code that clock skew detection checks.
I do agree we dont have to override buildAWSError tho, dropped the override and based it on AWSJsonClient so errors now go through the real JsonErrorMarshaller
Issue #, if available:
Description of changes:
Wire clock-skew correction into the legacy and smithy client pipelines
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.