Skip to content
Snippets Groups Projects

catch qa fail case when request has mutable version

Merged Charlotte Hausman requested to merge 2.5_more_fixes into main
1 file
+ 9
5
Compare changes
  • Side-by-side
  • Inline
@@ -562,11 +562,15 @@ class QaPass(Action):
def run_qa_fail_workflow(version: CapabilityVersion):
workflow_service_url = CapoConfig().settings(WORKFLOW_SETTINGS_KEY).serviceUrl
logger.info(f"QA Failing version: {version.__json__()}")
if version.current_execution.current_workflow_request_id:
requests.post(
f"{workflow_service_url}/workflows/{version.capability.name}/requests/"
f"{version.current_execution.current_workflow_request_id}/qa_fail"
)
# check if version is submitted
if version.current_execution:
# check if workflow is submitted
if version.current_execution.current_workflow_request_id:
requests.post(
f"{workflow_service_url}/workflows/{version.capability.name}/requests/"
f"{version.current_execution.current_workflow_request_id}/qa_fail"
)
@staticmethod
def abort_running_execution(version: CapabilityVersion):
Loading