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

TaskRun creation fails, created from PipelineRun with TaskRunSpec #2682

Closed
jlpettersson opened this issue May 23, 2020 · 2 comments · Fixed by #2683
Closed

TaskRun creation fails, created from PipelineRun with TaskRunSpec #2682

jlpettersson opened this issue May 23, 2020 · 2 comments · Fixed by #2683
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jlpettersson
Copy link
Member

Expected Behavior

That I can declare TaskRunSpecs in the PipelineRun and TaskRun with the given spec is created.

Example:

piVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  generateName: git-clone-ssh-
spec:
  params:
  - name: git-url
    value: [email protected]:jlpettersson/myapp.git
  pipelineRef:
    name: pipeline-with-git-clone
  taskRunSpecs:
  - pipelineTaskName: git-clone
    taskPodTemplate:
      volumes:
      - name: ssh-auth
        projected:
          defaultMode: 0400
          sources:
          - secret:
              name: github-known-hosts
          - secret:
              name: github-private-key

As described in documentation about TaskRunSpec (However, there were errors in doc also, fixed in #2681)

Actual Behavior

TaskRun creation fails with:

status:
        conditions:
        - lastTransitionTime: "2020-05-23T17:03:00Z"
          message: 'failed to create task run pod "git-clone-ssh-n2lc8-git-clone-jrbjf":
            Pod "git-clone-ssh-n2lc8-git-clone-jrbjf-pod-hdww2" is invalid: spec.containers[0].volumeMounts[0].name:
            Not found: "ssh-auth". Maybe missing or invalid Task g/git-clone-ssh'
          reason: CouldntGetTask

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 23, 2020
jlpettersson added a commit to jlpettersson/pipeline that referenced this issue May 23, 2020
TaskRunSpec set in PipelineRun is never propagated to new TaskRuns in `createTaskRun()`, they are only propagated to Condition-pods in `makeConditionCheckContainer()`

This commit
- Adds propagation to new TaskRuns
- Also adds a unit test

Fixes tektoncd#2682

/kind bug
jlpettersson added a commit to jlpettersson/pipeline that referenced this issue May 23, 2020
TaskRunSpec set in PipelineRun is never propagated to new TaskRuns in `createTaskRun()`, they are only propagated to Condition-pods in `makeConditionCheckContainer()`

This commit
- Adds propagation to new TaskRuns
- Also adds a unit test

Fixes tektoncd#2682

/kind bug
@bobcatfish
Copy link
Collaborator

@jlpettersson does the volume ssh-auth definitely exist when this is running? the error seems to be implying it doesn't but maybe the error is misleading?

@jlpettersson
Copy link
Member Author

@jlpettersson does the volume ssh-auth definitely exist when this is running? the error seems to be implying it doesn't but maybe the error is misleading?

I created a PR as well. There was a missing piece in the implementation.

tekton-robot pushed a commit that referenced this issue Jun 2, 2020
TaskRunSpec set in PipelineRun is never propagated to new TaskRuns in `createTaskRun()`, they are only propagated to Condition-pods in `makeConditionCheckContainer()`

This commit
- Adds propagation to new TaskRuns
- Also adds a unit test

Fixes #2682

/kind bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants