argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

Argo Workflows UI Crashes when having a misconfigured Sensor

Open christophercutajar opened this issue 3 years ago • 1 comments

Checklist

  • [x] Double-checked my configuration.
  • [x] Tested using the latest version.
  • [x] Used the Emissary executor.

Summary

What happened/what you expected to happen?

A new sensor was deployed with a typo having argument instead of arguments. When trying to load Argo Workflows UI, the UI was completely stuck highlighting the HTTP error response as be illustrated below:

Screenshot 2022-08-24 at 18 08 44

From the workflow controller logs I could see that there are some healtz error logs:

level=info msg=healthz age=5m0s err="json: unknown field \"argument\"" instanceID= labelSelector="!workflows.argoproj.io/phase,!workflows.argoproj.io/controller-instanceid" managedNamespace=

The sensor was updated to remove the typo and was re-deployed. Argo Workflows UI was still broken. Using kubectl get wf -n default, it was noticed that these are failed workflows. After deleting such workflows, Argo Workfows UI came back to life.

What version are you running?

Argo Workflows v3.3.9.

The above scenario was tested also on Argo Workflows v3.3.7. With this version, as expected Argo UI loaded and showed the respective workflow in error state.

Screenshot 2022-08-24 at 18 07 55

Diagnostics

Paste the smallest workflow that reproduces the bug. We must be able to run the workflow.

Notice that it's reading argument and not arguments

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: webhook
spec:
  template:
    serviceAccountName: operate-workflow-sa
  dependencies:
    - name: test-dep
      eventSourceName: webhook
      eventName: example
  triggers:
    - template:
        name: webhook-workflow-trigger
        k8s:
          operation: create
          source:
            resource:
              apiVersion: argoproj.io/v1alpha1
              kind: Workflow
              metadata:
                generateName: webhook-
              spec:
                entrypoint: whalesay
                argument:
                  parameters:
                    - name: message
                      # the value will get overridden by event payload from test-dep
                      value: hello world
                templates:
                  - name: whalesay
                    inputs:
                      parameters:
                        - name: message
                    container:
                      image: docker/whalesay:latest
                      command: [cowsay]
                      args: ["{{inputs.parameters.message}}"]
          parameters:
            - src:
                dependencyName: test-dep
                contextKey: type
              dest: spec.arguments.parameters.0.value

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

christophercutajar avatar Aug 26 '22 15:08 christophercutajar

Work-around - delete the bad workflow.

alexec avatar Sep 05 '22 20:09 alexec

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.

stale[bot] avatar Oct 01 '22 17:10 stale[bot]

This issue has been closed due to inactivity. Feel free to re-open if you still encounter this issue.

stale[bot] avatar Oct 16 '22 00:10 stale[bot]