You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the workflow finished in the Failed or Error phase
I'm using argo wait as part of a multi-cluster workflow.
This makes the exit code essentially useless for determining if I need to retry the wait step or not.
Instead I'm capturing stdout and doing a container exit of -1, 0, 1 so the retryStrategy.expression can retry on '-1'
With the following shell logic
if [ -z"${result}" ];then# no output -> transient failureexit -1
fiif [[ $(echo "${result}"| cut -d '' --fields 2)=="Succeeded" ]];then# confirmed workflow successexit 0
else# confirmed workflow failure/errorexit 1
fi
Would anyone object to me making the exit status of argo wait more explicit behind a (default off) flag?
Context
For context I have an overall CI/CD workflow that has to run sub-workflows on other clusters as part of its validation and pre-deployment checks and preparation (think smoke tests, projection rebuilds, etc).
I can't just use a workflow on 1 cluster within a single namespace.
I run the "other cluster" workflow in 2 steps
Step 1: kick off using argo submit to capture the workflow name
Step 2: use argo wait with output "parsing" so my "parent" workflow can capture the overall success/failure/error status of that workflow
with retries to work around transient issues, e.g. connection loss, firewall hiccups, controller restarts, etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I'd like to submit a PR for a
--result-in-exit-status
feature for the CLIargo wait
command.After reading the code at https://github.com/argoproj/argo-workflows/blob/main/cmd/argo/commands/common/wait.go
argo wait
will exit 1 if:Failed
orError
phaseI'm using argo wait as part of a multi-cluster workflow.
This makes the exit code essentially useless for determining if I need to retry the
wait
step or not.Instead I'm capturing stdout and doing a container exit of -1, 0, 1 so the
retryStrategy.expression
can retry on'-1'
With the following shell logic
Would anyone object to me making the exit status of
argo wait
more explicit behind a (default off) flag?Context
For context I have an overall CI/CD workflow that has to run sub-workflows on other clusters as part of its validation and pre-deployment checks and preparation (think smoke tests, projection rebuilds, etc).
I can't just use a workflow on 1 cluster within a single namespace.
I run the "other cluster" workflow in 2 steps
argo submit
to capture the workflow nameargo wait
with output "parsing" so my "parent" workflow can capture the overall success/failure/error status of that workflowCheers,
Andrew
Beta Was this translation helpful? Give feedback.
All reactions