Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket Cloud - Invalid json payload data received #3272

Open
bilyboy785 opened this issue Sep 4, 2024 · 2 comments
Open

Bitbucket Cloud - Invalid json payload data received #3272

bilyboy785 opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working stale

Comments

@bilyboy785
Copy link

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.

@bilyboy785 bilyboy785 added the bug Something isn't working label Sep 4, 2024
@bilyboy785
Copy link
Author

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

Copy link
Contributor

github-actions bot commented Nov 5, 2024

This issue has been automatically marked as stale because it has not had
any activity in the last 60 days. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant