Skip to content

fix(validate): restore lax whitespace validation for customer migration#340

Merged
jessesuen merged 1 commit into
akuity:release-3.7.10from
himeshpanc:unfix/lax-validation-3.7.10
Apr 2, 2026
Merged

fix(validate): restore lax whitespace validation for customer migration#340
jessesuen merged 1 commit into
akuity:release-3.7.10from
himeshpanc:unfix/lax-validation-3.7.10

Conversation

@himeshpanc
Copy link
Copy Markdown

Fixes #N/A

Motivation

Templates using spaced variable references like {{ inputs.parameters.foo }} where foo is
not declared in the template's inputs.parameters were failing validation with:

failed to resolve {{ inputs.parameters.foo }}

Upstream PR argoproj#11781 (commit 07c256085) introduced a correct bug fix
that added strings.TrimSpace(tag) in resolveAllVariables. However, some existing users were
inadvertently relying on the pre-fix behaviour, causing validation failures after upgrading.

This is an intentional, scoped revert for the akuity release-3.7.10 branch to restore the
lax v3.4.6 behaviour and ease user template migration. Not intended for upstream contribution.

Modifications

  • Removed trimmedTag := strings.TrimSpace(tag) in resolveAllVariables in workflow/validate/validate.go
  • Reverted all trimmedTag usages back to tag
  • Non-spaced references like {{inputs.parameters.foo}} are unaffected and retain strict validation

Verification

  1. Reproduced — added TestUndeclaredSpacedParamPassesValidation with a WorkflowTemplate referencing
    {{ inputs.parameters.chart-path }} (undeclared, with spaces). Confirmed it fails with
    templates.update-env: failed to resolve {{ inputs.parameters.chart-path }} on unmodified code.
  2. Unfixed — applied the revert to resolveAllVariables.
  3. Verified — the repro test now passes. Updated TestShouldCheckValidationToSpacedParameters
    (added by PR fix: verify whitespaced parameters in workflow templates. Fixes #11767 argoproj/argo-workflows#11781) to reflect the restored lax behaviour.
  4. Full ./workflow/... test suite run — all 37 packages pass, zero failures.

Documentation

No documentation changes needed — this is a scoped internal revert, not a new feature.

Intentionally reverts the whitespace trimming introduced in upstream
PR argoproj#11781 (commit 07c2560) to restore lenient input parameter
validation from v3.4.6 behaviour.

Templates using spaced references like '{{ inputs.parameters.foo }}'
where 'foo' is not declared in inputs will now pass validation again,
matching pre-v3.4.12 behaviour. Non-spaced references like
'{{inputs.parameters.foo}}' are unaffected and retain strict validation.

This is a scoped, intentional change for the akuity release-3.7.10
branch to allow Adobe customers to migrate their WorkflowTemplates
without immediate failures. Not intended for upstream contribution.

Refs: argoproj#11781, argoproj#11767
@jessesuen jessesuen merged commit a10b7ef into akuity:release-3.7.10 Apr 2, 2026
29 checks passed
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.

2 participants