Uploaded image for project: 'Docs for Red Hat Developers'
  1. Docs for Red Hat Developers
  2. RHDEVDOCS-6177

[DOCS] 1.15 Breaking change regarding optional workspaces in PipelineRun

XMLWordPrintable

    • devex docs #262 16 Sep - 7 Oct, devex docs #263 9 Oct - 28 Oct, devex docs #263 Oct28 - Nov 18, devex docs #264 Jan13 - Feb03
    • 3
    • ---
    • ---

      Description of problem:

      PipelineRuns using workspaces may fail in 1.15 due to the workspaces not being marked as optional. This seems like it is the intended behavior, but this does not occur in 1.14, which can lead to breaking user's pipelines on upgrade to 1.15.

      No presently known workaround other than explicitly marking the workspace as optional.

      Prerequisites (if any, like setup, operators/versions):

      OpenShift Pipelines 1.15

      Steps to Reproduce

      1.  Install Pipelines 1.15 to OCP cluster
      2. Create PipelineRun with (unneeded) workspace that's not marked optional:
      ---
      apiVersion: tekton.dev/v1
      kind: PipelineRun
      metadata:
        name: test-workspace-plr
      spec:
        pipelineSpec:
          tasks:
            - name: echo-hello
              taskSpec:
                steps:
                  - name: echo
                    image: registry.access.redhat.com/ubi9/ubi-micro
                    env:
                      - name: HOME
                        value: $(workspaces.source.path)  # note workspace mentioned here
                    script: |
                      #!/usr/bin/env bash
                      echo "hello world"
      

      Actual results:

      PipelineRun will fail in 1.15, citing error

      expected workspace "source" to be provided by pipelinerun for pipeline task "echo-hello"

      PipelineRun runs just fine in 1.14.

      Expected results:

      PipelineRun fails in both 1.14 and 1.15, but more importantly, this change is documented if expected.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

      Issue is clarified to be unintentional, or is documented as a breaking change in 1.15

              mramendi Mikhail Ramendik
              rhn-support-jorbell Jordan Bell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: