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
add jobs support #95
add jobs support #95
Conversation
import time | ||
import urllib | ||
from dcos import config, errors, http | ||
|
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 don't know Python's style rules. Should there be another newline here?
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.
added
break | ||
else: | ||
raise ex | ||
time.sleep(5) |
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.
Maybe want to make this a defaulted parameter to the method.
try: | ||
response = get_run(job_id, run_id) | ||
except errors.DCOSHTTPException as ex: | ||
if ex.response.status_code == 404: |
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.
Is there somewhere that has a list of these constants? Also, I've seen a bunch of tests fail flakily due to occasional 404s returned lately. Are you sure you want to fail on 404? What if something like 502 is returned forever, does this just run forever?
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.
Also, I believe there's already a generic spin implementation somewhere in shakedown.
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.
Generic spinner: spinner.wait_for
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.
Made a few comments. Address as seems appropriate to you.
return job_id | ||
|
||
|
||
def wait_for_run(job_id, run_id, duration=5): |
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.
It doesn't look like duration
is used anywhere.
retest this please |
2 similar comments
retest this please |
retest this please |
shakedown has a dependency on dcos-cli which provides access for functions and features like this. https://github.com/dcos/dcos-cli/blob/master/dcos/metronome.py is the way to enable this behavior. |
the dcos-cli will be released this week and scott will provide an update in shakedown when the release happens. That makes this PR redundant. |
examples of how to use are here: https://github.com/dcos/metronome/blob/master/tests/system/test_root_metronome.py it currently uses a local copy of metronome prior to the PR being merged into dcos-cli. |
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.
This is redundant and isn't the recommended approach.
Any opposition to making shakedown depend on dcos master, so we don't have
to wait weeks for functionality to support tests? I think sacrificing
repeatable builds is worth the productivity tradeoff for a testing tool
like this
…On Dec 5, 2016 09:43, "Ken Sipe" ***@***.***> wrote:
***@***.**** requested changes on this pull request.
This is redundant and isn't the recommended approach.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#95 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJYhqD6A3UnOrWWCPrjlzzxPxov_hVvks5rFE0xgaJpZM4LC3dY>
.
|
No description provided.