You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ProcessBuilderNamespace of unrelated processes can interfere with each other, because their properties are set on the ProcessBuilderNamespace class instead of the specific instance.
In [1]: fromtest_procimportFirst, SecondIn [2]: builder=First.get_builder()
In [3]: Second.get_builder() # We simply construct this builder, and do nothing with it. In [5]: builder.a() # The default for 'a' has changed to the lambda defined in `Second`.Out[5]: <Int: uuid: fb6a1556-9f34-4d32-b7ea-cc2800ee00ef (unstored) value: 2>In [6]: builder.c# This should raise, since `First` doesn't have a 'c' input.
EDIT: When actually running the workchain, the default is populated correctly, and validation is also correct. I guess this slightly lowers the severity, but depending on how the user manipulates the builder it could still lead to incorrect inputs.
@sphuber one option to resolve this would be just implementing a __getattr__ instead of the dynamically-created properties. But I think this would break auto-completion - am I right in thinking this was the reason to go with the properties in the first place?
Describe the bug
The
ProcessBuilderNamespace
of unrelated processes can interfere with each other, because their properties are set on theProcessBuilderNamespace
class instead of the specific instance.Steps to reproduce
WorkChain code:
Inspect builder behavior:
EDIT: When actually running the workchain, the default is populated correctly, and validation is also correct. I guess this slightly lowers the severity, but depending on how the user manipulates the builder it could still lead to incorrect inputs.
Your environment
develop
branchAdditional context
This is a follow-up from a discussion from #4419
The text was updated successfully, but these errors were encountered: