-
Notifications
You must be signed in to change notification settings - Fork 94
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
no preparing data-store jobs, decrement submit-num on restart #5011
no preparing data-store jobs, decrement submit-num on restart #5011
Conversation
1c2956a
to
1cb2dbe
Compare
387c45c
to
8e5c277
Compare
I have written an integration test at dwsutherland#7 Turned out to be tricky. I couldn't figure out how to successfully test that the job gets put in the data store on the second try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested as working 🎉 Thanks @dwsutherland for going above and beyond the call of duty to get this done after midnight 💐
@MetRonnie - Merged in. Looks like there's nothing in the store yet. I put this:
above the test you're trying to run:
and they were all empty:
but from the log .. the job was submitted .. so perhaps the test happened before it was run or after the job finished (and was deleted). |
b5b1eea
to
4164d1b
Compare
@MetRonnie - Test working now! 🎉 Just added a 2nd yield to allow the scheduler to do some more processing, and it worked:
(added another to the first, just to be consistent) Thanks |
4164d1b
to
2633b94
Compare
hmm.. new test seems flaky |
2633b94
to
0d74179
Compare
Ok looks like that's done it (added a pause and sleep to the task) |
Also, just to confirm, with the decrement commented out:
the test fails
So we're good 👍 |
I was hoping to avoid being reliant on sleep durations for waiting for it to appear in the data store, may need to revisit this post-8.0.0 otherwise the test could end up being flaky |
Well, the problem is the workflow needs time to run to a point where there's a job... And that's exactly what your ascyncio sleep was doing (along with yielding control), because if you yield for too long then the workflow will complete before you run the tests.. So I had to extend the run time of the workflow with sleep. Not ideal, I agree.. but at least the ordinary sleep is in the task script... I think you'd need to make it a functional test otherwise (where the task outputs the graphql to a file) |
Ok after wrestling with bash syntax I have managed to convert it into a non-flaky functional test: dwsutherland#9 Sorry for the revert Update: I have gone ahead and pushed that onto this branch, to speed things along |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I am happy with the codebase changes)
🎉 nice work all |
These changes close #4994
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.