-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[TEP-0075] Support Object Results substitution #5083
Conversation
Skipping CI for Draft Pull Request. |
The following is the coverage report on the affected files.
|
/assign @ywluogg |
7861b38
to
7ad27e3
Compare
The following is the coverage report on the affected files.
|
pipelineTask.Params = replaceParamValues(pipelineTask.Params, stringReplacements, arrayReplacements, nil) | ||
pipelineTask.Matrix = replaceParamValues(pipelineTask.Matrix, stringReplacements, arrayReplacements, nil) | ||
pipelineTask.Params = replaceParamValues(pipelineTask.Params, stringReplacements, arrayReplacements, objectReplacements) | ||
pipelineTask.Matrix = replaceParamValues(pipelineTask.Matrix, stringReplacements, arrayReplacements, objectReplacements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't want matrix to support nested values right now. This would essentially mean matrix can be [[array, object], [etc.]], is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh thanks! I will remove it from Matrix, and I also don't add tests for Matrix, better leave it,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
7ad27e3
to
b66c26d
Compare
The following is the coverage report on the affected files.
|
/lgtm |
/retest |
examples/v1beta1/pipelineruns/alpha/pipeline-object-results.yaml
Outdated
Show resolved
Hide resolved
for _, resolvedPipelineRunTask := range targets { | ||
if resolvedPipelineRunTask.PipelineTask != nil { | ||
pipelineTask := resolvedPipelineRunTask.PipelineTask.DeepCopy() | ||
pipelineTask.Params = replaceParamValues(pipelineTask.Params, stringReplacements, arrayReplacements, nil) | ||
pipelineTask.Matrix = replaceParamValues(pipelineTask.Matrix, stringReplacements, arrayReplacements, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed with @ywluogg in the thread above (unresolved it now), she suggests we don't support array and object for Matrix now. The array is added in previous PR by mistake. It is out of scope of TEP 75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks!
This is part of work in TEP-0075. This commit provides the support to apply object results replacements. Previous this commit we support emitting object results so users can write object results to task level, but we cannot pass object results from one task to another within one pipeline. This commit adds the support for this.
b66c26d
to
441d819
Compare
The following is the coverage report on the affected files.
|
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
/retest |
1 similar comment
/retest |
Changes
This is part of work in TEP-0075.
This commit provides the support to apply object results replacements.
Previous this commit we support emitting object results so users can
write object results to task level, but we cannot pass object results from
one task to another within one pipeline. This commit adds the support for this.
Note that this commit does not support
object
andarray
results forMatrix
/kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
(if there are no user facing changes, use release note "NONE")
Release Notes