narrow-waitress-79414
08/29/2023, 11:05 AMsuccessful and finished . For a successful metaflow run both flags work correctly.
However, we are observing a non obvious behaviour for finished flag for failed runs that is finished flag is never set to True for failed runs. because of this we cannot programatically know if a metaflow run is finished if a run has failed.
This seems like an obvious bug to notice, it is quite possible that we are missing something very obvious.
Does anyone has come across this behaviour? or anyone tried to used client api for programatically figuring metaflow run completed successfully or not?victorious-lawyer-58417
08/29/2023, 3:34 PMfinished is true only when the task has completed in a manner that allows the run to continue executing past the task in question
In other words, finished being false indicates either a currently running task or a crashed taskvictorious-lawyer-58417
08/29/2023, 3:35 PMvictorious-lawyer-58417
08/29/2023, 3:38 PMend task state correspondinglynarrow-waitress-79414
08/29/2023, 3:57 PMpython flow.py --production step-functions list-runs | grep $(run-id)
This solves our issue.
However, it would be nice to expose this functionality with Client APIvictorious-lawyer-58417
08/29/2023, 4:05 PMstale-florist-77883
03/13/2024, 12:18 AMpython run.py argo-workflows trigger and then had to take inspiration from this thread with: python metaflow_test_run.py argo-workflows status argo-testflow-xjzqf 2>&1 | tail -n 1 and then decide the status based on Succeeded | Failed | Running.