Skip to content
Snippets Groups Projects

fix pass/fail with mutable version bug

Merged Charlotte Hausman requested to merge 2.5_fixes into main
1 file
+ 15
7
Compare changes
  • Side-by-side
  • Inline
@@ -539,15 +539,23 @@ class QaPass(Action):
@staticmethod
def check_still_running(version: CapabilityVersion) -> bool:
workflow_service_url = CapoConfig().settings(WORKFLOW_SETTINGS_KEY).serviceUrl
if version.current_execution.current_workflow_request_id:
response = requests.get(
f"{workflow_service_url}/workflows/{version.capability.name}/requests/"
f"{version.current_execution.current_workflow_request_id}/htcondor_id"
)
if json.loads(response.content.decode())["htcondor_job_id"] == "None":
# check for execution
if version.current_execution:
# version is submitted, check for workflow
if version.current_execution.current_workflow_request_id:
response = requests.get(
f"{workflow_service_url}/workflows/{version.capability.name}/requests/"
f"{version.current_execution.current_workflow_request_id}/htcondor_id"
)
if json.loads(response.content.decode())["htcondor_job_id"] == "None":
# not running in HTCondor
return False
return True
else:
# workflow not submitted
return False
return True
else:
# version is not submitted
return False
@staticmethod
Loading