ref(scheduler): rework the way deis run is handled, timeouts and more#738
ref(scheduler): rework the way deis run is handled, timeouts and more#738helgi merged 1 commit intodeis:masterfrom
Conversation
|
I also need to update the deis cli - Originally I wasn't really hot on updating the API which would require a CLI update but |
Current coverage is 85.70%@@ master #738 diff @@
==========================================
Files 29 29
Lines 2567 2573 +6
Methods 0 0
Messages 0 0
Branches 404 403 -1
==========================================
+ Hits 2168 2205 +37
+ Misses 286 253 -33
- Partials 113 115 +2
|
|
Backing out the API change in this PR and moving it to a separate one that will depend on this one |
7e2509e to
7e44adb
Compare
| # TODO: Revisit in the future so it can run longer | ||
| state = 'up' # pod is still running | ||
| waited = 0 | ||
| timeout = 1200 # 20 minutes |
There was a problem hiding this comment.
Could this re-use the actual gunicorn timeout?
from deis import gconf
timeout = gconf.timeoutThere was a problem hiding this comment.
We can't do that since that's the overall timeout for the worker and there are many other pod waits ahead of this 1200 second limit. If we used the gunicorn timeout then the worker would always timeout before the while loop would catch - I felt it was better to have a hardcoded one, not based on the gunicorn worker limit.
Use the same "is the pod ready" function as normal deployments, also give deis run 20 mins max (arbitrary but is somewhat what the gunicorn worker can do) This also the API to return exit_code instead of the cryptic rc value On failure the whole Pod manifest is no longer returned. This change affects how we do tests here but minimally Mocking was improved to help move a Pod from Pending to Running and if it is a deis run Pod (not attached to RC) then it also goes to Succeeded state. This helps with test coverage but is not the full Pod state transition route
|
This also fixes #590 |
Summary of Changes
Use the same "is the pod ready" function as normal deployments, also give deis run 20 mins max (arbitrary but is somewhat what the gunicorn worker can do)
On failure the whole Pod manifest is no longer returned. This change affects how we do tests here but minimally
Mocking was improved to help move a Pod from Pending to Running and if it is a deis run Pod (not attached to RC) then it also goes to Succeeded state. This helps with test coverage but is not the full Pod state transition route
Issue(s) that this PR Closes
Fixes #681
Fixes #590
Associated End To End Test PR(s)
deis run already has e2e
Associated Documentation PR(s)
Documentation still needs to be updated to handle the little change in API
Testing Instructions
Please provide a detailed list for how to test the changes in this PR.
deis runcommand