When no subscription is provided, PubSub Consume task should automatically create a subscription as specified in the description of the subscription attribute.
Actual Behaviour
When no subscription is provided, PubSub Consume task fails with NullPointerException.
Here is the stacktrace:
2024-03-23 15:59:18.522 java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903)
at com.google.pubsub.v1.ProjectSubscriptionName.<init>(ProjectSubscriptionName.java:57)
at com.google.pubsub.v1.ProjectSubscriptionName.<init>(ProjectSubscriptionName.java:29)
at com.google.pubsub.v1.ProjectSubscriptionName$Builder.build(ProjectSubscriptionName.java:157)
at com.google.pubsub.v1.ProjectSubscriptionName.of(ProjectSubscriptionName.java:61)
at io.kestra.plugin.gcp.pubsub.AbstractPubSub.createSubscription(AbstractPubSub.java:45)
at io.kestra.plugin.gcp.pubsub.Consume.run(Consume.java:84)
at io.kestra.plugin.gcp.pubsub.Consume.run(Consume.java:29)
at io.kestra.core.runners.Worker$WorkerThread.run(Worker.java:710)
Steps To Reproduce
Take the example flow, and put in appropriate values.
Do not add the subscription attribute to the task.
Execute the task. The execution fails with NullPointerException.
I also tried by adding autoCreateSubscription: true, but still the same error.
Environment Information
Kestra Version: 0.15.5
Plugin version: 0.15.5
Operating System (OS / Docker / Kubernetes): Docker
Expected Behavior
When no subscription is provided, PubSub Consume task should automatically create a subscription as specified in the description of the
subscription
attribute.Actual Behaviour
When no subscription is provided, PubSub Consume task fails with NullPointerException.
Here is the stacktrace:
Steps To Reproduce
subscription
attribute to the task.I also tried by adding
autoCreateSubscription: true
, but still the same error.Environment Information
Example flow