-
Couldn't load subscription status.
- Fork 184
Description
I was trying to implement argo cd notifications to send messages on an AWS SQS fifo queue and it doesn't seem to work. In the notification controller log, I see the following error:
time="yyy-dd-mm" level=error msg="Got an error sending the message: operation error SQS: SendMessage, https response error StatusCode: 400, RequestID: xxxxx-xxxx-xxxxx-xxxxx, api error MissingParameter: The request must contain the parameter MessageGroupId."
And when I look at the documentation it seems like it should work if you provide the messageGrouplId in the template as follows
template.deployment-ready: |
message: |
Deployment {{.obj.metadata.name}} is ready!
messageGroupId: {{.obj.metadata.name}}-deploymentbut when I look at the code, from the structure of classes used for unmarshalling YAML, it seems like it is expecting the template to be something like this
template.deployment-ready: |
message: |
Deployment {{.obj.metadata.name}} is ready!
awssqs:
messageGroupId: {{.obj.metadata.name}}-deploymentDocumentation being wrong is one problem, but even if I provide the messageGroupId and I see that it is parsed properly when I test it with argocd admin notifications template notify command.
But still when I try to trigger the notification I again get the error and the reason for this could be the code here. Because it seems the MessageGroupId is not added to the request at all in the function sendMessageInput.
I am not too fluent in Go otherwise I would have created the pull request. Would be nice if someone could review the code and make the necessary changes.