Skip to content

CLI doesn't respect workflow defaults when validation is run #15879

@isubasinghe

Description

@isubasinghe

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?

NewWorkflowServiceClient calls NewWorkflowServer with a nil value for the workflow defaults.
This means that the server spun up for cli connection differs in behaviour to an actual running server.

This results in workflows such as this:

data:
  config: |
    artifactRepository: { ... }
    workflowDefaults:
      spec:
        arguments:
          parameters:
          - name: G-image-alpine
            value: someregistry.azurecr.io/alpine:3.21
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: pstemmet-test-workflow-
  namespace: argo
spec:
  entrypoint: main
  templates:
    - name: main
      container:
        image: '{{workflow.parameters.G-image-alpine}}'
        command: ["/bin/sh", "-c"]
        args:
          - "echo 'Hello, world!'"

Working on one submission path but not the other.

Version(s)

:latest

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.

N/A

Logs from the workflow controller

N/A

Logs from in your workflow's wait container

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions