Add support for dry-run to the plug-in system
|Reported by:||Nicklas Nordborg||Owned by:||Nicklas Nordborg|
Description (last modified by )
There is a wish in ticket #1028 that it should be possible to run a plug-in in dry-run mode. In principle it is not very complicated since the plug-in only has to skip the call to
DbControl.commit() and no changes will be saved to the database.
The problem is what to do after the dry-run. If everything is ok, the user will probably want to run the plug-in again but without the dry-run flag. If there was a problem, the user wants to change the parameters. Neither of this is currently possible. The only workaround is to start with a new job with the same parameters (except for the dry-run flag). This kind of limits the usefulness of a dry-run flag since it is error-prone to have to enter the same parameters a second time.
The first case (everything is ok) can be solved by introducing a new return status for jobs:
DONE_DRY_RUN. This could be used to trigger a "Run again" button in the GUI that runs the plug-in without the dry-run flag.
The second case is (failure) is more problematic and is covered in a separate ticket #1082.