Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG?: Internal signals do not run metadata callbacks? #1146

Open
tangkong opened this issue Aug 8, 2023 · 1 comment
Open

BUG?: Internal signals do not run metadata callbacks? #1146

tangkong opened this issue Aug 8, 2023 · 1 comment

Comments

@tangkong
Copy link
Contributor

tangkong commented Aug 8, 2023

Current Behavior

The aggregate signals in lightpath_summary sometimes don't believe internal signals it holds onto are connected. We do ask that callbacks be run when we subscribe, but somewhere this isn't happening for InternalSignal

Expected Behavior

Internal signals should report themselves as connected

Context / environment

looking at sp1l0, which had its lightpath_summary not be connected.
Credit to @ZLLentz for debugging this live

Steps to Reproduce (for bugs)

  1. Load sp1l0
  2. sp1l0.connected = False
  3. sp1l0.lightpath_summary.connected = False
  4. [sig for sig in sp1l0.lightpath_summary._signals.values() if sig.connected] is empty
  5. sp1l0.xtal_out._run_metadata_callbacks()
  6. [sig for sig in sp1l0.lightpath_summary._signals.values() if sig.connected] is now not empty

Suggested Solution

Call ._run_metadata_callback at some point, ideally on subscribe (which should be happening...), or possible on init/set/get

@klauer
Copy link
Contributor

klauer commented Aug 8, 2023

We have a hack for this in typhos and proposed a fix in ophyd a few years ago:
pcdshub/typhos#267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants