Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use output artifact with disabled archive in CronWorkflow #13984

Open
3 of 4 tasks
remicres opened this issue Dec 10, 2024 · 2 comments
Open
3 of 4 tasks

Can't use output artifact with disabled archive in CronWorkflow #13984

remicres opened this issue Dec 10, 2024 · 2 comments
Labels

Comments

@remicres
Copy link
Contributor

remicres commented Dec 10, 2024

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?

I am unable to use outputs: artifacts: archive: none: {} in CronWorkflow.
In Workflow everything works as expected.

Version(s)

v2.9.11+91bb155

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.

With Workflow: OK

Borrowed from the argo examples, and reduced to the minimum:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: toto-wf
  namespace: cdos
spec:
  entrypoint: whalesay
  templates:
  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [sh, -c]
      args: ["cowsay hello world | tee /tmp/hello_world.txt | tee /tmp/hello_world_nc.txt ; sleep 1"]
    outputs:
      artifacts:
      - name: hello-txt
        path: /tmp/hello_world.txt
        archive:
          none: {}

With CronWorkflow: NOK

apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
  name: toto-cron
  namespace: cdos
spec:
  schedule: 0 0 * * *
  workflowSpec:
    entrypoint: whalesay
    templates:
    - name: whalesay
      container:
        image: docker/whalesay:latest
        command: [sh, -c]
        args: ["cowsay hello world | tee /tmp/hello_world.txt | tee /tmp/hello_world_nc.txt ; sleep 1"]
      outputs:
        artifacts:
        - name: hello-txt
          path: /tmp/hello_world.txt
          archive:
            none: {}

We got:

cannot unmarshall spec: cannot restore struct from: slice

When we remove archive: None: {} or if we set another archive strategy it works fine.

Logs from the workflow controller

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


time="2024-12-10T19:21:29.190Z" level=info msg="Processing cdos/toto-cron" cronWorkflow=cdos/toto-cron
time="2024-12-10T19:21:29.190Z" level=info msg="CronWorkflow cdos/toto-cron added" cronWorkflow=cdos/toto-cron
time="2024-12-10T19:21:43.078Z" level=warning msg="Failed to unmarshal key to workflow object" error="cannot restore struct from: slice" key=cdos/toto-cron-202412101921
time="2024-12-10T19:21:43.078Z" level=info msg="Updated phase  -> Failed" namespace=cdos workflow=toto-cron-202412101921
time="2024-12-10T19:21:43.078Z" level=info msg="Updated message  -> cannot unmarshall spec: cannot restore struct from: slice" namespace=cdos workflow=toto-cron-202412101921
time="2024-12-10T19:21:43.078Z" level=info msg="Marking workflow completed" namespace=cdos workflow=toto-cron-202412101921
time="2024-12-10T19:21:43.084Z" level=info msg="cleaning up pod" action=deletePod key=cdos/toto-cron-202412101921-1340600742-agent/deletePod
time="2024-12-10T19:21:43.085Z" level=info msg="Workflow update successful" namespace=cdos phase=Failed resourceVersion=703208387 workflow=toto-cron-202412101921



### Logs from in your workflow's wait container

```text
kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

I am unable to get anything using this command (I tried to modify it to grab cronworkflows without success)

@Joibel
Copy link
Member

Joibel commented Dec 10, 2024

The version you have given for your version of workflows is ancient (2.9...). Is that correct? If so, I would suggest upgrading to something supported (3.5.13 or 3.6.2) and trying again.

@remicres
Copy link
Contributor Author

Yes I'll perform some tests as soon as we upgrade argo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants