Skip to content

fix: marshal attribute-only Pub/Sub messages#782

Open
winklemad wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
winklemad:fix/attribute-only-pubsub
Open

fix: marshal attribute-only Pub/Sub messages#782
winklemad wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
winklemad:fix/attribute-only-pubsub

Conversation

@winklemad

Copy link
Copy Markdown

Summary

  • recognize valid Pub/Sub push messages that contain attributes without data
  • preserve the absence of data while marshalling legacy-event and CloudEvent requests
  • add request-path regression coverage for both signature types

Pub/Sub messages may contain either non-empty data or at least one attribute. The raw-request guard previously required truthy message.data, causing valid attribute-only messages to bypass Pub/Sub marshalling.

Testing

  • npm test -- --grep 'attribute-only Pub/Sub'
  • npm test -- --grep 'Pub.?Sub|pubsub'
  • npm --cache /tmp/oss-public-batch/npm-cache-c3 test
  • npm run compile
  • npm run check
  • npm run docs
  • Functions Framework conformance client v1.8.3 for legacy-event and CloudEvent signatures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant