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

TEP0107 - Parameter propagation doesn't work for taskSpec-steps-args #5141

Closed
Tracked by #4955
chuangw6 opened this issue Jul 14, 2022 · 2 comments
Closed
Tracked by #4955

TEP0107 - Parameter propagation doesn't work for taskSpec-steps-args #5141

chuangw6 opened this issue Jul 14, 2022 · 2 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@chuangw6
Copy link
Member

chuangw6 commented Jul 14, 2022

Expected Behavior

If users want to propagate parameters that are defined in taskrun to variable replacements, all places where param references can be used should be replaced with the actual value of parameters.

Actual Behavior

Currently, parameter propagation only works for steps-script field, not other fields i.e. steps-args.

Steps to Reproduce the Problem

  1. Try the following yaml file - a modified version of this example.
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  generateName: hello-
spec:
  params:
    - name: message
      value: "hello world!"
  taskSpec:
    # There are no explicit params defined here. They are derived from the TaskRun.
    steps:
    - name: default
      image: ubuntu
      args: [
        "echo",
        "$(params.message)",
      ]
  1. You will see the following error
validation failed: non-existent variable in "$(params.message)": spec.taskSpec.steps[0].args[1]

Additional Info

  • Kubernetes version:

    Output of kubectl version:

    Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.11-gke.1900", GitCommit:"1f775cfbf564daf2c8f0ba548eff09f58045c4a4", GitTreeState:"clean", BuildDate:"2022-04-13T09:36:54Z", GoVersion:"go1.16.15b7", Compiler:"gc", Platform:"linux/amd64"}
    WARNING: version difference between client (1.23) and server (1.21) exceeds the supported minor version skew of +/-1
    
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Client version: 0.21.0
Pipeline version: devel (latest main)
@chuangw6 chuangw6 added the kind/bug Categorizes issue or PR as related to a bug. label Jul 14, 2022
@chitrangpatel
Copy link
Contributor

/assign

@jerop jerop closed this as completed Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants