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

Updating PipelineRun params is not declarative #7963

Open
jimmyjones2 opened this issue May 20, 2024 · 2 comments
Open

Updating PipelineRun params is not declarative #7963

jimmyjones2 opened this issue May 20, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jimmyjones2
Copy link
Contributor

Expected Behavior

When PipelineRun params are updated, the PipelineRuns .spec is updated, and the PipelineRun is re-run, creating new TaskRuns and pods, and finally the .status is updated.

OR

The PipelineRun .spec (or at least params) are immutable, because once created the parameters cannot be reconciled

Actual Behavior

The PipelineRuns .spec is updated, but never reconciled and re-run. The PipelineRun .status remains with details of the PipelineRun run using the old parameters.

Steps to Reproduce the Problem

  1. kubectl apply -f
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: my-plr
spec:
  pipelineSpec:
    tasks:
      - name: foo
        params:
          - name: IMAGE
            value: xxx
        taskSpec:
          steps:
            - name: test
              image: ubuntu
              command: ["/bin/bash"]
              args:
                - -c
                - |
                  set -e
                  set -x
                  echo hello $(params.IMAGE)
  1. Edit above spec to change value of IMAGE
  2. kubectl apply -f

Additional Info

  • Kubernetes version:

    Output of kubectl version:

Client Version: v1.29.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.4
  • Tekton Pipeline version:
v0.53.0
@jimmyjones2 jimmyjones2 added the kind/bug Categorizes issue or PR as related to a bug. label May 20, 2024
@afrittoli
Copy link
Member

Thanks @jimmyjones2 - a PipelineRuns cannot be "re-run" - PipelineRuns are by design associated one-by-one with executions of pipelines.

We could prevent updates to the spec in *Run resources though - I believe it should be doable via the validating webhook. @tektoncd/core-maintainers WDYT?

@vdemeester
Copy link
Member

We could prevent updates to the spec in *Run resources though - I believe it should be doable via the validating webhook. @tektoncd/core-maintainers WDYT?

Yes, we could definitely do that 👍🏼

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