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

UI crash when viewing YAML of nodes in workflows using workflowTemplateRef #4691

Closed
paalkr opened this issue Dec 10, 2020 · 16 comments · Fixed by #4695
Closed

UI crash when viewing YAML of nodes in workflows using workflowTemplateRef #4691

paalkr opened this issue Dec 10, 2020 · 16 comments · Fixed by #4695
Assignees
Labels

Comments

@paalkr
Copy link

paalkr commented Dec 10, 2020

Summary

View the yaml def of archived workflows does not work in 2.12-rc4, and will render a stack trace error in the UI
Images from 2.12-rc4 (BTW, the same problem occurs if click on the Containers tab)
image
image

The same use case does work in 2.11.8
image
image

Diagnostics

Kops k8s 1.17.13 on AWS
2.12-rc4

There are no errors in the server logs and the workflow controller logs.

Message from the maintainers:

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

@paalkr paalkr changed the title UI crash when viewing yaml def of archived workflow in 2.12-rc4 UI crash when viewing yaml definition of archived workflows in 2.12-rc4 Dec 10, 2020
@alexec alexec self-assigned this Dec 10, 2020
@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

Can I please ask for your complete workflow YAML?

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

I've created a dev build for you to test: docker pull argoproj/argocli:fix-4691. Let me know if it fixes your issue, please.

@paalkr
Copy link
Author

paalkr commented Dec 10, 2020

Thx. Looks like the initial problem is fixed, but now I get this error
image

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

Ok. Please attach the YAML of your workflow so I don't go round in circles on this please.

Thank you.

@paalkr
Copy link
Author

paalkr commented Dec 10, 2020

Sure. For me this is happens with basically all workflows.
BTW, I now see the latest "cannot read property 'dag' of undefined" error happening for both archived and not archived workflows.

So for example this template

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  generateName: artifact-passing-
  labels:
    workflows.argoproj.io/creator: system-serviceaccount-hosting-teamp-dev-argo-server
  name: artifact-passing-xhrhx
  namespace: hosting-teamp-dev
spec:
  arguments: {}
  entrypoint: artifact-example
  templates:
  - arguments: {}
    inputs: {}
    metadata: {}
    name: artifact-example
    outputs: {}
    steps:
    - - arguments: {}
        name: generate-artifact
        template: whalesay
    - - arguments:
          artifacts:
          - from: '{{steps.generate-artifact.outputs.artifacts.hello-art}}'
            name: message
        name: consume-artifact
        template: print-message
  - arguments: {}
    container:
      args:
      - cowsay hello world | tee /tmp/hello_world.txt
      command:
      - sh
      - -c
      image: docker/whalesay:latest
      name: ""
      resources: {}
    inputs: {}
    metadata: {}
    name: whalesay
    outputs:
      artifacts:
      - name: hello-art
        path: /tmp/hello_world.txt
  - arguments: {}
    container:
      args:
      - cat /tmp/message
      command:
      - sh
      - -c
      image: alpine:latest
      name: ""
      resources: {}
    inputs:
      artifacts:
      - name: message
        path: /tmp/message
    metadata: {}
    name: print-message
    outputs: {}

Resulting in this workflow

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: artifact-passing-xhrhx-
  labels:
    submit-from-ui: "true"
    workflows.argoproj.io/archive: "yes"
    workflows.argoproj.io/completed: "true"
    workflows.argoproj.io/creator: system-serviceaccount-hosting-teamp-dev-argo-server
    workflows.argoproj.io/phase: Succeeded
    workflows.argoproj.io/workflow-archiving-status: Archived
    workflows.argoproj.io/workflow-template: artifact-passing-xhrhx
  name: artifact-passing-xhrhx-6ljrg
  namespace: hosting-teamp-dev
spec:
  arguments: {}
  entrypoint: artifact-example
  workflowTemplateRef:
    name: artifact-passing-xhrhx
