Skip to content

Checks for 10 minutes left for countdown#1622

Open
adaudon wants to merge 9 commits intomainfrom
1601-Countdown
Open

Checks for 10 minutes left for countdown#1622
adaudon wants to merge 9 commits intomainfrom
1601-Countdown

Conversation

@adaudon
Copy link
Contributor

@adaudon adaudon commented Feb 9, 2026

Fixes #1601

Requires DiamondLightSource/dodal#1922

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

@adaudon adaudon added the enhancement New feature or request label Feb 9, 2026
olliesilvester and others added 7 commits February 13, 2026 15:47
* Use protocols instead of smargon type for FGS composite

* Rename devices to gonio in all plans

* Include generic type everywhere in plan
* Add skip for CI pre-commit for uv lock file update
* Implement robot unload for udc default state
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

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

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

@adaudon adaudon marked this pull request as ready for review February 16, 2026 15:52
@adaudon adaudon requested a review from a team as a code owner February 16, 2026 15:52
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, I've added a few comments


LOGGER.info(f"Synchrotron beam countdown is {countdown} seconds")

if countdown < 600:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should: Can you pull this into a constant?


LOGGER.info(f"Synchrotron beam countdown is {countdown} seconds")

if countdown < 600:
Copy link
Contributor

Choose a reason for hiding this comment

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

Must: We need to do this check before we start every collection. This is just doing it once when the baton gets handed over

Comment on lines +97 to +99
_raise_udc_completed_alert(get_alerting_service())
# Release the baton for orderly exit from the instruction loop
yield from _unrequest_baton(baton)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could: If we're going to do these two finishing steps together in a few places then we might as well pull them into a new function

_raise_udc_completed_alert(get_alerting_service())
# Release the baton for orderly exit from the instruction loop
yield from _unrequest_baton(baton)
raise PlanError("Synchrotron machine countdown too low")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should: I don't think we need to raise here? It's a happy-path operation, like reaching the end of the agamemnon queue

@DominicOram DominicOram added the hyperion Issues for Hyperion, the Bluesky UDC stack label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hyperion Issues for Hyperion, the Bluesky UDC stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hyperion should stop 10 minutes before a scheduled beam dump

4 participants

Comments