openshift-pipelines / console-plugin

OpenShift Pipelines (and Tekton) OpenShift console dynamic plugin
Apache License 2.0
2 stars 15 forks source link

SRVKP-6733: ReRun of Resolver based PipelineRuns fails from UI #182

Closed lokanandaprabhu closed 1 week ago

lokanandaprabhu commented 2 weeks ago

Fixes: https://issues.redhat.com/browse/SRVKP-6733

Analysis / Root cause: PipelineRun with Resolver case was not handled. Only Pipeline name was sent at the time of rerun under pipelineRef.

Solution Description: If PLR is using resolver, instead of sending pipeline name in pipelineRef, resolver and params values are used.

Screen shots / Gifs for design review:

-----BEFORE-----

----Rerun in PLR details page--- https://github.com/user-attachments/assets/5cb4a51b-4ef5-4c1c-aa46-131ab9f04bfd


----Rerun in PLR list page---

https://github.com/user-attachments/assets/f8ac7137-8723-42bd-a0fd-6e3c8b870d0a


-----AFTER-----

----Rerun in PLR details page---

https://github.com/user-attachments/assets/48a74912-cf12-48ca-ab3a-90c9f1030508


----Rerun in PLR list page---

https://github.com/user-attachments/assets/ee44e07c-e92c-4e51-a875-3ac80a9f14c0

Test setup:

  1. Create a resolver based pipelinerun using https://tekton.dev/docs/pipelines/resolution-getting-started/ or use the below provided yaml directly.
  2. Attempt to "ReRun" the same from Console
kind: PipelineRun
apiVersion: tekton.dev/v1
metadata:
  name: run-basic-pipeline-from-git
spec:
  pipelineRef:
    resolver: git
    params:
    - name: url
      value: https://github.com/lokanandaprabhu/pipelines-testing
    - name: revision
      value: main
    - name: pathInRepo
      value: pipeline.yaml
  params:
  - name: username
    value: admin
openshift-ci-robot commented 2 weeks ago

@lokanandaprabhu: This pull request references SRVKP-6733 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift-pipelines/console-plugin/pull/182): >**Fixes:** >https://issues.redhat.com/browse/SRVKP-6733 > >**Analysis / Root cause:** >PipelineRun with Resolver case was not handled. Only Pipeline name was sent at the time of rerun under pipelineRef. > >**Solution Description:** >If PLR is using resolver, instead of sending pipeline name in pipelineRef, resolver and params values are used. > >**Screen shots / Gifs for design review:** > >**-----BEFORE-----** > >----Rerun in PLR details page--- >https://github.com/user-attachments/assets/5cb4a51b-4ef5-4c1c-aa46-131ab9f04bfd > >---- > >----Rerun in PLR list page--- > >https://github.com/user-attachments/assets/f8ac7137-8723-42bd-a0fd-6e3c8b870d0a > >---- > >**-----AFTER-----** > >----Rerun in PLR details page--- > >https://github.com/user-attachments/assets/48a74912-cf12-48ca-ab3a-90c9f1030508 > >---- > >----Rerun in PLR list page--- > >https://github.com/user-attachments/assets/ee44e07c-e92c-4e51-a875-3ac80a9f14c0 > >**Test setup:** > >1. Create a resolver based pipelinerun using https://tekton.dev/docs/pipelines/resolution-getting-started/ or use the below provided yaml directly. >2. Attempt to "ReRun" the same from Console > >``` >kind: PipelineRun >apiVersion: tekton.dev/v1 >metadata: > name: run-basic-pipeline-from-git >spec: > pipelineRef: > resolver: git > params: > - name: url > value: https://github.com/lokanandaprabhu/pipelines-testing > - name: revision > value: main > - name: pathInRepo > value: pipeline.yaml > params: > - name: username > value: admin >``` Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift-pipelines%2Fconsole-plugin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lokanandaprabhu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift-pipelines/console-plugin/blob/main/OWNERS)~~ [lokanandaprabhu] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
lokanandaprabhu commented 17 hours ago

/cherrypick release-v1.15.x

openshift-cherrypick-robot commented 17 hours ago

@lokanandaprabhu: new pull request created: #189

In response to [this](https://github.com/openshift-pipelines/console-plugin/pull/182#issuecomment-2496846308): >/cherrypick release-v1.15.x Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.