Nodes in the context are not serialized #1353
Labels
priority/critical-blocking
must be resolved before next release
priority/important
topic/workflows
type/bug
Milestone
This is a bug that exists in the old version of
plumpy
that is being used by all current releases anddevelop
. It does not exist in the newplumpy
and therefore in theworkflows
branch. This bug is also the real underlying reason for issue #1292 .The problem is that the
context
ofWorkChains
is not serialized, which means that if a user populates it with nodes, when theWorkChain
is persisted, the node instances themselves are pickled. When the instance is recreated from the pickle, the node instance is reloaded from the pickled object. For django this is not a problem, but for SqlAlchemy, however, the session that contained the oldDbNode
reference is gone, and when the node instance is restored, accessing it will lead to aDetachedInstanceError
because theDbNode
has not been reinserted into the session.The solution is simple, the context simply has to be serialized. While we are at it, we should use the same serialization that is used in
workflows
to serialize the inputs.The text was updated successfully, but these errors were encountered: