Just reading the code real quick (haven't actually tested it, sorry), wouldn't 
all the `import_tool` tasks always end up being recorded as 'complete' since 
the error is caught and passed along to a new task?  We had (still have) this 
same situation with repo_clone tasks, and it makes it misleading when looking 
at the original task and seeing it's state is "complete" instead of "error".  I 
thought we were going to try to avoid repeating that anti-pattern that in this 
ticket.

Using a context manager e.g. 
https://sourceforge.net/p/allura/pastebin/5220d8170910d42e8a113a68 would be 
better overall I think, and also allow you to make a single change (like 
re-raising the exception to address my previous paragraph) in just one place 
instead of throughout numerous codebases.


---

** [tickets:#6530] Improve error handling / reporting on tool importer failure**

**Status:** code-review
**Labels:** import 
**Created:** Wed Aug 07, 2013 08:46 PM UTC by Cory Johns
**Last Updated:** Fri Aug 30, 2013 04:57 PM UTC
**Owner:** Tim Van Steenburgh

Currently, if a tool importer fails, the only record of the failure is in the 
monq_task record.  Failures need to be caught and the users notified in some 
way.  A catch-all should be put in place in the `import_tool` task, but 
individual tools may want to handle reporting differently, such as the repo 
clone failure notification that is already in place and we need to ensure that 
the catch-all doesn't duplicate any per-tool handling.

Partial imports also need to be considered and we might want to decide if a 
partially failed import is worth rolling back the entire tool import or if the 
importer should handle a failed ticket, e.g., gracefully and continue to import 
the rest of the tickets if possible.


---

Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed 
to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.

Reply via email to