Closed Joibel closed 1 month ago
Currently the validator restricts the schedule and schedules fields of CronWorkflows to contain 5 parts and responds with
schedule
schedules
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.
kubectl apply
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.
@every
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 👍.
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.
https://github.com/argoproj/argo-workflows/blob/983c6ca5f489d1b314d930e2fe7b510b89552973/ui/src/app/cron-workflows/pretty-schedule.tsx#L15-L19
https://github.com/argoproj/argo-workflows/blob/983c6ca5f489d1b314d930e2fe7b510b89552973/ui/src/app/cron-workflows/schedule-validator.tsx#L6-L10
Hello, I want to work on this issue if it's still available.
Summary
Currently the validator restricts the
schedule
andschedules
fields of CronWorkflows to contain 5 parts and responds withif 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
orkubectl 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 👍.