-
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
Params copied in all steps in saved pipeline in alpha mode on Openshift with tekton 0.29+ #4388
Comments
@wlynch I believe this is related to implicit parameters |
/assign wlynch |
Hi - Thanks for the feedback! This is intentional behavior, but by no means final (which is why it's behind the alpha flag). https://github.com/tektoncd/community/blob/main/teps/0023-implicit-mapping.md is the proposal describing the feature. The parameter copying was intended to make it clear how the params are made available to the underlying steps. Documentation can be found here: https://github.com/tektoncd/pipeline/blob/main/docs/pipelineruns.md#implicit-parameters This is good feedback though. Few questions:
This is an area I'm actively looking to improve, so would love to discuss this more! |
Hi @wlynch, I wasn't aware of this feature, sorry. I works on the IJ tekton plugin and we usually don't cover alpha stuff but we made an exception for the taskrun debug which, from an IDE perspective, is a must-have. This is how I faced this behavior. In my case, the pipeline couldn't get started because two params with the same name were in the same task. By reading the documentation and looking at the motivation this feature makes sense. I was a bit scared because I didn't expect to see params i didn't inserted in my pipeline and i thought "damn it's our plugin fault??". But if you are aware of it, the only drawback is that the pipeline gets longer. Maybe adding a flag to disable implicit params would make sense. Expert users could prefer to rely only on what they write. Just my 2 cent. Thanks!! |
Just to add another anecdotal here - we experienced some surprising behaviour in relation to this change during the release of 0.32 of Tekton Pipelines. One of our Pipelines relied on a default param value in a referenced Task, which was then unexpectedly overridden by the implicit param defined in the Pipeline. It's tricky to describe in words, here's a link to the PipelineTask as we had it before we noticed this behaviour and here's a link to the PipelineTask after we corrected for it. ^ In the first link we don't pass the edit: tried to disambiguate that the default was set in the referenced task. |
Based on this issue + additional feedback from @bobcatfish and @jerop, we're going to go ahead and remove the implicit behavior for Pipeline objects in #4511 for now. Plan is to roll this back and wait for user feedback / more discussion to figure out if this is something we want to support for Pipelines (as opposed to just PipelineRun/TaskRuns) in the future. |
For 0.32.1 release of Tekton, which Kubernetes cluster version we need to have? can any one please response on the same. |
@sushilHpal for 0.32.1, you need Kubernetes version 1.20 or later
|
Expected Behavior
Save my pipeline as it is
Actual Behavior
It's like params are being copied in all steps.
original pipeline -> https://gist.github.com/lstocchi/f7dc7aa051489001d76456493cdc6b73
saved pipeline (look at params in each step) -> https://gist.github.com/lstocchi/e9e7090c9eac6d329fcf80405f10f09e
Steps to Reproduce the Problem
enable-api-fields: alpha
Additional Info
Kubernetes version: Tried with two openshift clusters
Output of
kubectl version
:and
and
It works fine with 0.28.0.
The text was updated successfully, but these errors were encountered: