DiamondLightSource / DiamondLightSource/mx-bluesky
The parameters model contains multiple copies of FeatureFlags
- Dominant language
- Python
- Stars
- 4
- Forks
- 5
- Avg merge
- 1d 30m
- Merged PRs (30d)
- 2
Description
`FeatureFlags`/`HyperionFeatureFlags` is exposed by `WithHyperionUDCFeatures`
`WithHyperionUDCFeatures` is inherited by many different parameter classes, some of which aggregate instances of each other, this leads to multiple copies of the `FeatureFlags` being present.
`FeatureFlags` is stateful; it requires `update_self_from_server()` to be invoked to fetch the current config server state and override the defaults.
Not doing this consistently/failing to replicate the state across instances can lead to bugs.
`FeatureFlags` shouldn't really be in the parameter model anyway as it's not determined on a per-request basis.
It should be injected separately as context at the entry of each plan, and to callbacks where it's needed for event handling.
Contributor guide
Assessment
This issue has not been assessed yet.