tektoncd / tektoncd/operator

The TektonResults component cannot store logs information.

Open
#2,600 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Go
Stars
608
Forks
263
Avg merge
1d 3h
Merged PRs (30d)
125

Description

Expected Behavior

After enabling the logs API feature of TektonResults, logs can be stored normally.

Actual Behavior

Even if the switch is enabled in TektonConfig, logs still cannot be stored.

Steps to Reproduce the Problem

  1. Adjust TektonResults configuration
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonResult
metadata:
  name: result
spec:
  auth_disable: true
  db_enable_auto_migration: true
  db_host: 192.168.188.7
  db_name: qingliu_tektoncd_results_202502171201
  db_port: 5432
  is_external_db: true
  log_level: debug
  logging_pvc_name: tekton-logs
  logs_api: true        # <- enable logs api
  logs_path: /logs
  logs_type: File
  options: {}
  secret_name: tekton-results-postgres
  server_port: 8080
  targetNamespace: tekton-pipelines
  1. Restart the pod
$ kubectl delete pods -n tekton-pipelines -l app.kubernetes.io/name=tekton-results-watcher

$ kubectl delete pods -n tekton-pipelines -l app.kubernetes.io/name=tekton-results-api
  1. Create TaskRun
$ cat <<'EOF' | kubectl create -f -
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: hello
spec:
  taskSpec:
    steps:
      - name: hello
        image: alpine
        command: ["echo", "hello"]
EOF

Additional Info

  • Kubernetes version:

    Output of kubectl version:

    Client Version: v1.32.2
    Kustomize Version: v5.5.0
    Server Version: v1.28.13
    WARNING: version difference between client (1.32) and server (1.28) exceeds the supported minor version skew of +/-1
    
  • Tekton Operator version:

    • v0.75.0

Reference

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/reconciler/kubernetes/tektonresult/transform.go around lines 85-95 and compare the referenced PRs, especially PR 910. Reproduce the configuration with logs_api enabled, then verify that the tekton-results-watcher receives the corresponding startup parameters and that the TaskRun logs are stored.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.