kestra-io / plugin-gcp

Apache License 2.0
6 stars 10 forks source link

Results downloaded by Pubsub Consume task cannot be previewed #351

Open shrutimantri opened 5 months ago

shrutimantri commented 5 months ago

Preview on the downloaded results from PubSub Consume task failed to be previewed. It gives Error 500. Screenshot 2024-03-23 at 3 57 46 PM

However, it is able to read the uri using Render Expression. Screenshot 2024-03-23 at 4 08 41 PM

Steps To Reproduce

  1. Use the example Publish task to publish the messages.
  2. Then run the Consume task to consume these messages.
  3. Preview the output of the Consume task.

Environment Information

Example flow

Publish Task:

id: "publish"
type: "io.kestra.plugin.gcp.pubsub.Publish"
projectId: <project-id>
serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
topic: topic-test
from:
-  data: "{{ 'base64-encoded-string-1' | base64encode }}"
   attributes:
       testAttribute: KestraTest
   messageId: '1234'
-  data: "{{ 'base64-encoded-string-2' | base64encode }}"
-  attributes:
       testAttribute: KestraTest

Consume Task

id: pubsub-consume
namespace: dev
tasks:
  - id: "consume"
    type: "io.kestra.plugin.gcp.pubsub.Consume"
    projectId: <project-id>
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
    topic: smantri-test
    maxRecords: 3
    subscription: <subscription-id>