-
Notifications
You must be signed in to change notification settings - Fork 50
Add helper to check for transient errors #537
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
db54eb6
update cert
TingDaoK 5a1c4f2
try again?
TingDaoK b0ca10d
try the AI solution
TingDaoK c035210
added helper for transient errors
e661031
lint and add test to CMake
b47d755
switch to is_retryable
c7b2986
thank god for squash merge
6922e83
comments fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIID7DCCAtSgAwIBAgIJALEv6FDrJ/8NMA0GCSqGSIb3DQEBCwUAMIGaMQswCQYD | ||
| VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEP | ||
| MA0GA1UECgwGQW1hem9uMQ0wCwYDVQQLDARTREtzMRIwEAYDVQQDDAlsb2NhbGhv | ||
| c3QxMDAuBgkqhkiG9w0BCQEWIWF3cy1zZGstY29tbW9uLXJ1b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gOrE7FtvIG7kYNVuOEPeInOHkOuq | ||
| ryDisB1PwiyPNIbqdQIDAQABo1IwUDATBgNVHSUEDDAKBggrBgEFBQcDATAaBgNV | ||
| HREEEzARgglsb2NhbGhvc3SHBH8AAAEwHQYDVR0OBBYEFA1xMLFkbCGnUD5dfnF7 | ||
| 5Wcuz9kUMA0GCSqGSIb3DQEBCwUAA4IBAQCYcyTKwaOiX+MFYiNlu5M704XlDefx | ||
| UiUCsCZ2quT3x6HNufSa+L+6UGR5kxeGKqTU2lt4Vd7Lw7A7j7l+8LFEXeIskjH9 | ||
| qZFYyeArgEOX/1dW70ZX4ACQy1Pgwv7+QYqloeaTosHU7KJB5ti2Y+ZbQNmeX9n1 | ||
| grtq/Yww8LqFEBADT8lIwkY+gn0XDJX1RiVuWpWZV7eh9CfyaVl1mHu+oitoJFB8 | ||
| pWV2bGvaRGof/ItoxtjST3GpIq8cMgxX6fUR/CEtANjTImV2mA7vvaDrO7xnTMQA | ||
| lVByJeGJjR0hiR4Q6FeDvOtCGj5deejz/7HZiplhY+uJs4TPmsxR7oGI | ||
| -----END CERTIFICATE----- |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /** | ||
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| * SPDX-License-Identifier: Apache-2.0. | ||
| */ | ||
|
|
||
| #include <aws/http/http.h> | ||
| #include <aws/testing/aws_test_harness.h> | ||
|
|
||
| static int s_test_http_error_code_is_retryable(struct aws_allocator *allocator, void *ctx) { | ||
| (void)allocator; | ||
| (void)ctx; | ||
|
|
||
| int error_code = 0; | ||
| ASSERT_FALSE(aws_http_error_code_is_retryable(error_code)); | ||
|
|
||
| { | ||
| error_code = AWS_ERROR_HTTP_CONNECTION_CLOSED; | ||
| ASSERT_TRUE(aws_http_error_code_is_retryable(error_code)); | ||
| } | ||
| { | ||
| error_code = AWS_ERROR_HTTP_SERVER_CLOSED; | ||
| ASSERT_TRUE(aws_http_error_code_is_retryable(error_code)); | ||
| } | ||
|
|
||
| error_code = AWS_ERROR_SUCCESS; | ||
| ASSERT_FALSE(aws_http_error_code_is_retryable(error_code)); | ||
|
|
||
| return AWS_OP_SUCCESS; | ||
| } | ||
|
|
||
| AWS_TEST_CASE(test_http_error_code_is_retryable, s_test_http_error_code_is_retryable); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding
AWS_ERROR_HTTP_PROXY_CONNECT_FAILED_RETRYABLE.AWS_ERROR_HTTP_STREAM_MANAGER_CONNECTION_ACQUIRE_FAILUREis tricky that we basically throw this for everything failed to get the connection when using stream manager.Let's add a TODO/notes, chat with Swift SDK team, and see how they retries and how much they can be benefit from this change.