-
Bug
-
Resolution: Done
-
Major
-
None
-
Pipelines 1.19.0
-
Pipelines Sprint Tekshift 34, Pipelines Sprint Tekshift 35, Pipelines Sprint Tekshift 36, Pipelines Sprint Tekshift 37
-
Customer Facing, Customer Reported
Description of problem:
When PaC attempts to report .tekton file validation errors on a gitlab merge request from a repository fork, it uses the Source Project ID in its API calls. However since the Merge Request is an object on the TargetProject this results in a 404 and no comments are added. In contrast, when we comment on a merge request with a status update we correctly use the Target Project ID. The Source Project ID should only be used when commenting on a commit.
Workaround:
When working on .tekton files in a Gitlab repo, don't use a fork
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Onboard a gitlab project to PaC
- fork the onboarded project
- commit an invalid pipelinerun to the .tekton directory in the fork
- create a merge request to the first project from the fork
Actual results:
No pipelines are started and no comments are added with the validation errors
Expected results:
PaC does not start any pipelines but comments on the MR with the pipelinerun validation errors
Reproducibility (Always/Intermittent/Only Once): Always
Acceptance criteria:
When a gitlab merge request from a forked project contains pipelinerun validation errors, those errors are added as comments on the merge request in the target repository
Definition of Done:
[] acceptance criteria is met
[] documentation is updated
[] release notes are included on this ticket
[] fix version(s) are added to the ticket
Build Details:
Additional info (Such as Logs, Screenshots, etc):
{"level":"error","ts":"2025-07-29T15:16:48.432Z","logger":"pipelinesascode","caller":"events/emit.go:46","msg":"cannot read the PipelineRun: .tekton/nhc-0-9-fbc-415-pull-request.yaml, error: yaml validation error: line 199: did not find expected '-' indicator","commit":"842f13c659870f5bb59c94fd2e92f44b18dbe02a","provider":"gitlab","event-id":"","event-sha":"6de1c742677ce79efd9ee35420f50f216ce1bd45","event-type":"no-ops-comment","namespace":"rhwa-tenant","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/events.(*EventEmitter).EmitMessage\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/events/emit.go:46\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).reportValidationErrors\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/errors.go:57\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).getPipelineRunsFromRepo\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:184\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:38\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:59\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:206"}{"level":"error","ts":"2025-07-29T15:16:48.503Z","logger":"pipelinesascode","caller":"events/emit.go:46","msg":"failed to create comment: 404 Not Found","commit":"842f13c659870f5bb59c94fd2e92f44b18dbe02a","provider":"gitlab","event-id":"","event-sha":"6de1c742677ce79efd9ee35420f50f216ce1bd45","event-type":"no-ops-comment","namespace":"rhwa-tenant","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/events.(*EventEmitter).EmitMessage\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/events/emit.go:46\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).reportValidationErrors\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/errors.go:66\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).getPipelineRunsFromRepo\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:184\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).matchRepoPR\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/match.go:38\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:59\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:60\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/adapter.go:206"}
*
- duplicates
-
SRVKP-8202 PaC doesn't report invalid PipelineRun YAML syntax error as comment on GitLab
-
- Closed
-
- is incorporated by
-
SRVKP-8551 Upgrade Konflux nightly build
-
- In Progress
-