The new retries and retry_wait settings are great to work around unstable connections.
Only issues is that Borgmatic still exits with code 1, as opposed to 0, even if the final retry succeeds.
Steps to reproduce (if a bug)
Add retries and retry_wait settings
Run some command that fails and later succeeds (by e.g. disconnecting from the internet for a few seconds)
Borgmatic returns with exit code 1 even if the command succeeded after a retry.
Expected behavior (if a bug)
The exit code should be 0 if any retry succeeds.
Other notes / implementation ideas
Environment
borgmatic version: 1.5.23
borgmatic installation method: PyPi
Borg version: 1.2.0
Python version: Python 3.9.2
operating system and version: Debian 11
#### What I'm trying to do and why
The new `retries` and `retry_wait` settings are great to work around unstable connections.
Only issues is that Borgmatic still exits with code `1`, as opposed to `0`, even if the final retry succeeds.
#### Steps to reproduce (if a bug)
1. Add `retries` and `retry_wait` settings
2. Run some command that fails and later succeeds (by e.g. disconnecting from the internet for a few seconds)
3. Borgmatic returns with exit code `1` even if the command succeeded after a retry.
#### Expected behavior (if a bug)
The exit code should be `0` if any retry succeeds.
#### Other notes / implementation ideas
#### Environment
**borgmatic version:** 1.5.23
**borgmatic installation method:** PyPi
**Borg version:** 1.2.0
**Python version:** Python 3.9.2
**operating system and version:** Debian 11
The original retry feature was actually a PR (#432).
Anyway, I just pushed a fix for this to master, which will be part of the next release. Thanks again for pointing out this issue!
The original retry feature was actually a PR (#432).
Anyway, I just pushed a fix for this to master, which will be part of the next release. Thanks again for pointing out this issue!
What I'm trying to do and why
The new
retries
andretry_wait
settings are great to work around unstable connections.Only issues is that Borgmatic still exits with code
1
, as opposed to0
, even if the final retry succeeds.Steps to reproduce (if a bug)
retries
andretry_wait
settings1
even if the command succeeded after a retry.Expected behavior (if a bug)
The exit code should be
0
if any retry succeeds.Other notes / implementation ideas
Environment
borgmatic version: 1.5.23
borgmatic installation method: PyPi
Borg version: 1.2.0
Python version: Python 3.9.2
operating system and version: Debian 11
Confirmed this issue with a local repro! Thanks so much for reporting it.
Thanks for this feature. It's something I was missing. Already added it to the template on our setup page and will also add it to the Ansible role. 👍
The original retry feature was actually a PR (#432).
Anyway, I just pushed a fix for this to master, which will be part of the next release. Thanks again for pointing out this issue!
Released in borgmatic 1.6.0!