-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(deps): Update tower to v0.5
#23186
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?
Conversation
- Adjustments of Buffer type definition in Tower 0.5 - As policy is directly modified in Tower 0.5. Removed the policy part in the RetryPolicyFuture. - The change args to mutable for the retry function and clone_request function. It's changed in Tower 0.5. - Changed the RetryPolicyFuture Output to (). This is also changed in Tower 0.5. - Modified some tests as policy is now modified in advance function;
…these stats ranges are related with the test params.
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.
Found a couple of bugs otherwise LGTM
self.previous_duration + self.current_duration, | ||
self.max_duration, | ||
); | ||
self.remaining_attempts -= 1; |
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.
self.remaining_attempts -= 1; | |
self.remaining_attempts = self.remaining_attempts.saturating_sub(1); |
let next_duration: Duration = cmp::min( | ||
self.previous_duration + self.current_duration, | ||
self.max_duration, | ||
); |
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.
let next_duration: Duration = cmp::min( | |
self.previous_duration + self.current_duration, | |
self.max_duration, | |
); | |
let sum = self.previous_duration.checked_add(self.current_duration) | |
.unwrap_or(Duration::MAX); | |
let next_duration = cmp::min(sum, self.max_duration); |
Example:
previous_duration = 30s
current_duration = 40s
max_duration = 60s
next_duration = 60s
Summary
Change Type
Is this a breaking change?
How did you test this PR?
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.References
#22431