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

Can't read v1beta1 pipelineruns logs #1865

Closed
deepio opened this issue Jan 25, 2023 · 4 comments
Closed

Can't read v1beta1 pipelineruns logs #1865

deepio opened this issue Jan 25, 2023 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@deepio
Copy link

deepio commented Jan 25, 2023

Versions and Operating System

  • Kubernetes version: 1.25.4

    Output of kubectl version:

#kubectl version --output=yaml
clientVersion:
  buildDate: "2022-05-24T12:17:11Z"
  compiler: gc
  gitCommit: 3ddd0f45aa91e2f30c70734b175631bec5b5825a
  gitTreeState: clean
  gitVersion: v1.24.1
  goVersion: go1.18.2
  major: "1"
  minor: "24"
  platform: darwin/amd64
kustomizeVersion: v4.5.4
serverVersion:
  buildDate: "2022-12-16T19:44:08Z"
  compiler: gc
  gitCommit: b969368e201e1f09440892d03007c62e791091f8
  gitTreeState: clean
  gitVersion: v1.25.4
  goVersion: go1.19.3
  major: "1"
  minor: "25"
  platform: linux/amd64
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

v0.43.2

  • Operating System:

macos 12.5.1

Expected Behavior

Logs

Actual Behavior

W0125 12:45:25.473679   35773 reflector.go:347] github.com/tektoncd/pipeline/pkg/client/informers/externalversions/factory.go:117: watch of *v1.PipelineRun ended with: an error on the server ("unable to decode an event from the watch stream: unable to decode watch event: no kind \"PipelineRun\" is registered for version \"tekton.dev/v1\" in scheme \"github.com/tektoncd/pipeline/pkg/client/clientset/versioned/scheme/register.go:32\"") has prevented the request from succeeding

Steps to Reproduce the Problem

  1. Don't use tekton.dev/v1 because you can't specify serviceAccountName https://tekton.dev/docs/pipelines/pipelineruns/#configuring-a-pipelinerun
# When you do use v1, you get this.
admission webhook "webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "serviceAccountName"
  1. Apply a pipelinerun: kubectl apply -f test.yaml
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: "testing-stuff"
  namespace: <snip>
  labels:
    app.kubernetes.io/name: python
    app.kubernetes.io/component: pipelinerun
    app.kubernetes.io/part-of: <snip>
    app.kubernetes.io/managed-by: <snip>
spec:
  serviceAccountName: <snip>
  pipelineRef:
    name: run-python-tests
  timeouts:
    pipeline: "3h0m0s"
  params:
    <snip>

  workspaces:
    - name: codebase
      volumeClaimTemplate:
        metadata:
          name: testing-stuff"
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 15Gi
  1. If you ask for the logs using something like k9s or lens, you can see them and the build is running.
  2. kubectl logs --selector=tekton.dev/pipelineRun=testing-stuff -n harbormaster --all-containers doesn't give logs for the tasks, only the pipelinerun? Must use selector=tekton.dev/taskRun to get the task logs?

Additional Info

This may be a problem for both pipelines and the cli

@deepio deepio added the kind/bug Categorizes issue or PR as related to a bug. label Jan 25, 2023
@deepio deepio closed this as completed Jan 25, 2023
@deepio deepio reopened this Jan 25, 2023
@lbernick
Copy link
Member

lbernick commented Feb 7, 2023

@deepio FYI you can specify a service account for a v1 pipelinerun using pipelinerun.spec.taskRunTemplate.serviceAccountName

@deepio
Copy link
Author

deepio commented Feb 7, 2023

@lbernick that's not important because I can continue to use the beta resource. The real problem is inconsistent logging as-per the title. If there is no log then there's no proof of what happened and it's all for naught. Tkn has problems retrieving logs on steps that occur on or after retries when they are clearly visible in other manual applications such as lens, or k9s.

@lbernick
Copy link
Member

lbernick commented Feb 7, 2023

Thanks, I should have read the issue in more detail. This looks like a duplicate of #1847 which has been addressed on main (although I am not sure if it has been released yet)

@piyush-garg
Copy link
Contributor

PR added

This should be fixed with 0.30.0 release

@piyush-garg piyush-garg added this to the 0.30.0 milestone Mar 27, 2023
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

No branches or pull requests

3 participants