-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve schema registry support (#12)
# Improve schema registry support 1. Added formatters which properly use schema registry formatters (zfmt attempted previously, but had missed the mark) 1. Updated tests to be controlled with envvar instead of build tags 2. Updated golang-ci to remove deprecated options 3. Updated `make` to add proto generation for schema registry evolution tests 4. Because protobuf has protections against named type collisions, run tests with a special envvar to ignore this warning 5. Added `LifecyclePostReadImmediate` for better confirmation of read errors 6. Updated ReaderOption to not update KWriter directly and instead update an indirect settings object 7. Updated producer clientId to be `clientid + topic` this helps avoid accidental collisions seen in production with DLT'd consumer 8. Updated compose.yml used for local testing to standup schema registry
- Loading branch information
1 parent
c0b0f93
commit 0020d7f
Showing
53 changed files
with
4,252 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ go.work.sum | |
.idea/ | ||
.run/ | ||
zk-multiple-kafka-multiple/ | ||
*.out | ||
*.res | ||
*.lsif | ||
*.prof | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ setup: | |
# Assumes setup has been executed. Runs go test with coverage | ||
.PHONY: cover | ||
cover: | ||
export GO_TAGS=--tags=integration; ./coverage.sh | ||
./coverage.sh | ||
|
||
# Runs setup and executes tests with coverage. | ||
.PHONY: test-local | ||
|
@@ -41,3 +41,17 @@ golangci-lint: | |
(cd $(mod) && \ | ||
echo "[lint] golangci-lint: $(mod)" && \ | ||
golangci-lint run --path-prefix $(mod) ./...) &&) true | ||
|
||
.PHONY: gen | ||
gen: protoc-exists | ||
cd test/evolution; protoc --proto_path=. --go_out=./ ./schema_1.proto | ||
cd test/evolution; protoc --proto_path=. --go_out=./ ./schema_2.proto | ||
go run github.com/heetch/avro/cmd/[email protected] -p main -d ./example/producer_avro ./example/producer_avro/dummy_event.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p main -d ./example/worker_avro ./example/worker_avro/dummy_event.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p avro1 -d ./test/evolution/avro1 ./test/evolution/schema_1.avsc | ||
go run github.com/heetch/avro/cmd/[email protected] -p avro2 -d ./test/evolution/avro2 ./test/evolution/schema_2.avsc | ||
|
||
# a forced dependency which fails (and prints) if `avro-tools` isn't installed | ||
.PHONY: protoc-exists | ||
protoc-exists: | ||
@which protoc > /dev/null || (echo "protoc is not installed. Install via `brew install protobuf`"; exit 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.