Skip to content

Fix session metadata for PM#947

Draft
emmuhamm wants to merge 2 commits into
developfrom
emmuhamm/session-metadata-fix
Draft

Fix session metadata for PM#947
emmuhamm wants to merge 2 commits into
developfrom
emmuhamm/session-metadata-fix

Conversation

@emmuhamm

@emmuhamm emmuhamm commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #807

Update the session metadata in the PM publish method so that the correct session is transmitted to the influxdb and shows up properly in the grafana dashboards.

TODO

Things to discuss

  • the first commit of this PR is the minimal number of changes required, which only injects the srue session name in the publish call. This is done via the drunc_session field.

  • The second commit changes the session name in the process manager configuration itself, which is the default session that is being sent to the database. Will need to discuss if this is fine

  • will need to discuss how to fix the ERS logging call itself..

    • this basically boils down to [this bit of code(https://github.com/DUNE-DAQ/erskafka/blob/8027bd9dfe24bcca4a09b8697d45ecb773671b9b/python/erskafka/ERSPublisher.py#L74). Should be easy enough to change and workaround by having an eg. session_name in the ers_logger handler thing, BUT we should figure out why the session is tied to the environment variable in the first place...

Type of change

  • New feature / enhancement

Suggested manual testing checklist

LIST COMMANDS TO DEMONSTRATE CHANGE

Developer checklist

Prior to marking this as "Ready for Review"

Tests ran on: WHAT HOSTNAME from release RELEASE_NAME

Unit tests - some tests can't be ran on the CI. This is documented. If this PR checks a feature that can't be tested with CI, this has been marked appropriately.

Integration tests - the daqsystemtest_integtest_bundle requires a lot of resources, and connections to the EHN1 infrastructure. Check the cross referenced list if you can't run these. The developer needs to run at least the .

  • Unit tests (pytest --marker) passed
    • With relevant marker
    • Without marker
  • Integration tests passed
    • Only daqsystemtest_integtest_bundle.sh -k minimal_system_quick_test.py
    • Full daqsystemtest_integtest_bundle.sh
  • Testing skipped as there are no core code changes in this PR, this only relates to documentation/CI workflows
  • Drunc integration tests pass (./scripts/drunc_integtest_bundle.sh)

Final checklist prior to marking this as "Ready for Review"

  • Code is clearly commented.
  • New unit tests have been added, or is documented in # ISSUE NUMBER
  • A suitable reviewer has been chosen from this list.

Reviewer checklist

  • This branch has been rebased with develop prior to testing.
  • Suggested manual tests show changes.
  • CI workflows fails documented (if present)
  • Integration tests passed (on either np0x or IC HEP clusters)
    • Use the following guidelines to determine which of the integration tests you need to run
      • You do not need to run any integration tests if
        • Code changes are not associated with src/
        • PR changes only affect docstrings
        • In this case, be sure to validate any suggested manual testing.
      • Run only the minimum integration test as daqsystemtest_integtest_bundle.sh -k minimal_system_quick_test.py if
        • PR changes only affect a few log entries
        • PR changes are small, and do not have a large impact on the workflow (use carefully)
      • Otherwise run the full integration test bundle as daqsystemtest_integtest_bundle.sh
    • What to do if the integration tests fail?
      • Only concern yourself if failures related to drunc are in the log files
      • If non-drunc failure appears:
        • Validate failure in fresh working area
        • Contact Pawel if unsure
  • If you have ran the full integration test bundle, leave a comment on the PR stating
    • Which host the integration tests have ran on
    • [Optional] A copy of the test summary
  • Drunc integration tests pass (scripts/drunc_integtest_bundle.sh)

Once the above boxes are checked, the PR(s) can be merged following the steps below.

Prior to merging

Choose one of the following an complete all substeps
  • Changes only affect the Run Control, are in a single repository, and do not affect the end user.
    • Changes are documented in docstrings and code comments
    • Wiki has been updated if architectural or endpoint changes
  • Otherwise
    • Workflow changes demonstrated in the Change Log (if necessary)
    • Wiki has been updated (if necessary)
    • #dunedaq-integration Slack channel notified (see below)

Once completed, the reviewer can merge the PR.

Notification message for a Slack channel

Note - this should be to #dunedaq-integration for general workflow that isn't during a release candidate period, and to #daq-release-prep otherwise.

For an single merge that changes the user workflow

The CCM WG has an isolated PR ready to merge that affects user workflows. The PR is:

_URL_

I will leave time for any comments, otherwise will merge these at the end of the work day _Insert your time zone_.

For co-ordinated merge

The CCM WG has a set of co-ordinated merges ready to merge. The PRs are:

_URL_

_URL_


I will leave time for any comments, otherwise will merge these at the end of the day.

@emmuhamm emmuhamm self-assigned this Jun 15, 2026
@emmuhamm emmuhamm force-pushed the emmuhamm/session-metadata-fix branch from 16ba270 to 5bc6845 Compare June 22, 2026 08:47
@emmuhamm

Copy link
Copy Markdown
Contributor Author

cc @PawelPlesniak

session metadata procss manager
#947
Code is pretyt much ready to go in, altough i havent tested it in great detail
Session data now is sent into the dashboards, but the code as is does not solve #807, especially with initialising the ers log handler.
this might require a bit of thinking..

@emmuhamm emmuhamm requested review from PawelPlesniak and Copilot and removed request for Copilot June 29, 2026 10:43
@PawelPlesniak

Copy link
Copy Markdown
Collaborator

I think the solution to this should be analogous to that of the opmon publisher, where we have a custom_origin type catchall for variables that we inject through to the publisher. This may be done in **kwargs, but I will leave this for a discussion with you and Marco when everyone has some more time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Improve the way session names are handelled in the process manager

3 participants