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

The params in step are passed to stdoutConfig.path. #7753

Closed
cugykw opened this issue Mar 14, 2024 · 1 comment · Fixed by #7755
Closed

The params in step are passed to stdoutConfig.path. #7753

cugykw opened this issue Mar 14, 2024 · 1 comment · Fixed by #7755
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cugykw
Copy link
Contributor

cugykw commented Mar 14, 2024

Expected Behavior

In my taskrun resource, the params in spec and the params in step
have a variable with the same name. This can lead to unexpected behavior.

I've provided a simple example.

apiVersion: tekton.dev/v1alpha1
kind: StepAction
metadata:
  name: stepaction-demo
spec:
  params:
  - name: path
    type: string
  image: alpine
  workingDir: $(params.path)
  script: |
    env
    pwd
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: step-action-example
spec:
  params:
  - name: path
    value: /home/work
  taskSpec:
    steps:
    - params:
      - name: path
        value: $(params.path)/app/demo
      ref: 
        name: stepaction-demo
      name: demo
      stdoutConfig: 
        path: $(params.path)/log

image

I hope the stdoutConfig.path value is '/home/work/log', but got
'/home/work/app/demo/log'.

The stdoutConfig in step should be replaced by params in taskrun,
but it is replaced by params in step.

Additional Info

tekton: 0.53.0

@cugykw cugykw added the kind/bug Categorizes issue or PR as related to a bug. label Mar 14, 2024
@cugykw
Copy link
Contributor Author

cugykw commented Mar 14, 2024

/assign

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

Successfully merging a pull request may close this issue.

1 participant