Skip to content

fix: copy input parameter defaults to output in suspend templates#35

Closed
Joibel wants to merge 1 commit into
mainfrom
claude/fix-workflow-select-timeout-dJDUN
Closed

fix: copy input parameter defaults to output in suspend templates#35
Joibel wants to merge 1 commit into
mainfrom
claude/fix-workflow-select-timeout-dJDUN

Conversation

@Joibel

@Joibel Joibel commented Jan 13, 2026

Copy link
Copy Markdown
Owner

Fixes argoproj#12896

Motivation

This workflow apparently worked in 3.4, I haven't tried to work out why.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: suspend-with-input-defaults
spec:
  entrypoint: main
  templates:
  - name: main
    steps:
    - - name: wait
        template: wait
  - name: wait
    suspend:
      duration: "0s"
    inputs:
      parameters:
        - name: input
          default: "Hello World"
        - name: select
          default: default
          enum:
            - default
            - option1
            - option2
    outputs:
      parameters:
        - name: input
          valueFrom:
            supplied: {}
        - name: select
          valueFrom:
            supplied: {}

Modifications

We now observe the default values of the inputs if the output doesn't have defaults, for suspend templates only

Verification

New unit test, which verified the workflow passes and checks the values.
The workflow would formerly failed.

Documentation

None required, bug fix

…spend templates

When a suspend node times out, the output parameters need a default
value (valueFrom.default) to be used. Previously, users had to manually
specify the default in the output's valueFrom even when they had already
defined a default on the matching input parameter.

This fix automatically populates the output parameter's valueFrom.default
from the matching input parameter's default when:
- The output parameter has valueFrom.supplied set
- The output doesn't already have a valueFrom.default
- There's an input parameter with the same name that has a default

This allows suspend templates with input parameters that have defaults
and matching output parameters with valueFrom.supplied to work correctly
when the suspend duration times out, without requiring users to duplicate
the default value in the output specification.

Signed-off-by: Alan Clucas <alan@clucas.org>
@Joibel
Joibel marked this pull request as draft January 13, 2026 14:52
@Joibel Joibel closed this Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suspend enum input ignores default value

1 participant