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

Add support for array task results as matrix parameters #6056

Closed
wants to merge 1 commit into from

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Jan 26, 2023

Changes

fixes #5925

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Array task results can now be used as the value for matrix parameters.

@abayer abayer added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 26, 2023
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jan 26, 2023
@tekton-robot tekton-robot requested review from dibyom and jerop January 26, 2023 19:46
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 26, 2023
@abayer
Copy link
Contributor Author

abayer commented Jan 26, 2023

/retest

1 similar comment
@abayer
Copy link
Contributor Author

abayer commented Jan 26, 2023

/retest

@abayer
Copy link
Contributor Author

abayer commented Jan 26, 2023

/hold
Until I add an example test. =)

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 26, 2023
@@ -178,7 +178,7 @@ func ApplyTaskResults(targets PipelineRunState, resolvedResultRefs ResolvedResul
pipelineTask := resolvedPipelineRunTask.PipelineTask.DeepCopy()
pipelineTask.Params = replaceParamValues(pipelineTask.Params, stringReplacements, arrayReplacements, objectReplacements)
if pipelineTask.IsMatrixed() {
pipelineTask.Matrix.Params = replaceParamValues(pipelineTask.Matrix.Params, stringReplacements, nil, nil)
pipelineTask.Matrix.Params = replaceParamValues(pipelineTask.Matrix.Params, stringReplacements, arrayReplacements, nil)
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to handle object replacements too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if objects actually make sense in a matrix params context - thoughts, @jerop?

Copy link
Member

@jerop jerop Jan 26, 2023

Choose a reason for hiding this comment

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

I also don't think we should handle object results - unless we're speaking of getting a particular value from the object as an item in the matrix array, but even then I'd like to leave that out for when we have use cases and explore it in detail

Copy link
Member

Choose a reason for hiding this comment

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

Thank you, never mind, it was a silly comment.
We might support objects in future there, to make it easier for a task to trigger a specific set of combinations of parameters through results, but that would be a new feature.

@afrittoli
Copy link
Member

Given the size of the change, and considering that without the feature "feeding results to a matrix" is incomplete, I would consider this PR for a v0.44.1. v0.44 is an LTS release, and it would be a pity for it to be this close to having this functionality.
wdyt?

@abayer abayer force-pushed the array-results-matrix branch from 08c0e15 to 21e8fc4 Compare January 27, 2023 13:27
@abayer
Copy link
Contributor Author

abayer commented Jan 27, 2023

/hold cancel

@afrittoli I agree - #6061 may also make sense to backport.

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 27, 2023
@abayer abayer force-pushed the array-results-matrix branch from 21e8fc4 to d034cd6 Compare January 27, 2023 14:02
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

thank you @abayer! 🙏🏾

only request is to add some details to the commit message, specifically that array results was supported after matrix was added and add a link to the section of TEP-0090 discussing this feature - https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md#specifying-results-in-the-matrix

@jerop jerop added this to the Pipelines v0.45 milestone Jan 27, 2023
@jerop
Copy link
Member

jerop commented Jan 27, 2023

@abayer it seems some changes are needed in the validation:
"validation.webhook.pipeline.tekton.dev" denied the request: validation failed: invalid value: parameters of type array only are allowed in matrix: spec.pipelineSpec.tasks[2].matrix[browser]

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lbernick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2023
@abayer
Copy link
Contributor Author

abayer commented Jan 27, 2023

it seems some changes are needed in the validation: "validation.webhook.pipeline.tekton.dev" denied the request: validation failed: invalid value: parameters of type array only are allowed in matrix: spec.pipelineSpec.tasks[2].matrix[browser]

Oh my, yes, this is a rathole. =) So the problem is that we're checking what the raw parsed type is - which will be a string, not an array, since the value is $(tasks.get-browsers.results.browsers[*]). If we turn off the validation check in validateParametersInTaskMatrix, things do just work (or rather, I thought they did, but in my local test, the controller is panicking in ValidateResolvedTaskResources, so there might be something more busted). Aaaanyway - the validation problem is that we're requiring the param value to be an array, but we don't actually know that the initially-parsed string $(tasks.get-browsers.results.browsers[*]) will end up being an array. And now it also appears that there are other issues with resolved task resources, but I haven't dug into that yet.

@abayer
Copy link
Contributor Author

abayer commented Jan 27, 2023

Ok, I have a fix for the validation that I'm fairly happy with, but the next problem is that by the time GetNamesOfTaskRuns(pipelineRun.Status.ChildReferences, pipelineTask.Name, pipelineRun.Name, pipelineTask.GetMatrixCombinationsCount()) gets called within ResolvePipelineTask, the array results parameter is still a string, meaning GetMatrixCombinationsCount() ends up returning 0 (because the "string" param has len(param.Value.ArrayVal) == 0). Digging further.

EDIT:
...yup, there's the problem. It's that matrix, as a whole, can't handle dynamically generated params, not specifically that it can't handle array results. It just doesn't know the size of the matrix at PipelineRun reconciliation time and that breaks a bunch of stuff.

With my validation change (basically just saying "ok, this matrix param is valid if either it's ParamTypeArray or it matches the form of $(whatever[*])), PipelineRun parameters can be used just fine, but not results. This is gonna require some serious thinking to figure out since PipelineRun reconciliation wants to know all the PipelineTasks it'll have to execute immediately, and when we're dependent on an earlier PipelineTask to finish before we know what the matrix combination count is, it's impossible to generate all the matrixed PipelineTask names until that earlier PipelineTask has completed.

cc @jerop

fixes tektoncd#5925

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer abayer force-pushed the array-results-matrix branch from d034cd6 to 513a55e Compare January 27, 2023 19:44
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 27, 2023
@abayer
Copy link
Contributor Author

abayer commented Jan 27, 2023

I've updated the PR with my fix for the validation issue, and with a unit test tweak to use an array result as a matrix parameter, to make it easier to dig into the problem.

@afrittoli
Copy link
Member

Thanks @abayer for the detailed investigation on this.

So it sounds like this:

  • this is not something we should backport to v0.44 as it will be a non-trivial change
  • we could perhaps detect and have a clearer error message for users that attempt to pass results into parameters, and backport that fix instead

wdyt?

@jerop jerop closed this Apr 20, 2023
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 20, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 21, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 24, 2023
This commit moves the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements. Note: This is only a validation change. Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.

This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 25, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 26, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 26, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 26, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 27, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 27, 2023
This commit moves the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements. Note: This is only a validation change. Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.

This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 27, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 27, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 27, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
…rameters

This commit adds support for using whole array PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
…arameters

This commit adds support for using whole array PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
…arameters

This commit adds support for using whole array PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
…arameters

This commit adds support for using whole array PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit moves the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements. Note: This is only a validation change. Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.

This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit moves the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements. Note: This is only a validation change. Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.

This issue is described in more detail here: tektoncd#6056
EmmaMunley added a commit to EmmaMunley/pipeline that referenced this pull request Apr 28, 2023
This commit adds support for using PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: tektoncd#6056
tekton-robot pushed a commit that referenced this pull request Apr 28, 2023
…arameters

This commit adds support for using whole array PipelineRun parameters as matrix parameter values by moving the validation for checking matrix parameter types to after parameter substitution. This is necessary for allowing whole array substitutions using the syntax $(params.foo[*]), rather than an explicit YAML array, to be used as a matrix parameter. Prior to this, validation fails because a string referencing an array type was considered a string type and this was done before the applying array replacements.
Note: Whole array replacements for matrix results has not yet been implemented and will be added in a subsequent PR.
This issue is described in more detail here: #6056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Array and Strings for Matrix param validation
7 participants