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

Add retry on errors for update command #91

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

g-gaston
Copy link
Member

Description of changes:

Introduces a new flag (--retry-errors) to configure update to retry indefinitely when a error happens. The retry code uses back-off and jitter, with different back-off formulas depending on the type of error.

This flag is mutually exclusive with --once. The default behavior is still the "fail fast" mode: the creds file is continuously updated before the creds expire but the program exists if an error is encountered.

This new retry mode is useful when running update as a background unattended process, for example as a systemd service. The user could could handle retries in the service itself, however that mechanism wouldn't be aware of the type of error and it might make difficult to make the retries intelligent taking into account things like the type of errors.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

1 participant