-
Notifications
You must be signed in to change notification settings - Fork 14
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
ENH: small tune ups to "jobs -s" output in case of missing external (datalad) #516
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
|
||
from reproman.dochelpers import exc_str | ||
from reproman.interface.base import Interface | ||
from reproman.support.external_versions import MissingExternalDependency | ||
from reproman.support.jobs.local_registry import LocalRegistry | ||
from reproman.support.jobs.orchestrators import ORCHESTRATORS | ||
from reproman.resource import get_manager | ||
|
@@ -97,11 +98,16 @@ def show_oneline(job, status=False): | |
""" | ||
fmt = "{status}{j[_jobid]} on {j[resource_name]} via {j[submitter]}$ {cmd}" | ||
if status: | ||
orc = _resurrect_orc(job) | ||
orc_status = orc.status | ||
_, queried_status = orc.submitter.status | ||
if orc_status == queried_status: | ||
# Drop repeated status (e.g., our and condor's "running"). | ||
try: | ||
orc = _resurrect_orc(job) | ||
orc_status = orc.status | ||
_, queried_status = orc.submitter.status | ||
if orc_status == queried_status: | ||
# Drop repeated status (e.g., our and condor's "running"). | ||
queried_status = None | ||
except Exception as exc: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As the failing tests indicate, this interferes with the expected error handling in the outer level. So I think the options are (1) broaden the existing handling to catch either the If 2 is the choice, |
||
lgr.warning(exc_str(exc)) | ||
orc_status = "N/A" | ||
queried_status = None | ||
stat = "[status: {}{}] ".format( | ||
orc_status, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -486,7 +486,8 @@ def __init__(self, resource, submission_type, job_spec=None, | |
resurrection=False): | ||
if not external_versions["datalad"]: | ||
raise MissingExternalDependency( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a note: the datalad-bump branch already switched this over to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh cool, One more reason to have that pr merged, which I guess I will do with adding datalad rc into some dependency within setup.py . |
||
"DataLad is required for orchestrator '{}'".format(self.name)) | ||
"datalad", | ||
msg="Required for orchestrator '{}'".format(self.name)) | ||
|
||
super(DataladOrchestrator, self).__init__( | ||
resource, submission_type, job_spec, resurrection=resurrection) | ||
|
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.
Left-over import from earlier commit