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

Upgrade azure-eventhub input to the modern Event Hub SDK #1

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f2d8d41
Initial POC import
zmoog May 10, 2024
b19a460
Rename client to pipelineClient for clarity
zmoog May 16, 2024
2a90f7e
Rename azure to eventHubMetadata for clarity
zmoog May 16, 2024
e5aa369
Move remaining code out of eph.go
zmoog May 16, 2024
f44b51e
Remove erroneous error check
zmoog May 16, 2024
62b90b3
Update tests
zmoog May 20, 2024
0d80bb4
Address linter complaints
zmoog May 20, 2024
af52eb0
Simplify run()
zmoog May 20, 2024
525b291
Update NOTICE
zmoog May 20, 2024
34206a2
Remove the eventHubInputV2 POC
zmoog May 20, 2024
e0a73a0
Cleanup
zmoog May 20, 2024
b0efa53
Cleanup
zmoog May 20, 2024
e3d80fd
Cleanup and add comments
zmoog May 21, 2024
f91f7da
Update tests
zmoog May 21, 2024
9246f36
Cleanup
zmoog May 21, 2024
a9d1ad3
Clarify handler tradeoffs
zmoog May 22, 2024
18455fd
Cleanup
zmoog May 22, 2024
5cd781f
Update x-pack/filebeat/input/azureeventhub/v1_input_test.go
zmoog May 22, 2024
cc1d245
Remove a leftover empty file
zmoog May 22, 2024
cfbf6bb
Rename engine to processor
zmoog May 20, 2024
20db610
Enable v2 config option in the Filebeat module
zmoog May 20, 2024
9743e1d
Move message unpacking in the `messageDecoder`
zmoog May 22, 2024
0368feb
Retry starting the processor 30s after an error
zmoog May 22, 2024
f1f80c6
Add input metrics to input v2
zmoog May 22, 2024
61421b9
Try the backoff package to restart the processor
zmoog May 23, 2024
56cfb7f
Adding acker.LastEventPrivateReporter()
zmoog May 23, 2024
358d2dc
Ensure container exist and add migration assistant
zmoog May 27, 2024
71fd5db
Add processor restarts metric
zmoog May 27, 2024
fa326f9
minor: add comments
zmoog May 27, 2024
ef39901
Update checkpoint when pipeline acks the events
zmoog May 27, 2024
ee6e4af
Add partition ID to event hub metadata
zmoog May 27, 2024
9a496dc
minor: comments
zmoog May 27, 2024
7889599
Add support for partition key in eventhub metadata
zmoog May 31, 2024
8838119
Add migrate_checkpoint config option
zmoog May 31, 2024
0944380
Make starting position adjustable (+validation)
zmoog Jun 3, 2024
9711c66
Add README with detailed test scenarios
zmoog Jun 3, 2024
5521028
Add Scenario 004: Invalid Elasticsearch endpoint
zmoog Jun 3, 2024
7c48f78
READNE cleanup
zmoog Jun 3, 2024
335d48d
Add receive_timeout and receive_count to config
zmoog Jun 4, 2024
bca6e63
Update tests
zmoog Jun 4, 2024
80cbc2a
Fix linter complaints and cleanups
zmoog Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 52 additions & 56 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1742,11 +1742,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/Azure/azure-sdk-for-go/sdk/azcore
Version: v1.9.0
Version: v1.11.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azcore@v1.9.0/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azcore@v1.11.1/LICENSE.txt:

MIT License

Expand All @@ -1773,11 +1773,11 @@ SOFTWARE

--------------------------------------------------------------------------------
Dependency : github.com/Azure/azure-sdk-for-go/sdk/azidentity
Version: v1.4.0
Version: v1.5.2
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity@v1.4.0/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity@v1.5.2/LICENSE.txt:

MIT License

Expand Down Expand Up @@ -1954,11 +1954,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
Version: v1.0.0
Version: v1.3.2
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.3.2/LICENSE.txt:

MIT License

Expand Down Expand Up @@ -18527,11 +18527,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : github.com/google/uuid
Version: v1.3.1
Version: v1.6.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/google/uuid@v1.3.1/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/google/uuid@v1.6.0/LICENSE:

Copyright (c) 2009,2014 Google Inc. All rights reserved.

Expand Down Expand Up @@ -29755,11 +29755,11 @@ Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-pipeline-g

--------------------------------------------------------------------------------
Dependency : github.com/Azure/azure-sdk-for-go/sdk/internal
Version: v1.5.0
Version: v1.7.0
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/internal@v1.5.0/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/internal@v1.7.0/LICENSE.txt:

