Skip to content

Commit

Permalink
Merge pull request #363 from 4dn-dcic/check_problematic_runs
Browse files Browse the repository at this point in the history
Check problematic runs
  • Loading branch information
KorayKirli committed Nov 4, 2020
2 parents e42b958 + 961566e commit 51c93bb
Show file tree
Hide file tree
Showing 3 changed files with 449 additions and 6 deletions.
32 changes: 32 additions & 0 deletions chalicelib/check_setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,38 @@
}
}
},
"problematic_wfrs_status" : {
"title": "x) Errored Runs",
"group": "Pipeline checks",
"schedule": {
"hourly_checks": {
"cgap": {
"kwargs": {"primary": true},
"dependencies": []
},
"cgapwolf": {
"kwargs": {"primary": true},
"dependencies": []
}
}
}
},
"long_running_wfrs_status" : {
"title": "x) Long Running Runs",
"group": "Pipeline checks",
"schedule": {
"hourly_checks": {
"cgap": {
"kwargs": {"primary": true},
"dependencies": []
},
"cgapwolf": {
"kwargs": {"primary": true},
"dependencies": []
}
}
}
},
"elastic_search_space" : {
"title": "ES Disk Space Check",
"group": "Elasticsearch checks",
Expand Down
27 changes: 27 additions & 0 deletions chalicelib/checks/helpers/cgap_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,3 +1036,30 @@ def is_there_my_qc_metric(file_meta, qc_metric_name, my_auth):
if qc_metric_name not in qc_results['display_title']:
return False
return True


def fetch_wfr_associated(wfr_info):
"""Given wfr embedded frame, find associated output files and qcs"""
wfr_as_list = []
wfr_as_list.append(wfr_info['uuid'])
if wfr_info.get('output_files'):
for o in wfr_info['output_files']:
if o.get('value'):
wfr_as_list.append(o['value']['uuid'])
elif o.get('value_qc'):
wfr_as_list.append(o['value_qc']['uuid'])
if wfr_info.get('output_quality_metrics'):
for qc in wfr_info['output_quality_metrics']:
if qc.get('value'):
wfr_as_list.append(qc['value']['uuid'])
if wfr_info.get('quality_metric'):
wfr_as_list.append(wfr_info['quality_metric']['uuid'])
return list(set(wfr_as_list))


def string_to_list(string):
"Given a string that is either comma separated values, or a python list, parse to list"
for a_sep in "'\":[] ":
values = string.replace(a_sep, ",")
values = [i.strip() for i in values.split(',') if i]
return values

0 comments on commit 51c93bb

Please sign in to comment.