Skip to content

Deferred moves fix - #2244

Merged
DominicOram merged 6 commits into
mainfrom
deferred_moves_fix
Nov 3, 2026
Merged

DominicOram merged 6 commits into
mainfrom
deferred_moves_fix

Conversation

@jacob-williamson

Copy link
Copy Markdown
Contributor

Fixes deferred move issue seen with the i15-1 hexapod.

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 scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@jacob-williamson
jacob-williamson requested a review from a team as a code owner October 22, 2026 14:21
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.30%. Comparing base (01e660f) to head (75e0838).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2244   +/-   ##
=======================================
  Coverage   99.30%   99.30%           
=======================================
  Files         376      376           
  Lines       14798    14803    +5     
=======================================
+ Hits        14695    14700    +5     
  Misses        103      103           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DominicOram DominicOram 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.

Thanks, couple of comments. @DiamondLightSource/developers-mx-daq also use this, are they happy with the change?


for axis, value in moves.items():
await wait_for_value(axis.motor_done_move, 1, timeout=5)
assert math.isclose(await axis.user_readback.get_value(), value, abs_tol=0.1)

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.

Should: I think at some point we probably want to remove this assert, it's only here atm to make sure that we're actually doing the move we expect, can you add an issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread src/dodal/devices/defered_move_utils.py Outdated
Comment on lines +82 to +83
for axis, value in moves.items():
await wait_for_value(axis.motor_done_move, 1, timeout=5)

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.

Could: We could do this with a gather, in practice it won't give us much though

Comment on lines 57 to 58
axes will move at the same time. The put callbacks on the axes themselves will
only come back after the motion on that axis finished.

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.

Should: I think you need a comment either here or below to say that we check the done move as we can't always rely on the callback based on experience

@DominicOram DominicOram 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.

Thanks. I still think MX need to take a look, I mentioned it to @rtuck99 yesterday

@jacob-williamson

Copy link
Copy Markdown
Contributor Author

Will hold off on merging until then

@rtuck99 rtuck99 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.

Looks reasonably harmless

@DominicOram
DominicOram enabled auto-merge (squash) November 3, 2026 13:15
@DominicOram
DominicOram merged commit fd2db7c into main Nov 3, 2026
10 of 11 checks passed
@DominicOram
DominicOram deleted the deferred_moves_fix branch November 3, 2026 13:20
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