argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.03k stars 3.2k forks source link

UI: Allow `@schedules` in CronWorkflow field #13489

Closed Joibel closed 1 month ago

Joibel commented 2 months ago

Summary

Currently the validator restricts the schedule and schedules fields of CronWorkflows to contain 5 parts and responds with

Error: Expression has only 2 parts. At least 5 parts are required.

if you attempt to use Predefined Schedules.

https://pkg.go.dev/github.com/robfig/cron supports these Predefined Schedules, and will run them if you bypass the validator with kubectl apply or kubectl create.

This feature would teach the validator that this format is also fine for this field. This is really most useful for the @every format, as the other schedules can be written using standard 5 part cron schedules.

See https://cloud-native.slack.com/archives/C01QW9QSSSK/p1724080720962949

Message from the maintainers:

Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.

chenshiwei-io commented 2 months ago

https://github.com/argoproj/argo-workflows/blob/983c6ca5f489d1b314d930e2fe7b510b89552973/workflow/validate/validate.go#L369-L404

I understand the backend validation is not limited, it only changes frontend typescript validation. frontend UI is not limited schedule 2 parts too.

djanjic commented 2 months ago

Hello, I want to work on this issue if it's still available.