kestra-io / plugin-gcp

Apache License 2.0
9 stars 10 forks source link

PubSub Publish task is successful even when no PubSub topic exists #349

Open shrutimantri opened 8 months ago

shrutimantri commented 8 months ago

Expected Behavior

The PubSub Publish task should fail if the publish did not take place (when the topic itself did not exist).

Actual Behaviour

The PubSub Publish task is successful when there is no PubSub topic.

Steps To Reproduce

  1. Ensure the PubSub topic does not exist.
  2. Run the example flow of PubSub publish task.
  3. Execution will be successful.

Environment Information

Example flow

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