-
Bug
-
Resolution: Done
-
Critical
-
Pipelines 1.19.3
-
None
-
3
-
False
-
-
False
-
-
-
5
-
Pipelines Sprint Pioneers 39
Description of problem:
While running go test with coverage tekton-cache is causing permission issue.
go coverage requires that files inside the cache must have +x permissions but but default they just read permission only.
Workaround
Change the permission of cache dir before build
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
1. Install OSP Operator 1.20 or earlier
2. Create Pipeline
https://github.com/openshift-pipelines/tekton-caches/blob/272e490e9b1989ea463019ca70695c683379aa45/dev/examples/10_pipeline/00_pipeline-go.yaml
Point to note about this pipeline is build command. You must use this build command if using different pipeline
go test -v ./... --cover
3. Create Pipeline Run
https://github.com/openshift-pipelines/tekton-caches/blob/272e490e9b1989ea463019ca70695c683379aa45/dev/examples/20_pipelinerun/00_pipelinerun-go.yaml
Here we need to take note of golang image. golang version must be 1.25 or later. This issue was not there on earlier go version.
Pipeline Run should succeed without any issue. First time build do not involve caches.
4. Now Rerun same pipelinerun
This time cache will be downloaded so build will fail with some permission errors like
2025-09-05T11:43:30.678108604Z go tool covdata: fork/exec ../cache-workspace/cache/gocache/85/850f5a46643dc9e560c32596c9fc0ffba0db20f04682733af2d4aa80f2d73fdf-d/covdata: permission denied
This error indicates that build command was not able to execute the covdata which is required by --cover statement
Now Deploy the fix.
Update cache step actions with
https://raw.githubusercontent.com/openshift-pipelines/tekton-caches/refs/heads/main/tekton/cache-upload.yaml
Return the same pipeline once more.
This time again cache will be used but issue must not surface.
You may try trying the pipelinerun multiple times.
You may also try different combinations as per your test suits.
Actual results:
Expected results:
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):
*
- is cloned by
-
SRVKP-9036 QA-Tekton Cache Permission Denied Error Causes Pipeline Failure
-
- To Do
-