Skip to content

debug and file log handler support for hyperion-blueapi#1630

Open
rtuck99 wants to merge 5 commits intomainfrom
1377_debug_log_handler
Open

debug and file log handler support for hyperion-blueapi#1630
rtuck99 wants to merge 5 commits intomainfrom
1377_debug_log_handler

Conversation

@rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Feb 13, 2026

Fixes #1377

Adds debug and file log handler support for hyperion-blueapi

The behaviour of LOG_DIR and DEBUG_LOG_DIR has changed slightly - previously if not specified then the log file location would be calculated from the BEAMLINE environment variable as /dls_sw/<beamline>logs/bluesky and /dls/tmp/<beamline>/logs/bluesky respectively, now it requires both environment variables to be specified explicitly.

The run_hyperion.sh launcher script has been updated accordingly which should result in no change in normal usage, however this should reduce the potential to accidentally write to the wrong file locations in test.

Link to dodal PR (if required): #N/A
(remember to update pyproject.toml with the dodal commit tag if you need it for tests to pass!)

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

Checks for reviewer

  • Would the PR title make sense to a user on a set of release notes

@rtuck99 rtuck99 added the hyperion Issues for Hyperion, the Bluesky UDC stack label Feb 13, 2026
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.87%. Comparing base (ac02784) to head (ccfc509).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1630      +/-   ##
==========================================
+ Coverage   92.86%   92.87%   +0.01%     
==========================================
  Files         153      154       +1     
  Lines        8645     8661      +16     
==========================================
+ Hits         8028     8044      +16     
  Misses        617      617              
Components Coverage Δ
i24 SSX 78.60% <ø> (ø)
hyperion 98.23% <100.00%> (+<0.01%) ⬆️
other 98.33% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rtuck99 rtuck99 marked this pull request as ready for review February 13, 2026 16:58
@rtuck99 rtuck99 requested a review from a team as a code owner February 13, 2026 16:58
Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

Thanks, one main comment. Additionally, the original issue says:

Decide whether we want debug and/or file logging, and if so that hyperion-blueapi supports them

Was the conversation had about dropping some of this support? I'm not sure how much the (non-debug) file is used given it's all in graylog anyway?

Also, does this close #1208? I guess it also relates to #1213?

]


def load_centre_collect(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think it would be fine to not have the wrapper here for some of these plans and just add the inject into the plan itself. My concern is that e.g. the we change behaviour and update the docstring of the underlying plan but forget to update here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that #1564 would complicate this somewhat since at least for LoadCentreCollect the internal parameters are not serializable; that PR creates a separate external parameter type which essentially makes this wrapper mandatory.

@rtuck99
Copy link
Contributor Author

rtuck99 commented Feb 17, 2026

As per discussion - I find the file logging useful, at any rate.

Also, does this close #1208? I guess it also relates to #1213?

With regards to #1213 this doesn't address that yet - as far as this PR goes it is squarely aimed at getting hyperion-blueapi to functional parity with the non-blueapi hyperion, and doesn't aim to cater for k8s deployment. Although I think in most cases the debug log output would probably fit in a typical kubernetes volume since it is persisted on error.

As for #1208 I guess it partially addresses this, at least in the non-k8s case

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

Labels

hyperion Issues for Hyperion, the Bluesky UDC stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug, file logging handlers for hyperion-blueapi

2 participants

Comments