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.

@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 pushed a commit to cloudquery/plugin-pb-go that referenced this pull request Apr 30, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/avast/retry-go/v4](https://github.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://github.com/avast/retry-go/releases/tag/v4.6.0)

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

#### What's Changed

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

#### New Contributors

-   [@&#8203;natenho](https://github.com/natenho) made their first contribution in [avast/retry-go#116
-   [@&#8203;FarmerChillax](https://github.com/FarmerChillax) made their first contribution in [avast/retry-go#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://github.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