status:
  conditions:
  - status: "True"
    type: Completed
  estimatedDuration: 15
  finishedAt: "2020-12-10T23:00:45Z"
  nodes:
    artifact-passing-xhrhx-6ljrg:
      children:
      - artifact-passing-xhrhx-6ljrg-1476659558
      displayName: artifact-passing-xhrhx-6ljrg
      finishedAt: "2020-12-10T23:00:45Z"
      id: artifact-passing-xhrhx-6ljrg
      name: artifact-passing-xhrhx-6ljrg
      outboundNodes:
      - artifact-passing-xhrhx-6ljrg-542268332
      phase: Succeeded
      progress: 2/2
      resourcesDuration:
        cpu: 7
        memory: 7
      startedAt: "2020-12-10T23:00:35Z"
      templateName: artifact-example
      templateScope: local/
      type: Steps
    artifact-passing-xhrhx-6ljrg-542268332:
      boundaryID: artifact-passing-xhrhx-6ljrg
      displayName: consume-artifact
      finishedAt: "2020-12-10T23:00:44Z"
      hostNodeName: ip-10-4-150-48.eu-north-1.compute.internal
      id: artifact-passing-xhrhx-6ljrg-542268332
      inputs:
        artifacts:
        - name: message
          path: /tmp/message
          s3:
            accessKeySecret:
              key: accessKey
              name: argo-creds
            bucket: XXXXXXXXXXXXXXXXXXXXXXXXXX
            endpoint: s3.amazonaws.com
            insecure: false
            key: k8s10/hosting-teamp-dev/2020-12-10/artifact-passing-xhrhx-6ljrg/artifact-passing-xhrhx-6ljrg-3875736092/hello-art.tgz
            region: eu-north-1
            secretKeySecret:
              key: secretKey
              name: argo-creds
      name: artifact-passing-xhrhx-6ljrg[1].consume-artifact
      outputs:
        artifacts:
        - archiveLogs: true
          name: main-logs
          s3:
            accessKeySecret:
              key: accessKey
              name: argo-creds
            bucket: XXXXXXXXXXXXXXXX
            endpoint: s3.amazonaws.com
            insecure: false
            key: k8s10/hosting-teamp-dev/2020-12-10/artifact-passing-xhrhx-6ljrg/artifact-passing-xhrhx-6ljrg-542268332/main.log
            region: eu-north-1
            secretKeySecret:
              key: secretKey
              name: argo-creds
        exitCode: "0"
      phase: Succeeded
      progress: 1/1
      resourcesDuration:
        cpu: 4
        memory: 4
      startedAt: "2020-12-10T23:00:39Z"
      templateName: print-message
      templateScope: local/
      type: Pod
    artifact-passing-xhrhx-6ljrg-1409401987:
      boundaryID: artifact-passing-xhrhx-6ljrg
      children:
      - artifact-passing-xhrhx-6ljrg-542268332
      displayName: '[1]'
      finishedAt: "2020-12-10T23:00:45Z"
      id: artifact-passing-xhrhx-6ljrg-1409401987
      name: artifact-passing-xhrhx-6ljrg[1]
      phase: Succeeded
      progress: 1/1
      resourcesDuration:
        cpu: 4
        memory: 4
      startedAt: "2020-12-10T23:00:39Z"
      templateName: artifact-example
      templateScope: local/
      type: StepGroup
    artifact-passing-xhrhx-6ljrg-1476659558:
      boundaryID: artifact-passing-xhrhx-6ljrg
      children:
      - artifact-passing-xhrhx-6ljrg-3875736092
      displayName: '[0]'
      finishedAt: "2020-12-10T23:00:39Z"
      id: artifact-passing-xhrhx-6ljrg-1476659558
      name: artifact-passing-xhrhx-6ljrg[0]
      phase: Succeeded
      progress: 2/2
      resourcesDuration:
        cpu: 7
        memory: 7
      startedAt: "2020-12-10T23:00:35Z"
      templateName: artifact-example
      templateScope: local/
      type: StepGroup
    artifact-passing-xhrhx-6ljrg-3875736092:
      boundaryID: artifact-passing-xhrhx-6ljrg
      children:
      - artifact-passing-xhrhx-6ljrg-1409401987
      displayName: generate-artifact
      finishedAt: "2020-12-10T23:00:39Z"
      hostNodeName: ip-10-4-150-48.eu-north-1.compute.internal
      id: artifact-passing-xhrhx-6ljrg-3875736092
      name: artifact-passing-xhrhx-6ljrg[0].generate-artifact
      outputs:
        artifacts:
        - name: hello-art
          path: /tmp/hello_world.txt
          s3:
            accessKeySecret:
              key: accessKey
              name: argo-creds
            bucket: XXXXXXXXXXX
            endpoint: s3.amazonaws.com
            insecure: false
            key: k8s10/hosting-teamp-dev/2020-12-10/artifact-passing-xhrhx-6ljrg/artifact-passing-xhrhx-6ljrg-3875736092/hello-art.tgz
            region: eu-north-1
            secretKeySecret:
              key: secretKey
              name: argo-creds
        - archiveLogs: true
          name: main-logs
          s3:
            accessKeySecret:
              key: accessKey
              name: argo-creds
            bucket: XXXXXXXXXXXXX
            endpoint: s3.amazonaws.com
            insecure: false
            key: k8s10/hosting-teamp-dev/2020-12-10/artifact-passing-xhrhx-6ljrg/artifact-passing-xhrhx-6ljrg-3875736092/main.log
            region: eu-north-1
            secretKeySecret:
              key: secretKey
              name: argo-creds
        exitCode: "0"
      phase: Succeeded
      progress: 1/1
      resourcesDuration:
        cpu: 3
        memory: 3
      startedAt: "2020-12-10T23:00:35Z"
      templateName: whalesay
      templateScope: local/
      type: Pod
  phase: Succeeded
  progress: 2/2
  resourcesDuration:
    cpu: 7
    memory: 7
  startedAt: "2020-12-10T23:00:35Z"
  storedTemplates:
    namespaced/artifact-passing-xhrhx/artifact-example:
      arguments: {}
      inputs: {}
      metadata: {}
      name: artifact-example
      outputs: {}
      steps:
      - - arguments: {}
          name: generate-artifact
          template: whalesay
      - - arguments:
            artifacts:
            - from: '{{steps.generate-artifact.outputs.artifacts.hello-art}}'
              name: message
          name: consume-artifact
          template: print-message
    namespaced/artifact-passing-xhrhx/print-message:
      arguments: {}
      container:
        args:
        - cat /tmp/message
        command:
        - sh
        - -c
        image: alpine:latest
        name: ""
        resources: {}
      inputs:
        artifacts:
        - name: message
          path: /tmp/message
      metadata: {}
      name: print-message
      outputs: {}
    namespaced/artifact-passing-xhrhx/whalesay:
      arguments: {}
      container:
        args:
        - cowsay hello world | tee /tmp/hello_world.txt
        command:
        - sh
        - -c
        image: docker/whalesay:latest
        name: ""
        resources: {}
      inputs: {}
      metadata: {}
      name: whalesay
      outputs:
        artifacts:
        - name: hello-art
          path: /tmp/hello_world.txt
  storedWorkflowTemplateSpec:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
          - matchExpressions:
            - key: kops.k8s.io/instancegroup
              operator: In
              values:
              - processing
    arguments: {}
    entrypoint: artifact-example
    parallelism: 4
    podGC:
      strategy: OnWorkflowSuccess
    serviceAccountName: argo-workflow-service-account
    templates:
    - arguments: {}
      inputs: {}
      metadata: {}
      name: artifact-example
      outputs: {}
      steps:
      - - arguments: {}
          name: generate-artifact
          template: whalesay
      - - arguments:
            artifacts:
            - from: '{{steps.generate-artifact.outputs.artifacts.hello-art}}'
              name: message
          name: consume-artifact
          template: print-message
    - arguments: {}
      container:
        args:
        - cowsay hello world | tee /tmp/hello_world.txt
        command:
        - sh
        - -c
        image: docker/whalesay:latest
        name: ""
        resources: {}
      inputs: {}
      metadata: {}
      name: whalesay
      outputs:
        artifacts:
        - name: hello-art
          path: /tmp/hello_world.txt
    - arguments: {}
      container:
        args:
        - cat /tmp/message
        command:
        - sh
        - -c
        image: alpine:latest
        name: ""
        resources: {}
      inputs:
        artifacts:
        - name: message
          path: /tmp/message
      metadata: {}
      name: print-message
      outputs: {}
    tolerations:
    - effect: NoSchedule
      key: k8s.gdo.aws/role
      operator: Equal
      value: processing
    ttlStrategy:
      secondsAfterFailure: 172800
      secondsAfterSuccess: 60
    workflowTemplateRef:
      name: artifact-passing-xhrhx

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

