argoproj / argo-workflows

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

Cron: don't create minutely workflow on spec error #13701

Closed tooptoop4 closed 3 weeks ago

tooptoop4 commented 1 month ago

Pre-requisites

What happened? What did you expect to happen?

if we push new cron workflow with some errors, argo could replace it with default one dummy workflow which will run every minute

https://github.com/argoproj/argo-workflows/blob/ba75efb228fa3fbab91e2b1c7689f6db3f3c3b62/ui/src/app/shared/examples.ts#L79-L87

We need option to change this default workflow to some invalid one, to prevent unnecessary dummy jobs run.

this is noted in a comment of the 3.6 blog post but i have also noticed this

Version(s)

3.5.11

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

n/a

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
Joibel commented 1 month ago

Could you provide further information on the exact steps to reproduce this? I tried:

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity and needs more information. It will be closed if no further activity occurs.

tooptoop4 commented 1 month ago

🦀

agilgur5 commented 1 month ago

run every minute

This is also intentional for an example, so that you can easily see it run due to its quick schedule

github-actions[bot] commented 3 weeks ago

This issue has been closed due to inactivity and lack of information. If you still encounter this issue, please add the requested information and re-open.

tooptoop4 commented 2 weeks ago
metadata:
  name: d-bear3
  namespace: argo
  labels:
    example: "true"
spec:
  workflowMetadata:
    labels:
      example: "true"
  schedule: "2 2 * * *"
  workflowSpec:
    entrypoint: argosay
    arguments:
      parameters:
        - name: message
          value: hello argo
    templates:
      - name: argosay
        inputs:
          parameters:
            - name: message
              value: {{`{{workflow.parameters.message}}`}}
        container:
          name: main
          image: argoproj/argosay:v2
          command:
            - /argosay
          args:
            - echo
            - {{`{{workflow.parameters.message}}`}}
    ttlStrategy:
      secondsAfterCompletion: 300
    podGC:
      strategy: OnPodCompletion