Skip to content
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

retry.Retryable(): don't re-try context.DeadlineExceeded #67

Closed
wants to merge 1 commit into from

Conversation

Al2Klimov
Copy link
Member

It is considered temporary and timeout, but we don't want to retry on it.

@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Aug 19, 2024
Copy link
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context for this PR is provided in #23 (comment).

retry/retry.go Outdated Show resolved Hide resolved
It is considered temporary and timeout, but we don't want to retry on it.
oxzi
oxzi previously approved these changes Aug 26, 2024
@oxzi oxzi added this to the 0.3.2 milestone Aug 26, 2024
@yhabteab
Copy link
Member

yhabteab commented Sep 2, 2024

Are you sure this won't break something? There is already a special handling for ctx and network I/O errors here.

// Retryable function may have exited prematurely due to context errors.
// We explicitly check the context error here, as the error returned by the retryable function can pass the
// error.Is() checks even though it is not a real context error, e.g.
// https://cs.opensource.google/go/go/+/refs/tags/go1.22.2:src/net/net.go;l=422
// https://cs.opensource.google/go/go/+/refs/tags/go1.22.2:src/net/net.go;l=601
if errors.Is(ctx.Err(), context.DeadlineExceeded) || errors.Is(ctx.Err(), context.Canceled) {

@oxzi oxzi dismissed their stale review September 3, 2024 08:49

(。・_・。)

@yhabteab yhabteab removed this from the 0.4.0 milestone Sep 3, 2024
@yhabteab
Copy link
Member

yhabteab commented Sep 3, 2024

This breaks the retry logic as stated in #67 (comment) , so it is not going to happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants