Update of variables in RESERVED state
The variable update seems to work only in certain states (maybe for good reasons). READY, WAITING and FIZZLED seem to works. In RESERVED state, the update does nothing (neither an update nor change of state). There should be some error message telling us about impossible update. If the update is possible it should be implemented. Silence should mean that everything "worked". Also the docs should include a sentence about valid variable states for this operation.
As a work around the RESERVED state: %rerun var
and then var := ...
.
Also the RESERVED state is a complex state: with %rerun the interpreter does not seem to cancel the pending or running slurm job. There is a function from the VRE Middleware API that does all cleanups safely and correctly.
One small feature can be very helpful: to simply cancel evaluation (%cancel var
?). This is part of the actions to perform %rerun
and update (using :=
). It also makes sense to have it because the update is not atomic - it has two stages: cancel job and change the state, then update with changing the state again. The second stage depends on the first. The first stage cannot be undone if the second fails.
In addition, %cancel
can be interpreted in different ways: for WAITING and READY maybe equivalent to pause, for FIZZLED to archive, for RUNNING and RESERVED -> to cancel (final state can be different).
This issue is related to issue #421 (closed).