Skip to content

bitbucketcloud: cel expression parsing error #2335

@gerrnot

Description

@gerrnot

Using a standard push event emitted by a bitbucket cloud webhook, the openshift-pipelines/pipelines-as-code-controller-* (version: v0.37.3) pod logs a parsing error even when using the most simple CEL expression imaginable.

In .tekton/cd-pipeline-dev.yaml I configured a PipelineRun (that worked when not using cel expressions) that looked like this:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: cd-pipeline-dev
  annotations:
    pipelinesascode.tekton.dev/on-cel-expression: |
      true
... (rest truncated)

The error that is thrown in the mentioned pod:

{"level":"error","ts":"2025-11-26T09:32:54.671Z","logger":"pipelinesascode","caller":"matcher/annotation_matcher.go:282","msg":"there was an error evaluating the CEL expression, skipping: json: cannot unmarshal string into Go value of type map[string]interface {}","commit":"10dee4fce84b750d7597e61d78a420101ab36d78","provider":"bitbucket-cloud","event-id":"","event-sha":"2d131ec316899a34bb78e00fd7f7bb931112d8da","event-type":"push","source-repo-url":"https://bitbucket.org/walter-group/tkn-demo-go-bb","target-branch":"test-cel","namespace":"phx","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/matcher.MatchPipelinerunByAnnotation\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/matcher/annotation_matcher.go:282\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:282\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:58\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:75\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"}

It seems that cel expression were either never working or are at least broken for the mentioned version of PAC and current version of Bitbucket cloud.

Appreciating a fix!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions