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

Cherry-pick #18585 to 7.8: Add support for array parsing in azure-eventhub input #18651

Merged
merged 2 commits into from
May 20, 2020

Conversation

narph
Copy link
Contributor

@narph narph commented May 20, 2020

Cherry-pick of PR #18585 to 7.8 branch. Original message:

What does this PR do?

Adds support to parse array of eventhub messages into separate events.
Expected type was an object containing a list of messages.

Why is it important?

List of eventhub messages were published in single Elasticsearch event.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Ex before:

          "message" : """[{"data":"{\"Id\":\"https://testnamekey.vault.azure.net/keys/weewewew/....\",\"VaultName\":\"testnamekey\",\"ObjectType\":\"Key\",\"ObjectName\":\"weewewew\",\"Version\":\"....\",\"NBF\":null,\"EXP\":null}","dataschema":"#1","id":"tt589454itekjter94oi","source":"/subscriptions/.../resourceGroups/obs-infrastructure/providers/Microsoft.KeyVault/vaults/testnamekey","specversion":"1.0","subject":"weewewew","time":"2020-05-15T12:08:09.616451Z","type":"Microsoft.KeyVault.KeyNewVersionCreated"}]""",
          "azure" : {
            "offset" : 2560,
            "sequence_number" : 3,
            "enqueued_time" : "2020-05-15T12:08:11.232Z",
            "eventhub" : "keyvalut",
            "consumer_group" : "test"
          },
          "input" : {
            "type" : "azure-eventhub"
          }
        },

to:

          "message" : """{"data":"{\"Id\":\"https://testnamekey.vault.azure.net/keys/weewewew/....\",\"VaultName\":\"testnamekey\",\"ObjectType\":\"Key\",\"ObjectName\":\"weewewew\",\"Version\":\"tt589454itekjter94oi\",\"NBF\":null,\"EXP\":null}","dataschema":"#1","id":"....","source":"/subscriptions/...../resourceGroups/obs-infrastructure/providers/Microsoft.KeyVault/vaults/testnamekey","specversion":"1.0","subject":"weewewew","time":"2020-05-15T12:08:09.616451Z","type":"Microsoft.KeyVault.KeyNewVersionCreated"}""",
          "azure" : {
            "offset" : 2560,
            "sequence_number" : 3,
            "enqueued_time" : "2020-05-15T12:08:11.232Z",
            "eventhub" : "keyvalut",
            "consumer_group" : "test"
          },
          "input" : {
            "type" : "azure-eventhub"
          }
        },

narph added 2 commits May 20, 2020 10:23
* add array as parser

* changelog

* update test

(cherry picked from commit c742662)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 20, 2020
@narph narph self-assigned this May 20, 2020
@narph narph added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team v7.8.0 labels May 20, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 20, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 1680
Skipped 255
Total 1935

@narph narph merged commit d4417ac into elastic:7.8 May 20, 2020
@narph narph deleted the backport_18585_7.8 branch May 20, 2020 12:34
@zube zube bot added [zube]: Done and removed [zube]: Inbox labels May 20, 2020
@zube zube bot removed the [zube]: Done label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants