tektoncd / tektoncd/pipelines-as-code

gitlab push trigger cannot report back to gitlab API

Open
#2,029 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority/high
Dominant language
Go
Stars
214
Forks
144
Avg merge
2d 11h
Merged PRs (30d)
27

Description

{"level":"error","ts":"2025-03-27T09:39:39.379Z","logger":"pipelinesascode","caller":"events/emit.go:46","msg":"cannot set status with the GitLab token because of:

POST https://gitlab.com/api/v4/projects/68303507/statuses/aa773a3da0e8574973ab25b39487e59447affeb4:

400 {message: {target_url: [is blocked: URI is invalid]}}",

"commit":"7bc6dd6","provider":"gitlab","event-id":"92f7950553becfa83b53a4151c75191c","event-sha":"aa773a3da0e8574973ab25b39487e59447affeb4","event-type":"Push","namespace":"jumpstarter-kc25-helm-pipelines","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/events.(*EventEmitter).EmitMessage\n\tgithub.com/openshift-pipelines/pipelines-as-code/pkg/events/emit.go:46\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab.(*Provider).CreateStatus\n\tgithub.com/openshift-pipelines/pipelines-as-code/pkg/provider/gitlab/gitlab.go:226\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run.func1\n\tgithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:115"}

There is an error in my pipelinerun.yaml and the controller is unable to report back.

https://gitlab.com/mangelajo/jumpstarter-kc25-devspace/-/pipelines/1737814959

Other runs were mildly ok... i.e. the pipelinerun started at least, but a task failed:
https://gitlab.com/mangelajo/jumpstarter-kc25-devspace/-/pipelines

Image

Context: this is an install on vanilla k8s for a Kubecon demo I am preparing.

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

The failure path is in pkg/provider/gitlab/gitlab.go at CreateStatus, with reporting surfaced through pkg/events/emit.go; begin by tracing how target_url is built for push events. Reproduce the GitLab status update and verify that a valid target_url is accepted and the pipeline error is reported back.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, go, kubernetes
Domain
api, backend, ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.