Skip to content

Conversation

Hazhzeng
Copy link
Contributor

@Hazhzeng Hazhzeng commented Feb 2, 2020

Resolves Azure/azure-functions-python-worker#418

  1. Fix a parsing issue where the iothub metadata is not handled properly. The iothub_metadata does not exist in trigger_metadata, instead, it is placed in SystemProperties (cardinality = one) and SystemPropertiesArray (cardinality = many)
  2. Fix an issue where the IoTHub event messages are treated as single message. Since the message format is json, thus, it is handled with decode_single_event. This PR will make sure the cardinality is handled correctly.

@@ -105,12 +105,10 @@ def decode(
typing.List[_eventhub.EventHubEvent]]:
data_type = data.type

if (data_type == 'string' or data_type == 'bytes'
or data_type == 'json'):
if cls._is_cardinary_one(trigger_metadata):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be "cardinality"? Or is "cardinary" a term I'm not aware of?

@Hazhzeng Hazhzeng merged commit 31927c1 into dev Feb 10, 2020
@Hazhzeng
Copy link
Contributor Author

Resolves: Azure/azure-sdk-for-python#8533

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.

Eventhub event metadata is None
2 participants