Skip to content

Commit

Permalink
Include in workflow status in workspace analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
linsword13 committed Jan 9, 2025
1 parent 8767a2e commit 6bf0a5e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/ramble/ramble/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
from enum import Enum

experiment_status = Enum(
"experiment_status", ["UNKNOWN", "SETUP", "RUNNING", "COMPLETE", "SUCCESS", "FAILED"]
"experiment_status",
["UNKNOWN", "SETUP", "RUNNING", "COMPLETE", "SUCCESS", "FAILED", "CANCELLED"],
)

_NULL_CONTEXT = "null"
Expand Down Expand Up @@ -1745,10 +1746,13 @@ def format_context(context_match, context_format):
success = True
success = success and criteria_list.passed()

if success:
self.set_status(status=experiment_status.SUCCESS)
else:
self.set_status(status=experiment_status.FAILED)
status = experiment_status.SUCCESS if success else experiment_status.FAILED
# When workflow_manager is present, only use app_status when workflow is completed.
if self.workflow_manager is not None:
wm_status = self.workflow_manager.get_status(workspace)
if not wm_status == experiment_status.COMPLETE:
status = wm_status
self.set_status(status)

self._init_result()

Expand Down

0 comments on commit 6bf0a5e

Please sign in to comment.