make kafka topic creation and partition config configurable via env vars#255
Open
VINODvoid wants to merge 11 commits into
Open
make kafka topic creation and partition config configurable via env vars#255VINODvoid wants to merge 11 commits into
VINODvoid wants to merge 11 commits into
Conversation
Contributor
Author
|
@haileyok hey, took a stab at addressing the review feedback from @ThisIsMissEm and @chimosky — opened a branch off yours if you want to take a look! |
Member
|
wow, thank you! I'll take a look at this later today, very much appreciate this!!! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses two open review comments on #220.
KafkaOutputSinkhad hardcodednum_partitions=3andreplication_factor=3inensure_topic(), and topic auto-creation always ran unconditionally on startup. This makes bothconfigurable via environment variables.
OSPREY_KAFKA_AUTO_CREATE_TOPIC(default:true) — set tofalsefor deployments that manage Kafka topics via Terraform or other IaC tooling.OSPREY_KAFKA_NUM_PARTITIONS(default:1) andOSPREY_KAFKA_REPLICATION_FACTOR(default:1) — replaces the hardcoded3values. Defaults to1so single-broker localsetups (docker-compose) don't fail silently on topic creation. Production deployments can override via env.
Both are read in
sink_register.pyand passed intoKafkaOutputSink.__init__, following the same pattern as all other Kafka config in this codebase.Branch based on
hailey/confluent-kafka.Checklist
uv run ruff check .passes (no unused imports or other lint errors)uv tool run fawltydeps --check-unused --pyenv .venvpasses (no unused dependencies)CHANGELOG.mdwith my changes, if applicable