GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
732 stars 209 forks source link

Fail if one of the services failed #1017

Closed Lykos153 closed 4 months ago

Lykos153 commented 8 months ago

Due to the limitations in the gitlab API, I have configured multiple instances of the same gitlab repo to sync all MRs and issues I am interested in. When one of them fails to pull (eg. due to bad connection or today's gitlab availability issues), bugwarrior closes all respective tasks in taskwarrior. They do get re-opened once all pulls succeed during a consecutive run, but it would be nice to have the option to just fail the whole run in such cases.

An alternative would be to expose metrics from the pull to the pre_import hook, so it can decide whether to fail or not.

ryneeverett commented 8 months ago

Are you using the latest release (1.8.0) or the develop branch?

Related and/or duplicate issues: #897 and #866.

Lykos153 commented 8 months ago

I'm on 15ac6a2197f490db3cf9b5a4a934b5a41804ce76

ryneeverett commented 6 months ago

Triage:

ryneeverett commented 4 months ago

I reviewed #866 and the sync logic again and still don't see how this behavior is possible. The message f"Aborted [{target}] due to critical error." is logged in collect.py, indicating bugwarrior is aware that the service failed. In db.py, the tasks to close are a subset of the tasks that did not fail.

To be clear, aborting the pull when one service fails is not ideal behavior and I don't want to revert to that unless there is compelling evidence that it is necessary. If you or anyone else has logs or insights into how this is possible I'd be happy to reconsider.