I have another error handling situation that I haven't figured out yet.
- build a CLI in dagger
- boot a VM (or anything outside of dagger)
- copy CLI to VM
- run CLI tests on VM
- delete the VM (cleanup external resources)
The problem is that I don't know when the pipeline failed and if I need to clean up. If I fail in 4, I need to cleanup, if I fail in 1, I do not need to.
There used to be an idea for dagger down that would have the reverse of some steps. Maybe it would be better to have something like WithDefer, which creates an unwind stack? Perhaps this could have conditions for running like pass, fail, always?