You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Azure Queue Storage EventSource, if the queue contains a base64 encoded JSON message with HTML tags, the EventSource pod fails to base64 decode it.
Steps to reproduce the issue
Send to the queue a base64 encoded JSON message that contains some HTML tags
MESSAGE="`echo '{"html":"<p>test</p>"}' | base64`"
az storage message put --account-name "$STORAGE_ACCOUNT_NAME" --account-key "$STORAGE_ACCOUNT_KEY" --queue-name example --content="$MESSAGE"
Verify the queue message can indeed be base64 decoded
az storage message peek --account-name "$STORAGE_ACCOUNT_NAME" --account-key "$STORAGE_ACCOUNT_KEY" --queue-name example -o tsv --query '[].{Message:content}' | base64 --decode
{"html":"<p>test</p>"}
Create a Secret with the connection string for the Storage Account that contains the queue
Create an EventSource that listens on the Storage Account queue
apiVersion: argoproj.io/v1alpha1kind: EventSourcemetadata:
name: examplespec:
azureQueueStorage:
example:
connectionString:
key: connectionstringname: queue-accessdecodeMessage: truejsonBody: true # Irrelevant since parsing body step is never reached
Expected behavior
The EventSource should be able to decode the base64 message and publish it to the EventBus.
Actual behavior
The EventSource pod shows this error in the logs:
{"level":"error","ts":1727263035.0298033,"logger":"argo-events.eventsource","caller":"azurequeuestorage/start.go:142","msg":"failed to base64 decode message...","eventSourceName":"example","eventSourceType":"azureQueueStorage","eventName":"example","error":"illegal base64 data at input byte 27","stacktrace":"github.com/argoproj/argo-events/eventsources/sources/azurequeuestorage.(*EventListener).processMessage\n\t/home/runner/work/argo-events/argo-events/eventsources/sources/azurequeuestorage/start.go:142\ngithub.com/argoproj/argo-events/eventsources/sources/azurequeuestorage.(*EventListener).StartListening\n\t/home/runner/work/argo-events/argo-events/eventsources/sources/azurequeuestorage/start.go:116\ngithub.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3.1\n\t/home/runner/work/argo-events/argo-events/eventsources/eventing.go:536\ngithub.com/argoproj/argo-events/common.DoWithRetry.func1\n\t/home/runner/work/argo-events/argo-events/common/retry.go:106\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection\n\t/home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:145\nk8s.io/apimachinery/pkg/util/wait.ExponentialBackoff\n\t/home/runner/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/backoff.go:461\ngithub.com/argoproj/argo-events/common.DoWithRetry\n\t/home/runner/work/argo-events/argo-events/common/retry.go:105\ngithub.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3\n\t/home/runner/work/argo-events/argo-events/eventsources/eventing.go:535"}
Environment:
Kubernetes Client version: 1.31.0
Kubernetes Server version: 1.30.3
Argo Events version: 1.9.2 (installed via Helm chart version 2.4.8)
Additional context
If the closing HTML tag is removed from the queue message everything works as expected. i.e:
MESSAGE="`echo '{"html":"<p>test<p>"}' | base64`"
az storage message put --account-name "$STORAGE_ACCOUNT_NAME" --account-key "$STORAGE_ACCOUNT_KEY" --queue-name example --content="$MESSAGE"
{"level":"info","ts":1727263167.2123094,"logger":"argo-events.eventsource","caller":"eventsources/eventing.go:591","msg":"Succeeded to publish an event","eventSourceName":"example","eventName":"example","eventSourceType":"azureQueueStorage","eventID":"31643435616434352d646433382d343862302d383061652d636630323563353838383434"}
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered:
Stolz
changed the title
Azure Queue Storage EventSource unable to decode base64 messages that contain HTML tags
Azure Queue Storage EventSource fails to base64 decode messages containing HTML tags
Sep 27, 2024
This issue has been automatically marked as stale because it has not had
any activity in the last 60 days. It will be closed if no further activity
occurs. Thank you for your contributions.
Describe the bug
When using Azure Queue Storage
EventSource
, if the queue contains a base64 encoded JSON message with HTML tags, theEventSource
pod fails to base64 decode it.Steps to reproduce the issue
Send to the queue a base64 encoded JSON message that contains some HTML tags
Verify the queue message can indeed be base64 decoded
Create a
Secret
with the connection string for the Storage Account that contains the queueCreate an
EventSource
that listens on the Storage Account queueExpected behavior
The EventSource should be able to decode the base64 message and publish it to the
EventBus
.Actual behavior
The
EventSource
pod shows this error in the logs:Environment:
Additional context
If the closing HTML tag is removed from the queue message everything works as expected. i.e:
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: