Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ProcessBuilder
: Include metadata inputs in get_builder_restart
The `get_builder_restart` method on the `ProcessNode` base class would return a `ProcessBuilder` with the inputs set to those attached to that node instance. The `CalcJobNode` would override this to add the metadata options as well. This would be ok for `CalcJobNode`s, but if a restart builder was created from a `WorkChainNode` that calls a `CalcJobNode` it would have also received options, but those would not be restored. One could think that when calling `get_restart_builder` on a `WorkChainNode` that we can just go down the callstack, find all the `CalcJobNode`s and set the options in the respective input namespaces. But this would not exactly reproduce the original inputs, as the options that a calculation job has received could have been a modified version of the original options passed to the workchain, changed in the logic of the workchain. Instead, now that the exact metadata inputs for each process are stored in the attribute of the node, added in the previous commit, it is this dictionary that is used to restore the exact original inputs. It not only addresses the problem of incorrect `CalcJob` options, but it also restores any other metadata inputs such as the `label` and `description`.
- Loading branch information