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 Cannot read properties of undefined (reading 'replace') #14226

Open
4 tasks done
tczhao opened this issue Feb 26, 2025 · 0 comments · May be fixed by #14227
Open
4 tasks done

UI Cannot read properties of undefined (reading 'replace') #14226

tczhao opened this issue Feb 26, 2025 · 0 comments · May be fixed by #14227

Comments

@tczhao
Copy link
Member

tczhao commented Feb 26, 2025

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?

Workflow can produce nodes with input artifact but without keys.
e.g.

                        {
                            "name": "my-art",
                            "path": "/my-artifact",
                            "s3": {},
                            "optional": true
                        }

When this happens, the UI panic

Stack Trace
TypeError: Cannot read properties of undefined (reading 'replace')
    at eval (webpack://argo-workflows-ui/./src/shared/artifacts.ts?:38:21)
    at Array.map (<anonymous>)
    at nodeArtifacts (webpack://argo-workflows-ui/./src/shared/artifacts.ts?:36:7)
    at eval (webpack://argo-workflows-ui/./src/shared/artifacts.ts?:99:12)
    at Array.map (<anonymous>)
    at findArtifact (webpack://argo-workflows-ui/./src/shared/artifacts.ts?:97:37)
    at WorkflowDetails (webpack://argo-workflows-ui/./src/workflows/components/workflow-details/workflow-details.tsx?:176:140)
    at renderWithHooks (webpack://argo-workflows-ui/./node_modules/react-dom/cjs/react-dom.development.js?:11098:22)
    at updateFunctionComponent (webpack://argo-workflows-ui/./node_modules/react-dom/cjs/react-dom.development.js?:14130:24)
    at beginWork (webpack://argo-workflows-ui/./node_modules/react-dom/cjs/react-dom.development.js?:15472:18)
Component Stack

    at WorkflowDetails (webpack://argo-workflows-ui/./src/workflows/components/workflow-details/workflow-details.tsx?:157:28)
    at Route2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Route.js?:55:5)
    at Switch2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Switch.js?:40:5)
    at WorkflowsContainer (webpack://argo-workflows-ui/./src/workflows/components/workflows-container.tsx?:15:313)
    at Route2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Route.js?:55:5)
    at Switch2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Switch.js?:40:5)
    at ErrorBoundary (webpack://argo-workflows-ui/./src/shared/components/error-boundary.tsx?:31:5)
    at div
    at div
    at Layout (webpack://argo-workflows-ui/./node_modules/argo-ui/src/components/layout/layout.tsx?:11:118)
    at Switch2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Switch.js?:40:5)
    at Router2 (webpack://argo-workflows-ui/./node_modules/react-router/es/Router.js?:50:5)
    at AppRouter (webpack://argo-workflows-ui/./src/app-router.tsx?:93:22)
    at App

Version(s)

latest (dbfedbd)

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: Workflow
metadata:
  generateName: input-artifact-s3-
spec:
  entrypoint: input-artifact-s3-example
  templates:
  - name: input-artifact-s3-example
    inputs:
      parameters:
        - name: path
          value: ""
      artifacts:
      - name: my-art
        path: /my-artifact
        s3:
          key: "{{inputs.parameters.path}}"
        optional: true
    container:
      image: debian:latest
      command: [sh, -c]
      args: ["echo hello world"]

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
@tczhao tczhao linked a pull request Feb 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant