tektoncd / cli

A CLI for interacting with Tekton!
Apache License 2.0
429 stars 250 forks source link

Support pipeline matrix feature #1661

Open afrittoli opened 2 years ago

afrittoli commented 2 years ago

Feature request

Support all usual commands in case of tekton matrix.

Use case

Interact with Tekton pipelines that make use of matrix.

UI Example

I think the basic support would be make the logs command work. The current behaviour lists all tasks but the logs are only those of the first taskrun from the matrix.

$ tkn pr describe matrixed-pr-hl56m
Name:                  matrixed-pr-hl56m
Namespace:             default
Service Account:       default
Timeout(Deprecated):   1h0m0s
Labels:
 tekton.dev/pipeline=matrixed-pr-hl56m

🌡️  Status

STARTED         DURATION   STATUS
5 minutes ago   31s        Succeeded

🗂  Taskruns

 NAME                                               TASK NAME                    STARTED         DURATION   STATUS
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-4   platforms-and-browsers-dag   5 minutes ago   7s         Succeeded
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-5   platforms-and-browsers-dag   5 minutes ago   15s        Succeeded
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-0   platforms-and-browsers-dag   5 minutes ago   10s        Succeeded
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-1   platforms-and-browsers-dag   5 minutes ago   10s        Succeeded
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-2   platforms-and-browsers-dag   5 minutes ago   11s        Succeeded
 ∙ matrixed-pr-hl56m-platforms-and-browsers-dag-3   platforms-and-browsers-dag   5 minutes ago   12s        Succeeded
 ∙ matrixed-pr-hl56m-get-platforms                  get-platforms                5 minutes ago   8s         Succeeded
 ∙ matrixed-pr-hl56m-get-browsers                   get-browsers                 5 minutes ago   15s        Succeeded

But in the logs:

$ tkn pr logs matrixed-pr-hl56m -f
[get-platforms : echo] linuxmacwindows

[get-browsers : echo] chromesafarifirefox

[platforms-and-browsers-dag : echo] windows and chrome

It might be nice to highlight the matrix better in the CLI view as well, for instance by visually grouping TaskRuns that belong to a matrix and which TaskRun is associated with this tuple of inputs.

vinamra28 commented 1 year ago

/assign

tekton-robot commented 1 year ago

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 commented 1 year ago

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.

vdemeester commented 1 year ago

/lifecycle frozen