Fix/falcon layout xml #313
No Reviewers
Labels
Clear labels
issue::not confirmed
issue::not reproducible
issue::reproducible
priority::critical
priority::needed
priority::nice to have
scope::backend
scope::frontend
stage::in development
stage::on hold
stage::pre_release
stage::ready for review
stage::selected for development
stage::weekly backlog
type::bug
type::discussion
type::doc
type::feature
type::improvement
type::test
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Used if an issue has not yet been confirmed by a developer
Used if an issue is not reproducible
Used if a developer was able to reproduce the issue
Should be done as soon as possible
An important update to the code base
Not really needed but a good improvement
An issue regarding the backend services
An issue regarding the user-facing services
This issue is currently being worked on
Something is blocking the development
For issues that have been merged into a pre-release branch and are waiting for their release.
For issues that have been resolved and are ready for review
This issue has been selected for development but has not been scheduled yet
This issue has been selected for development for the next development cycle
It's a bug!
A discussion is wanted/needed
Improvements to the documentation
A new feature
Neither a feature nor a bug but an improvement to the code base
Missing tests or improvements to the test suite
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
acerbo_a (acerbo_a)
bec-gitea
debenjak_l (debenjak_l)
diaz (diaz)
divall_e (divall_e)
guizar_m (guizar_m)
haghta_s (haghta_s)
holler (holler)
lombosi_c (lombosi_c)
malu_s (malu_s)
menzel (menzel)
perl_d (perl_d)
usov_i (usov_i)
wakonig_k (wakonig_k)
wang_x1 (wang_x1)
wyzula_j (wyzula_j)
zamofing_t (zamofing_t)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: bec/csaxs_bec#313
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
_initialize_detector_backend wrote a bare layout.xml into the HDF5 plugin. The IOC resolves that against its own working directory, where no such file exists — the cSAXS SITORO IOC ships it as cfg/layout.xml — so BEC overwrote a correct value with a broken one on every device init. The failure is silent: an unreadable layout doesn't raise, the plugin simply refuses to open the output file later with status=-1, the real cause buried in XMLErrorMsg_RBV. Now set to the path the IOC can resolve, and verified after writing.
The second commit is the prefix trap. The init took (*args, **kwargs), and the device server builds init kwargs by intersecting deviceConfig keys with the named parameters of the signature — so prefix was silently discarded and the Falcon was built with an empty one. Every signal then pointed at a bare suffix (HDF1:FilePath_RBV instead of X12SA-SITORO:HDF1:FilePath_RBV) and instantiation failed listing several hundred unreachable PVs. That reads exactly like a dead IOC, and was diagnosed as one for two hours while caget worked fine from the same host.
Merged into current main: 101 failed / 551 passed / 12 skipped, against a baseline of 101 failed / 532 passed.
_initialize_detector_backend put a bare "layout.xml" into the HDF5 plugin. The IOC resolves that relative to its own working directory, where no such file exists: the cSAXS SITORO IOC ships the layout as cfg/layout.xml (installed at /ioc/X12SA-CPCL-FALCONX1/cfg/layout.xml), and that is what the IOC configures at startup. BEC was overwriting a correct value with a broken one on every device init. The failure was silent and badly signposted. An unreadable layout does not raise; the plugin simply refuses to open the output file later, reporting "Error opening file ..., status=-1" with the actual cause buried in XMLErrorMsg_RBV. Because a caget taken before a BEC device reload showed the IOC's own valid value, the two readings disagreed and the layout looked innocent. The default is now cfg/layout.xml, overridable per deployment with an xml_file_name key in deviceConfig ("" selects the plugin's built-in layout), and on_connected reads XMLValid_RBV back and logs an error naming the file and the IOC's message if the layout was rejected. The existing on_connected test asserted the broken value; it now asserts the default constant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KLnmUurqcNd1FiDY5M2uZr