-
Notifications
You must be signed in to change notification settings - Fork 1.8k
enhancement(aws_s3 sink): Add ability to configure request errors to retry #23206
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
base: master
Are you sure you want to change the base?
enhancement(aws_s3 sink): Add ability to configure request errors to retry #23206
Conversation
…l errors. Added retry_all_errors to S3SinkConfig and S3RetryLogic structs. Setting retry_all_errors to the default value in the generate_config function. Added self.retry_all_errors to the condition in the is_retriable_error function. (vectordotdev#10870)
…. Changed retry_all_errors to Option<bool>.
… Added configured_to_retry and check_response functions to s3_common/config.rs. Added configured_to_retry call to is_retriable_error result in RetryLogic. (vectordotdev#10870)
…nd replaced them with retry_logic in S3SinkConfig. (vectordotdev#10870)
…ogic rather than unwrap_or. (vectordotdev#10870)
Chapman, Joe B seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "vector" | |||
version = "0.48.0" |
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.
Please don't bump the vector version, we have our own release process
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.
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.
cargo vdev check version
is not a required CI check AFAIK, you can ignore this and revert the changes to Cargo.* files
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.
make check-version
is recommended to be included in the pre-push hooks. I can skip that check if that's the best way to avoid the version requirement error.
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.
I've reverted the change.
src/sinks/s3_common/config.rs
Outdated
/// A vector list of status codes matching specific error types that trigger failed | ||
/// service retry attempts. The list is ignored if `retry_all_errors` is true. |
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.
/// A vector list of status codes matching specific error types that trigger failed | |
/// service retry attempts. The list is ignored if `retry_all_errors` is true. | |
/// A list of HTTP status codes matching specific error types that trigger failed | |
/// service retry attempts. This list is ignored if `retry_all_errors` is true. |
…umentation comment for errors_to_retry. (vectordotdev#10870)
Summary
Adds a new field, a retry_logic struct, to S3SinkConfig that allows user to specify types of response errors to retry. Users can specify specific status codes of error responses of failed requests they want to be automatically retried, or they can specify all failed requests to be automatically retried.
Change Type
Is this a breaking change?
How did you test this PR?
access_key_id
to an invalid one. Verified the failed authentication service was retried when the configuration required it to and didn't when the configuration didn't require it to. Ran tests with different values forretry_logic
,retry_all_errors
, anderrors_to_retry
:Used this configuration:
Does this PR include user facing changes?
Notes
@vectordotdev/vector
to reach out to us regarding this PR.pre-push
hook, please see this template.cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo nextest run --workspace
(alternatively, you can runcargo test --all
)./scripts/check_changelog_fragments.sh
git merge origin master
andgit push
.Cargo.lock
), pleaserun
cargo vdev build licenses
to regenerate the license inventory and commit the changes (if any). More details here.