Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Begin timeout #66

Merged
merged 4 commits into from
May 19, 2020
Merged

BUG: Begin timeout #66

merged 4 commits into from
May 19, 2020

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented May 15, 2020

Description

This PR fixes a race condition in Daq.begin that would cause failed starts when the external scripts we call get slow. There was an assumption that the timeout for begin would only account for pydaq time, but this is not the case.

Now we have separate timeouts for begin and for the external scripts.

Motivation and Context

#65

How Has This Been Tested?

Locally with the real DAQ, hopefully the tests still pass

Where Has This Been Documented?

This will be in the notes for the next release.

@ZLLentz
Copy link
Member Author

ZLLentz commented May 15, 2020

I have requested reviews from everyone who was in the slack chat, but do not feel obligated to review. I just want to bring awareness to what happened here for the curious.

Copy link
Contributor

@ZryletTC ZryletTC left a comment

Choose a reason for hiding this comment

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

I don't have a full grasp of what's going on here so I'd prefer if someone else also reviewed but the logic looks sound.

I can't comment there since it's not part of your commits but should lines 450 and 453 of daq.py be changed to set_finished and set_exception?

pcdsdaq/daq.py Show resolved Hide resolved
pcdsdaq/ext_scripts.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #66 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #66   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          770       779    +9     
=========================================
+ Hits           770       779    +9     
Impacted Files Coverage Δ
pcdsdaq/daq.py 100.00% <100.00%> (ø)
pcdsdaq/ext_scripts.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8351255...1c10a11. Read the comment docs.

@ZLLentz ZLLentz merged commit b93bb81 into pcdshub:master May 19, 2020
@ZLLentz ZLLentz deleted the begin-timeout branch May 19, 2020 17:43
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