Skip to content

Months in cron expression are rejected by validation #16052

@k3rnL

Description

@k3rnL

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

Hello,

I've just updated to the latest version, coming from v3, and I see a regression in the expression allowed in the cron scheduling.
Before I was using this expression : 00 8 3 Jan,Apr,Jul,Oct *
Which is valid and were working on the v3, this is a screenshot from the v3:

Image

The validation of the workflow is rejected with this error:
Error: UPGRADE FAILED: cannot patch "density-map-quarterly" with kind CronWorkflow: CronWorkflow.argoproj.io "density-map-quarterly" is invalid: spec.schedules[0]: Invalid value: "00 8 3 Jan,Apr,Jul,Oct ": spec.schedules[0] in body should match '^(@(yearly|annually|monthly|weekly|daily|midnight|hourly)|@every\s+([0-9]+(ns|us|µs|ms|s|m|h))+|([0-9,/?-]+\s+){4}[0-9*,/?-]+)$'

Version(s)

v4.0.5

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
  name: test
spec:
  schedules:
   - 00 8 3 Jan,Apr,Jul,Oct *
  timezone: UTC
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 7
  failedJobsHistoryLimit: 7
  startingDeadlineSeconds: 0
  workflowSpec:
    entrypoint: date
    templates:
    - name: date
      container:
        image: alpine:3.23
        command: [sh, -c]
        args: ["date; sleep 90"]

Logs from the workflow controller

N/A

Logs from in your workflow's wait container

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions