Also add --no-destroy cli option
Details
Tests amended. Run few tasks to check if vms are (not) being destroyed.
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Not sure I understand why the uuid_dir change is grouped in with this one but it makes sense.
Works well for me locally.
The reason being that if we failed before creating RemoteRunner (e.g. on connecting to the machine), we would get tb (keyerror on 'artifactsdir') on:
# finalization log.info('Execution finished at: %s. Task artifacts were saved in: %s', datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC'), task_runner.arg_data['artifactsdir'])
libtaskotron/runner.py | ||
---|---|---|
123–124 | Your approach here is to stop remote execution in case of keyboard interrupt or a remote error, clean up, and then continue execution as if nothing has happened (it can even return 0 as an exit code). Is there a reason for that? I would rather do this:
| |
129 | Please get rid of debug here. I see no reason to avoid teardown when running in debug mode. That was a temporary measure before --no-destroy was implemented. Now we have it and don't need to keep the hack around. | |
424 | "do not destroy disposable client at the end of task execution" might be clearer | |
500–501 | In D550 I recommended Lukas to move this line to process_args(). I think it fits there. |
True but that's been stalled for a while and I'm not sure it's worth waiting for unless it picks up momentum again.
Your approach here is to stop remote execution in case of keyboard interrupt or a remote error, clean up, and then continue execution as if nothing has happened (it can even return 0 as an exit code). Is there a reason for that?
I would rather do this: