Skip to content

Add error message when failing to load DAQModule plugins#365

Open
eflumerf wants to merge 3 commits into
developfrom
eflumerf/AddErrorMessage
Open

Add error message when failing to load DAQModule plugins#365
eflumerf wants to merge 3 commits into
developfrom
eflumerf/AddErrorMessage

Conversation

@eflumerf

Copy link
Copy Markdown
Member

Description

Add an ers::error report of DAQModuleCreationFailed to ensure output when running in unit tests.

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Optimization (non-breaking change that improves code/performance)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (dunedaq_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Comments here on the testing

Further checks

  • Code is commented where needed, particularly in hard-to-understand areas
  • Code style is correct (dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)
  • If applicable, new tests have been added or an issue has been opened to tackle that in the future.
    (Indicate issue here: # (issue))

@eflumerf eflumerf requested a review from bieryAtFnal June 26, 2026 17:54
@eflumerf

Copy link
Copy Markdown
Member Author

Possibly something in DUNE-DAQ/logging#45

@bieryAtFnal bieryAtFnal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that I see the following message in the output from the appfwk unit tests when I use the code on this branch.

2026-Jun-30 10:57:36,136 ERROR [dunedaq::appfwk::make_module(...) at /home/nfs/biery/dunedaq/30JunFDDevLBIteratorTesting/sourcecode/appfwk/include/appfwk/detail/DAQModule.hxx:48] Failed to create DAQModule error_test of type not_a_real_plugin_name
  IllegalUnderscore. Library specification "not_a_real_plugin_name" contains an illegal underscore.

@eflumerf

Copy link
Copy Markdown
Member Author

I confirm that I see the following message in the output from the appfwk unit tests when I use the code on this branch.

2026-Jun-30 10:57:36,136 ERROR [dunedaq::appfwk::make_module(...) at /home/nfs/biery/dunedaq/30JunFDDevLBIteratorTesting/sourcecode/appfwk/include/appfwk/detail/DAQModule.hxx:48] Failed to create DAQModule error_test of type not_a_real_plugin_name
  IllegalUnderscore. Library specification "not_a_real_plugin_name" contains an illegal underscore.

Wait, this is really interesting! Apparently, the unit test has been testing the wrong thing all this time! The intent was to test trying to load a plugin type that doesn't exist, but apparently we've actually been testing an invalid plugin name format!

@bieryAtFnal

Copy link
Copy Markdown
Contributor

I confirm that I now see two "new" error messages:

2026-Jun-30 11:36:55,152 ERROR [dunedaq::appfwk::make_module(...) at /home/nfs/biery/dunedaq/30JunFDDevLBIteratorTesting/sourcecode/appfwk/include/appfwk/detail/DAQModule.hxx:48] Failed to create DAQModule error_test of type not_a_valid_plugin_name
	was caused by: 2026-Jun-30 11:36:55,152 ERROR [ers::Issue::Issue(...) at /tmp/root/spack-stage/spack-stage-ers-NB_DEV_260630_A9-75xklo2djghuvo5ygosqin2djbaadupl/spack-src/src/Issue.cpp:102] ---- LogicError BEGIN
  IllegalUnderscore. Library specification "not_a_valid_plugin_name" contains an illegal underscore.
  The class name and path to it may not contain an underscore. If this is a configuration error, plase correct it; if the module's class name or its location within its enclosing package really do have an underscore this situation must be rectified.
---- LogicError END

and

2026-Jun-30 11:38:54,476 ERROR [dunedaq::appfwk::make_module(...) at /home/nfs/biery/dunedaq/30JunFDDevLBIteratorTesting/sourcecode/appfwk/include/appfwk/detail/DAQModule.hxx:48] Failed to create DAQModule error_test of type not-a-real-plugin-name
	was caused by: 2026-Jun-30 11:38:54,476 ERROR [ers::Issue::Issue(...) at /tmp/root/spack-stage/spack-stage-ers-NB_DEV_260630_A9-75xklo2djghuvo5ygosqin2djbaadupl/spack-src/src/Issue.cpp:102] ---- Configuration BEGIN
  UnknownPlugin
  ---- Configuration BEGIN
    Library specification "not-a-real-plugin-name" does not correspond to any library in CET_PLUGIN_PATH of type "duneDAQModule"
  ---- Configuration END
  Plugin not-a-real-plugin-name with version Unknown was not registered.
  Perhaps your plugin type is misspelled or is not a plugin recognized by this
  system.
---- Configuration END

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

Successfully merging this pull request may close these issues.

3 participants