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

Introduce UntilSucceeded option to improve readability #116

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

natenho
Copy link
Contributor

@natenho natenho commented Apr 15, 2024

Hello, IMHO, the Attemps(0) approach leads to surprises as it has no clear meaning.

So with this PR, instead of

Attempts(0)

You should also be able to write

UntilSucceeded()

And the code becomes much more clear to read and understand.

Attemps(0) will continue to work, but I think it should be removed in another major version, in favor of a more intuitive API.

Also, I've made small changes in docs.

Verified

This commit was signed with the committer’s verified signature.
TulgaCG Tulgacan
@natenho natenho changed the title Introduce UntilSucceeded option to improve semantic Introduce UntilSucceeded option to improve readability Apr 15, 2024
@natenho
Copy link
Contributor Author

natenho commented Apr 15, 2024

The unsuccessful check has nothing to do with the PR

@JaSei
Copy link
Collaborator

JaSei commented Apr 18, 2024

Hi @natenho thanks for you PR

@JaSei JaSei merged commit c7fe1f1 into avast:master Apr 18, 2024
10 of 11 checks passed
kodiakhq bot referenced this pull request in cloudquery/plugin-pb-go Apr 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/avast/retry-go/v4](https://togithub.com/avast/retry-go) | require | minor | `v4.5.1` -> `v4.6.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>avast/retry-go (github.com/avast/retry-go/v4)</summary>

### [`v4.6.0`](https://togithub.com/avast/retry-go/releases/tag/v4.6.0)

[Compare Source](https://togithub.com/avast/retry-go/compare/4.5.1...4.6.0)

#### What's Changed

-   Introduce UntilSucceeded option to improve readability by [@&#8203;natenho](https://togithub.com/natenho) in [https://github.com/avast/retry-go/pull/116](https://togithub.com/avast/retry-go/pull/116)
-   Fix the inconsistency in the number of times passed in onRetry by [@&#8203;FarmerChillax](https://togithub.com/FarmerChillax) in [https://github.com/avast/retry-go/pull/114](https://togithub.com/avast/retry-go/pull/114)
-   Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/avast/retry-go/pull/112](https://togithub.com/avast/retry-go/pull/112)

#### New Contributors

-   [@&#8203;natenho](https://togithub.com/natenho) made their first contribution in [https://github.com/avast/retry-go/pull/116](https://togithub.com/avast/retry-go/pull/116)
-   [@&#8203;FarmerChillax](https://togithub.com/FarmerChillax) made their first contribution in [https://github.com/avast/retry-go/pull/114](https://togithub.com/avast/retry-go/pull/114)

**Full Changelog**: avast/retry-go@v4.5.1...v4.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjkuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMyOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants