Open srl295 opened 2 years ago
still happens on latest bugwarrior aa660b258f95e29b07508f555ddc639e9cbdab82
I think the problem here is that the service = github
run was aborted due to a critical error, BUT all remaining open tasks were closed anyway.
To repro:
bugwarrior-pull --dry-run
The stack doesn't reflect the function below but it might be a similar issue. If there's an exception, issues won't accumulate.
https://github.com/ralphbean/bugwarrior/blob/develop/bugwarrior/services/github.py#L333-L344
def get_query(self, query):
…
issues = {}
for issue in self.client.get_query(query):
…
try:
…
except ValueError as e:
log.critical(e) # error printed here
else:
issues[url] = (repo, issue) # not reached
return issues # issues = {} still!
The stack doesn't reflect the function below but it might be a similar issue. If there's an exception, issues won't accumulate.
https://github.com/ralphbean/bugwarrior/blob/develop/bugwarrior/services/github.py#L333-L344
def get_query(self, query): … issues = {} for issue in self.client.get_query(query): … try: … except ValueError as e: log.critical(e) # error printed here else: issues[url] = (repo, issue) # not reached return issues # issues = {} still!
This is an appealing explanation, but the problem is it isn't clear how these ConnectionError
's (which inherit from OSError
) could lead to a ValueError
given the exception hierarchy.
edit: Per #897 I now realize that requests.exceptions.ConnectionError != ConnectionError
. That said, the logic stands because requests.exceptions.ConnectionError
ultimately still inherits from OSError
.
v1.8.0 or maybe da98f3ee88a8c84716985cb2bb834ede74eac09e
When offline or barely online, a connection error is causing tasks to get closed:
The JIRA tasks did not get the same treatment.
Rerunning bugwarrior-pull with a good connection caused the tasks to reopen, of course.