Workflow in pending phase possibly not reported by argo workflows REST API as pending? #14119
Unanswered
yousefmoazzam
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This behaviour is expected. |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hi all 🙂
In working with the argo workflows REST API in an application, and specifically, testing this application against the different phases a workflow can have to ensure we handle the different cases correctly, we came across some unexpected behaviour that I'd like to ask the community for some input.
One piece of info to mention is that we're working with argo workflows v3.6.2 when we observed this behaviour.
To test against a pending workflow, we wanted to somehow deterministically get a submitted workflow in a pending state (not a task within a workflow being pending, but the workflow itself). One of our team members suggested taking down the workflow controller by scaling the number of replicas in the
ReplicaSet
down to 0, such that the workflow would never be picked up by the controller.After doing this and submitting a workflow, it indeed looked like the workflow was pending from the web UI, in the sense that the single task inside it didn't even get to a pending phase, and the workflow wasn't in the "Running" phase. We thought this did the trick, and queried the argo workflows REST API for that particular workflow using the
/api/v1/workflows/{namespace}/{name}
endpoint, expecting to see thestatus.phase
field with the value"Pending"
.However, the response we got back was unexpectedly missing the
status.phase
field altogether. The full response was the following:I wanted to ask if anyone else had seen this behaviour of the argo workflows REST API regarding a workflow being in a pending phase? Was this workflow in a pending phase, but the argo workflows REST API was producing an incorrect response? Was the strategy of "taking down" the workflow controller not a valid way to get a submitted workflow into a pending phase? Or any other possibilities?
Let me know if I should provide any other info, thanks!
Beta Was this translation helpful? Give feedback.
All reactions