MIT License

Expand Down Expand Up @@ -29876,13 +29876,43 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage
Version: v1.5.0
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/resourcemanager/storage/[email protected]/LICENSE.txt:

MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/Azure/go-amqp
Version: v1.0.0
Version: v1.0.5
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure/[email protected].0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/!azure/[email protected].5/LICENSE:

MIT License

Expand Down Expand Up @@ -31580,11 +31610,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/AzureAD/microsoft-authentication-library-for-go
Version: v1.1.1
Version: v1.2.2
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/!azure!a!d/microsoft-authentication-library-for-go@v1.1.1/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/!azure!a!d/microsoft-authentication-library-for-go@v1.2.2/LICENSE:

MIT License

Expand Down Expand Up @@ -37783,40 +37813,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/dnaeon/go-vcr
Version: v1.2.0
Licence type (autodetected): BSD-2-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/dnaeon/[email protected]/LICENSE:

Copyright (c) 2015-2016 Marin Atanasov Nikolov <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer
in this position and unchanged.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : github.com/dnephin/pflag
Version: v1.0.7
Expand Down Expand Up @@ -40131,11 +40127,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

--------------------------------------------------------------------------------
Dependency : github.com/golang-jwt/jwt/v5
Version: v5.0.0
Version: v5.2.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/golang-jwt/jwt/v5@v5.0.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/golang-jwt/jwt/v5@v5.2.1/LICENSE:

Copyright (c) 2012 Dave Grijalva
Copyright (c) 2021 golang-jwt maintainers
Expand Down Expand Up @@ -46065,11 +46061,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/joho/godotenv
Version: v1.3.0
Version: v1.5.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/joho/godotenv@v1.3.0/LICENCE:
Contents of probable licence file $GOMODCACHE/github.com/joho/godotenv@v1.5.1/LICENCE:

Copyright (c) 2013 John Barton

Expand Down Expand Up @@ -50118,11 +50114,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : github.com/pkg/browser
Version: v0.0.0-20210911075715-681adbf594b8
Version: v0.0.0-20240102092130-5ac0b6a4141c
Licence type (autodetected): BSD-2-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/pkg/[email protected]20210911075715-681adbf594b8/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/pkg/[email protected]20240102092130-5ac0b6a4141c/LICENSE:

Copyright (c) 2014, Dave Cheney <[email protected]>
All rights reserved.
Expand Down Expand Up @@ -50432,11 +50428,11 @@ Contents of probable licence file $GOMODCACHE/github.com/prometheus/client_golan

--------------------------------------------------------------------------------
Dependency : github.com/rogpeppe/go-internal
Version: v1.11.0
Version: v1.12.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/rogpeppe/go-internal@v1.11.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/rogpeppe/go-internal@v1.12.0/LICENSE:

Copyright (c) 2018 The Go Authors. All rights reserved.

Expand Down
19 changes: 10 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ require (
github.com/google/flatbuffers v23.5.26+incompatible
github.com/google/go-cmp v0.6.0
github.com/google/gopacket v1.1.19
github.com/google/uuid v1.3.1
github.com/google/uuid v1.6.0
github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75
github.com/h2non/filetype v1.1.1
github.com/hashicorp/go-multierror v1.1.1
Expand Down Expand Up @@ -186,14 +186,14 @@ require (
cloud.google.com/go v0.110.8
cloud.google.com/go/compute v1.23.0
cloud.google.com/go/redis v1.13.1
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.2
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.6.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/costmanagement/armcostmanagement v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.8.0
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.1.1
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
github.com/Azure/go-autorest/autorest/adal v0.9.21
github.com/apache/arrow/go/v14 v14.0.2
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1
Expand Down Expand Up @@ -247,15 +247,15 @@ require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/Azure/azure-amqp-common-go/v4 v4.2.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect
github.com/Azure/go-amqp v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.7.0 // indirect
github.com/Azure/go-amqp v1.0.5 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
Expand Down Expand Up @@ -303,7 +303,7 @@ require (
github.com/goccy/go-json v0.10.2 // indirect
github.com/godror/knownpb v0.1.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -327,6 +327,7 @@ require (
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/karrick/godirwalk v1.17.0 // indirect
Expand Down Expand Up @@ -358,7 +359,7 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/rootless-containers/rootlesskit v1.1.0 // indirect
Expand Down
Loading