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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'd like to submit a PR for a
--result-in-exit-statusfeature for the CLIargo waitcommand.After reading the code at https://github.com/argoproj/argo-workflows/blob/main/cmd/argo/commands/common/wait.go
argo waitwill exit 1 if:FailedorErrorphaseI'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
waitstep or not.Instead I'm capturing stdout and doing a container exit of -1, 0, 1 so the
retryStrategy.expressioncan retry on'-1'With the following shell logic
Would anyone object to me making the exit status of
argo waitmore 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 submitto capture the workflow nameargo waitwith 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