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
If name > 52 characters, the workflow fails to start anyway. The workflow controller fails with:
time="2024-04-29T19:07:01.554Z" level=error msg="invalid cron workflow" cronWorkflow=jobs-default/nbcreditscorev4d5mx.prod.main.eventtrainnbcswithfixeddata error="cron workflow name \"abcreditscorev4d5mx.prod.main.eventtrainabcspqrfixederty\" must not be more than 52 characters long (currently 57)"
Would be easy if the user got this error (or similar) at the time of creating the workflow itself.
The text was updated successfully, but these errors were encountered:
shrinandj
changed the title
Argo-workflows create command should fail if name > 52 characters
Argo-workflows with name > 52 characters fail if run as CronWorkflows
May 17, 2024
The user experience is quite tricky here because the permissible name length for regular Argo workflows is greater than for Cron workflows.
So,
The user creates a flow and run python flow.py argo-workflows create. This creates the workflow template without any error
The user is able to run this flow either via python flow.py argo-wokflows trigger or via the Argo UI and it works just fine.
The user then adds @schedule decorator and run python argo-workflows create. This creates the workflow template and the CronWorkflow. No errors.
But if the name > 52 characters, the actual flows don't run on the cron schedule. The only way to identify the problem is to look at the argo-workflows-controller logs as shown above and see the error.
What's needed here is the following.
When a user creates a flow with @schedule:
Construct the name as it is done today. If the name length < 52 chars, create the template, cronworkflow.
If the name length > 52 chars:
check if there is a previously created cronworkflow object. If so, delete it (since it wouldn't be running anyway).
create a name such that it is < 52 characters. e.g. take all characters > 46 and construct a 6 byte has to fit into 52 chars
If name > 52 characters, the workflow fails to start anyway. The workflow controller fails with:
Would be easy if the user got this error (or similar) at the time of creating the workflow itself.
The text was updated successfully, but these errors were encountered: