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

Failed to rerun PipelineRun requires WorkspaceBinding #2662

Closed
chechiachang opened this issue May 21, 2020 · 2 comments
Closed

Failed to rerun PipelineRun requires WorkspaceBinding #2662

chechiachang opened this issue May 21, 2020 · 2 comments
Labels
kind/question Issues or PRs that are questions around the project or a particular feature triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@chechiachang
Copy link
Contributor

chechiachang commented May 21, 2020

I have a pipeline require a workspace. The pipeline can be triggered by

web hook -> TriggerTemplate (providing VolumeClaimTemplate) -> PipelineRun

The PipelineRun works perfect, but it can't rerun from dashboard. This makes sense since the rerun don't provide required WorkspaceBinding. Is there a better way to provide WorkspaceBinding?

Expected Behavior

Successfully rerun from dashboard (or /rerun api)

Actual Behavior

PipelineRun failed to create TaskRun.

kubectl get pipelinerun
NAME                       SUCCEEDED   REASON            STARTTIME   COMPLETIONTIME
tekton-cd-wn4bw            True        Completed         155m        154m
tekton-cd-wn4bw-r-hbrzf    Unknown                       38m
tkn pipelinerun logs tekton-cd-wn4bw-r-hbrzf
Pipeline still running ...
No logs found

Controller log error:

kubectl logs tekton-pipelines-controller
..."msg":"Reconcile error: error creating TaskRun called tekton-cd-wn4bw-r-hbrzf-git-
clone-q4pbw for PipelineTask generic-git-clone from PipelineRun tekton-cd-wn4bw-r-
hbrzf: admission webhook \"validation.webhook.pipeline.tekton.dev\" denied the request:
validation failed: expected exactly one, got neither: workspace.configmap,
workspace.emptydir, workspace.persistentvolumeclaim, workspace.secret,
workspace.volumeclaimtemplate"...

Steps to Reproduce the Problem

Pipeline

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: tekton-cd
spec:
  workspaces:
    - name: shared-workspace
  params:
  tasks:
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
  name: tekton-cd
  namespace: tekton-pipelines
spec:
  params:
  resourcetemplates:
    - apiVersion: tekton.dev/v1beta1
      kind: PipelineRun
      metadata:
        generateName: tekton-cd-
      spec:
        pipelineRef:
          name: tekton-cd
        workspaces:
          - name: shared-workspace
            volumeClaimTemplate:
              spec:
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
  1. Trigger PipelineRun with webhook & TriggerTemplate -> Succeeded.
  2. Rerun the same PipelineRun from dashboard -> Failed.

Additional Info

What I've tried:

  1. Use Git PipelineSource: In my case, the workspace contains a git source. The same Pipeline works if I replace workspace with Git PipelineResource.
  2. Allocate PVC with kubectl and then use existing pvc as workspace. This block Pipeline from parallel run
workspaces:
- name: myworkspace
  persistentVolumeClaim:
    claimName: my-existing-pvc
  • Kubernetes version:
Client Version: version.Info{
	Major: "1",
	Minor: "17",
	GitVersion: "v1.17.3",
	GitCommit: "06ad960bfd03b39c8310aaf92d1e7c12ce618213",
	GitTreeState: "clean",
	BuildDate: "2020-02-11T18:14:22Z",
	GoVersion: "go1.13.6",
	Compiler: "gc",
	Platform: "darwin/amd64"
}
Server Version: version.Info{
	Major: "1",
	Minor: "16+",
	GitVersion: "v1.16.8-gke.15",
	GitCommit: "9cabee15e0922c3b36724de4866a98f6c2da5e6a",
	GitTreeState: "clean",
	BuildDate: "2020-05-01T21:47:04Z",
	GoVersion: "go1.13.8b4",
	Compiler: "gc",
	Platform: "linux/amd64"
}
  • Tekton Pipeline version:
Client version: 0.9.0
Pipeline version: v0.12.0
@bobcatfish
Copy link
Collaborator

Hey @chechiachang ! This seems like a reasonable request but I don't really have enough knowledge about how dashboard works to address it - would you be able to re-open this issue in https://github.com/tektoncd/dashboard instead? I think the folks over there could probably give you a better answer :D

@bobcatfish bobcatfish added kind/question Issues or PRs that are questions around the project or a particular feature triage/needs-information Indicates an issue needs more information in order to work on it. labels May 28, 2020
@ghost
Copy link

ghost commented Jul 7, 2020

I'm going to close this since it's an issue with the way the dashboard reruns pipelines. I don't think there's much that Pipelines can do to help here, though happy to discuss further if there is. Feel free to open an issue at https://github.com/tektoncd/dashboard if needed or reopen this one if you think there's more pipelines can do. Thanks for the issue report!

@ghost ghost closed this as completed Jul 7, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Issues or PRs that are questions around the project or a particular feature triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants