Skip to content

fix: fix CRDs and add test for #14991#15055

Merged
Joibel merged 1 commit intomainfrom
crds-and-test
Nov 21, 2025
Merged

fix: fix CRDs and add test for #14991#15055
Joibel merged 1 commit intomainfrom
crds-and-test

Conversation

@Joibel
Copy link
Member

@Joibel Joibel commented Nov 18, 2025

Adds test from #11610 for #14991
Fixes CRDs from #15028

Motivation

In testing #14991 I discovered I'd broken the test case from #11610 with #15028

Rather than try to push the test into #14991 I felt it easier to do that myself in this separate PR

Modifications

Allow templates in artifact names, CEL validation was strictly for literals not templates in that.

Add #11610's initial test case as an e2e test with minor modifications to make it work.

Verification

This adds a new test case which would fail without the CRD change enclosed and without #14991

Documentation

Non required

Signed-off-by: Alan Clucas <alan@clucas.org>
@Joibel Joibel marked this pull request as draft November 18, 2025 15:53
@Joibel Joibel marked this pull request as ready for review November 19, 2025 16:44
@Joibel Joibel requested review from MasonM and Copilot November 19, 2025 16:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes CRD validation patterns to allow template expressions in artifact names and adds comprehensive e2e test coverage for parameterized global artifacts in exit handlers. The changes address issue #14991 by relaxing the regex pattern to permit curly braces and dots, which are essential for template parameter substitution.

Key Changes

  • Updated artifact name validation pattern from ^[-a-zA-Z0-9_]+$ to ^[-a-zA-Z0-9_{}.]+$ to support template expressions like {{inputs.parameters.variable}}
  • Added e2e test that verifies parameterized artifact names work correctly in exit handlers with global artifacts
  • Ensured consistency across all CRD definitions, protobuf schemas, and documentation

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/testdata/exit-handler-parameterized-global-artifacts.yaml New test workflow demonstrating parameterized artifact names in exit handlers with withParam iteration
test/e2e/artifacts_test.go New test function validating that parameterized global artifacts are correctly resolved and accessible in exit handlers
pkg/apis/workflow/v1alpha1/workflow_types.go Updated Artifact.Name validation pattern to allow curly braces and dots
pkg/apis/workflow/v1alpha1/generated.proto Updated protobuf comment to reflect new validation pattern
pkg/plugins/executor/swagger.yml Updated swagger schema validation pattern for artifact names
docs/executor_swagger.md Updated documentation to reflect new artifact name validation rules
manifests/quick-start-*.yaml Updated CRD validation patterns in quick-start manifests (postgres, mysql, minimal)
manifests/base/crds/minimal/*.yaml Updated CRD validation patterns in minimal CRD definitions
manifests/base/crds/full/*.yaml Updated CRD validation patterns in full CRD definitions across all workflow resource types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Joibel Joibel merged commit 59f9b7b into main Nov 21, 2025
71 of 76 checks passed
@Joibel Joibel deleted the crds-and-test branch November 21, 2025 10:45
guanguxiansheng pushed a commit to guanguxiansheng/argo-workflows that referenced this pull request Dec 15, 2025
Signed-off-by: Alan Clucas <alan@clucas.org>
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.

3 participants