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

AWS SNS Publish task fails with an error #363

Open
shrutimantri opened this issue Jan 28, 2024 · 1 comment
Open

AWS SNS Publish task fails with an error #363

shrutimantri opened this issue Jan 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@shrutimantri
Copy link
Contributor

Expected Behavior

The example mentioned on this page should run successfully and publish a message to a SNS topic.

Actual Behaviour

The example mentioned on this page fails with the following error:

2024-01-28 20:09:28.954Cannot cast java.util.LinkedHashMap to io.kestra.plugin.aws.sns.model.Message
2024-01-28 20:09:28.954java.lang.ClassCastException: Cannot cast java.util.LinkedHashMap to io.kestra.plugin.aws.sns.model.Message
	at java.base/java.lang.Class.cast(Unknown Source)
	at io.reactivex.internal.functions.Functions$CastToClass.apply(Functions.java:222)
	at io.reactivex.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:63)
	at io.reactivex.internal.operators.flowable.FlowableFromArray$ArraySubscription.fastPath(FlowableFromArray.java:132)
	at io.reactivex.internal.operators.flowable.FlowableFromArray$BaseArraySubscription.request(FlowableFromArray.java:88)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153)
	at io.reactivex.internal.operators.flowable.FlowableReduceMaybe$ReduceSubscriber.onSubscribe(FlowableReduceMaybe.java:94)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67)
	at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67)
	at io.reactivex.internal.operators.flowable.FlowableFromArray.subscribeActual(FlowableFromArray.java:38)
	at io.reactivex.Flowable.subscribe(Flowable.java:14935)
	at io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:37)
	at io.reactivex.Flowable.subscribe(Flowable.java:14935)
	at io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:37)
	at io.reactivex.Flowable.subscribe(Flowable.java:14935)
	at io.reactivex.internal.operators.flowable.FlowableReduceMaybe.subscribeActual(FlowableReduceMaybe.java:57)
	at io.reactivex.Maybe.subscribe(Maybe.java:4290)
	at io.reactivex.Maybe.blockingGet(Maybe.java:2320)
	at io.kestra.plugin.aws.sns.Publish.run(Publish.java:85)
	at io.kestra.plugin.aws.sns.Publish.run(Publish.java:26)
	at io.kestra.core.runners.Worker$WorkerThread.run(Worker.java:684)

Steps To Reproduce

  1. Create a flow with the task mentioned in the example on the SNS Publish task page
  2. Provide correct accessKeyId, secretKeyId, region and topicArn.
  3. Run the flow.

Environment Information

  • Kestra Version: 0.13.8
  • Plugin version: 0.13.8
  • Operating System (OS / Docker / Kubernetes): Docker
  • Java Version (If not docker):

Example flow

id: "publish"
type: "io.kestra.plugin.aws.sns.Publish"
accessKeyId: "<access-key>"
secretKeyId: "<secret-key>"
region: "eu-central-1"
topicArn: "arn:aws:sns:eu-central-1:000000000000:MessageTopic"
from:
- data: Hello World
- data: Hello Kestra
  subject: Kestra

Also tried by enclosing the data and subject in double quotes. Still the same error.

@shrutimantri shrutimantri added the bug Something isn't working label Jan 28, 2024
@anna-geller anna-geller added this to the v0.18.0 milestone Jan 29, 2024
@joshuarestivo
Copy link

joshuarestivo commented Apr 22, 2024

Is this a matter of the published example being wrong or does the AWS plugin have issues? I see another identical issue open for SQS, for example. I've recreated this issue and it's the 'from' field that it's choking on.

@github-project-automation github-project-automation bot moved this to Backlog in Issues Jun 10, 2024
@anna-geller anna-geller removed this from the v0.18.0 milestone Jul 3, 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
Projects
Status: Backlog
Development

No branches or pull requests

4 participants