Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: pex_config
-
Labels:None
-
Story Points:8
-
Epic Link:
-
Sprint:DRP S20-6 (May)
-
Team:Data Release Production
-
Urgent?:No
Description
Config field instances that correspond to a RegistryField have an internal member, _field, pointing back to the original field. _field points to the same object for all config instances corresponding to the same config. This causes a rare bug where calling ConfigChoiceField.freeze locks the registry for all config instances using that RegistryField, including instances that did not exist at the time of the call. See my post on #dm for a specific example.
Please change the code so that independently created config instances no longer affect each other. This issue appears to be a side effect of the fix for DM-17757, and may be difficult to fix without introducing still other side effects.
I wonder if the solution isn't to, on freezing the config, copy the RegistryField/ConfigChoiceField instead of calling its freeze() method. You'd still have the benefits of frozen registries, but they'd be decoupled from the original, publicly visible RegistryField.