Conversation
In very specific cases, it might be desirable to fallback to another task when the target task fails. Most commonly this will be falling back to the `complete` task when the `upgrade` fails due to the firmware not having a previous firmware. The fallback will only occur if the failure is withing the tasks functions so checks before and after the task do not trigger a fallback (i.e. issues with archive or config file) This is inspired by nerves-project/nerves#682
|
Thanks! There's already a task failback code with The options that I can think of are to specify I'll think more and take a look. This feels like it could end up being a small change. |
|
I started to notice the inflexible fallback, but didn't quite see how we could make it fallback to another task vs just repeating existing tasks instructions. I like the idea of N fallbacks. I think using the |
|
Let me take a look this week. I'll post back. |
Based on the discussion in fwup-home#185 The idea is that you can specify a list of tasks with `-t` and fwup will try each one until the first success supporting a "fallback" behavior
In very specific cases, it might be desirable to fallback to another
task when the target task fails. Most commonly this will be falling
back to the
completetask when theupgradefails due to the firmwarenot having a previous firmware.
The fallback will only occur if the failure is withing the tasks functions
so checks before and after the task do not trigger a fallback (i.e. issues
with archive or config file)
This is inspired by nerves-project/nerves#682