argoproj/argo-events

Bitbucket Cloud - Invalid json payload data received

bilyboy785 opened this issue · 2 comments

Describe the bug
From what I understand from the documentation: I've deployed argo-events (clusterScope), eventbus, eventsource and sensor for BitbucketCloud with Basic Auth. The Bitbucket Webhook is generated when the eventSource is deployed, but I have no visibility of the token.

I manage to trigger a Workflow that calls a WorkflowTemplate, but the payload retrieved is not usable. Isn't there a problem with the token?

Did i miss something ?

To Reproduce
Steps to reproduce the behavior:

  1. Deploy argo-events with helm, clusterScoped
  2. Deploy the EventBus (default exampleà
  3. Deploy the eventSource (on bitbucket Cloud, a new Webhook is automatically created)
  4. Deploy the sensor
  5. Call the / to trigger the Workflow.

Here is the example Sensor to get the payload json data :

apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: mysensor
  namespace: argo-events
spec:
  template:
    serviceAccountName: argo-events-controller
  dependencies:
    - name: bitbucket
      eventSourceName: bitbucket
      eventName: myevent
  triggers:
    - template:
        name: debug
        argoWorkflow:
          operation: submit
          parameters:
            - src:
                dependencyName: bitbucket
                dataKey: body
              dest: spec.arguments.parameters.0.value
          source:
            resource:
              apiVersion: argoproj.io/v1alpha1
              kind: Workflow
              metadata:
                generateName: debug-
                namespace: mynamespace
              spec:
                arguments:
                  parameters:
                    - name: payload
                      value: hello world
                workflowTemplateRef:
                  name: debug

Expected behavior
I should get the json bitbucket payload (like this one repo:push) but i got something not human readable (see above screenshot)

Screenshots

Log from the sensor :

Webhook successfully called on bitbucket :

Environment (please complete the following information):

  • Kubernetes: v1.29.7-gke.1104000
  • Argo Workflows: v3.5.10
  • Argo Events: v1.9.2

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

The payload data seems to be base64 encoded. Any way to decode it before coming into argument ?