pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Fully support dot in result name

Open Yongxuanzhang opened this issue 3 years ago • 10 comments

Feature request

TEP-0080 proposes supporting dot in param and result names but we cannot really use dot in result name for param replacement. This seems a missing feature in current code base.

Use case

see the example:

apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: pipelinerun-results-name-dot
spec:
  pipelineSpec:
    tasks:
      - name: task1
        taskSpec:
          results:
            - name: string.results
              description: The current date in human readable format
          steps:
            - name: write-json
              image: bash:latest
              script: |
                #!/usr/bin/env bash
                echo -n "hello" | tee $(results["string.results"].path)
      - name: task2
        params:
          - name: foo
            value: "$(tasks.task1.results["string.results"])"
        taskSpec:
          params:
            - name: foo
              type: string
              default: "world"
          steps:
              - name: print-param
                image: bash:latest
                args: [
                  "echo",
                  "$(params.foo)"
                  ]


Yongxuanzhang avatar May 25 '22 20:05 Yongxuanzhang

cc @mattmoor @skaegi may be of interest to you as the authors of TEP-0080

jerop avatar May 25 '22 21:05 jerop

Doesn't it already? 🤔

mattmoor avatar May 25 '22 22:05 mattmoor

If it doesn't, it's a regression: https://github.com/mattmoor/mink/blob/b9148a39b2d8bbc69ca9aaf5e89a7613c0b179d8/examples/kaniko.yaml#L27

mattmoor avatar May 25 '22 23:05 mattmoor

If it doesn't, it's a regression: https://github.com/mattmoor/mink/blob/b9148a39b2d8bbc69ca9aaf5e89a7613c0b179d8/examples/kaniko.yaml#L27

It's probably partly supported, we can have dot in result name and emit results, but we seems don't support to use it as reference and pass to param value. Like the use case in example

Yongxuanzhang avatar May 25 '22 23:05 Yongxuanzhang

Ah cool, I may have missed something! Definitely worth fixing this.

mattmoor avatar May 25 '22 23:05 mattmoor

Ah cool, I may have missed something! Definitely worth fixing this.

@mattmoor FYI. From the validation webhook perspective, a reference like $(tasks.myTask.results["foo.bar"]) will be treated as an invalid expression because this parsing function doesn't allow that.

chuangw6 avatar May 26 '22 02:05 chuangw6

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Aug 24 '22 03:08 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Sep 23 '22 03:09 tekton-robot

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Jan 02 '23 17:01 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Feb 01 '23 17:02 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar Mar 03 '23 17:03 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tekton-robot avatar Mar 03 '23 17:03 tekton-robot