It also happens for me for non-archived workflows.

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

I've created a new dev build for you to test: argoproj/argocli:fix-4691

@paalkr
Copy link
Author

paalkr commented Dec 10, 2020

Thx. I'll test.

Just to make sure, the image tag is supposed to be the same as the previous test build?

@paalkr
Copy link
Author

paalkr commented Dec 10, 2020

So, now the stack trace is gone, excellent. But the yaml output does not look correct for the Parent Node and Current Node
image

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

So I think it is the wrong solution.

@alexec
Copy link
Contributor

alexec commented Dec 10, 2020

@paalkr how's your React?

@paalkr
Copy link
Author

paalkr commented Dec 10, 2020

Sorry, I'm not a developer, but a Cloud Native infra architect and ops person.

@alexec alexec changed the title UI crash when viewing yaml definition of archived workflows in 2.12-rc4 UI crash when viewing YAML of nodes in workflows using workflowTemplateRef Dec 11, 2020
@alexec
Copy link
Contributor

alexec commented Dec 11, 2020

@paalkr does the problem resolve when you refresh the page?

@paalkr
Copy link
Author

paalkr commented Dec 11, 2020

Unfortunately refreshing the page does not make any difference.

alexec added a commit to alexec/argo-workflows that referenced this issue Dec 14, 2020
alexec added a commit that referenced this issue Dec 14, 2020
…#4691 (#4695)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
@paalkr
Copy link
Author

paalkr commented Dec 15, 2020

@alexec , does it exist a test / master image with this fix included? I appreciate that your support on this issue, thx!

@paalkr
Copy link
Author

paalkr commented Dec 15, 2020

I noticed that the same test-build was updated to include the latest commit. To me it looks like the problem is solved!

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

Successfully merging a pull request may close this issue.

2 participants