-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Engine: fix bug that allowed non-storable inputs to be passed to proc…
…ess (#5532) The basic assumption for a `Process` in `aiida-core` is that all of its inputs should be storable in the database as nodes. Under the current link model, this means that they should be instances of the `Data` class or subclasses thereof. There is a noticeable exception for ports that are explicitly marked as `non_db=True`, in which case the value is not linked as a node, but is stored as an attribute directly on the process node itself, or not stored whatsoever. This basic rule was never explicitly enforced, which made it possible to define processes that would happily take non-storable inputs. The input would not get stored in the database, but would be available within the processes lifetimes from the `inputs` property allowing it to be used. This will most likely result into unintentional loss of provenance. The reason is that the default `valid_type` of the top-level inputs namespace of the `Process` class was never being set to `Data`. This meant that any type would be excepted for a `Process` and all its subclasses unless the valid type of a port was explicitly overridden. This meant that for normal dynamic namespaces, even non-storable types would be accepted just fine. Setting `valid_type=Data` for the input namespace of the `Process` class fixes the problem therefore.
- Loading branch information
Showing
4 changed files
with
460 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.