Skip to content

Add retry, error handling for agamemnon and blueapi requests#1690

Open
rtuck99 wants to merge 4 commits intomainfrom
1688_supervisor_exits_unable_to_connect_blueapi
Open

Add retry, error handling for agamemnon and blueapi requests#1690
rtuck99 wants to merge 4 commits intomainfrom
1688_supervisor_exits_unable_to_connect_blueapi

Conversation

@rtuck99
Copy link
Copy Markdown
Contributor

@rtuck99 rtuck99 commented Apr 1, 2026

Fixes

Also partially addresses

On encountering a connection error when making a request to hyperion-blueapi, hyperion-supervisor should now attempt a further 2 more retries before giving up.

Other errors or failure after exhausting retries should cause hyperion-supervisor to end UDC and release the baton, raise an error alert but not exit.

Similarly receiving a timeout error, 50x HTTP error or a connection error when requesting the next instruction from agamemnon, should result in up to 2 more retries, any other error or exhaustion of the retries should result in hyperion-supervisor releasing the baton with and raise an error alert but remaining running awaiting the baton.

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. Tests pass
  2. Behaviour is as described above

Checks for reviewer

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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.92%. Comparing base (ab5ce12) to head (13b7f0c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1690      +/-   ##
==========================================
+ Coverage   92.87%   92.92%   +0.04%     
==========================================
  Files         155      155              
  Lines        8495     8546      +51     
==========================================
+ Hits         7890     7941      +51     
  Misses        605      605              
Components Coverage Δ
i24 SSX 77.35% <ø> (ø)
hyperion 98.61% <100.00%> (+0.02%) ⬆️
other 98.31% <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 added the hyperion Issues for Hyperion, the Bluesky UDC stack label Apr 1, 2026
@rtuck99 rtuck99 marked this pull request as ready for review April 8, 2026 15:46
@rtuck99 rtuck99 requested a review from a team as a code owner April 8, 2026 15:46
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.

1 participant