Repository navigation
kafka_source on kafka-in, certified; the kcat source becomes the Kerberos route (ADR-0044 step 3c, part 2) - #117
Merged
Merged
Conversation
… (ADR-0044 step 3c) The recipe reads the topic with the runtime's own Kafka client, SASL over TLS with SCRAM-SHA-256. Its broker.sh runs one Apache Kafka node with the topic in three partitions, and its dataflow.sh writes one record there and waits for the fixture's shape on the bus. The admission points BROKERS at that broker and SECURITY at SASL over plaintext, seeds the test user as the recipe's two secrets, and requires a green probe before the data flow. The stated exception goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
… a new bus The kcat source example leaves the catalog for docs/examples/kafka-kerberos, the route to a cluster that requires Kerberos (ADR-0044 point 8). Its CMD starts kcat through kcat-source.sh, which refuses a command that pins no partition with -p when kcat -L counts more than one: the exec driver keeps one offset for the command, and one offset for several partitions would skip or repeat records in silence. The refusal goes to the log at each start. The CMD begins with exec, so the process the driver stops is kcat: dash runs a command of sh -c as a child, and a kill of sh left it running. e2e/kafka.sh phase 9 runs the route against the broker: a pinned partition and a topic of one partition reach the bus with their commits, the command without -p on three partitions is refused and puts nothing on the bus, and no kcat outlives the runtime. The CI job installs the distribution's kcat. Phase 8 probes a unit on a bus where no unit ever ran: no VEJAS_OFFSETS, so the probe takes the bucket's absence from the error, says not committed yet, and makes no bucket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
The catalog, the brokers page and the recipes' README say that the Kafka source is kafka-in, certified against a real broker, and that the sink stays a kcat bridge under its stated exception. A new page of the book, Exec bridges, lists the four exec drivers, says to start a long-running CMD with exec, and holds the Kerberos route with its refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
… Kafka recipes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
The runners resolve localhost to ::1 first. The broker's port is published on 127.0.0.1 only, and kcat took the refused ::1 for all brokers down and stopped, so nothing was written or read. librdkafka's broker.address.family=v4 keeps it on 127.0.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
cpoder
marked this pull request as ready for review
December 5, 2026 07:01
kcat reads -p -1 as every partition, so a command with it read them all under one offset and passed the guard. A -p whose value is not a partition's number is refused, with the reason, at each start. Phase 9 checks it on the real broker: refused, nothing on the bus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT
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.
ADR-0044 step 3c, part 2: §7, "Admission", for the source.
The
kafka_sourcerecipe onkafka-indocs/examples/connectors/kafka_sourceis a manifest onkafka-in: SASL over TLS, SCRAM-SHA-256,USERNAMEandPASSWORDassecret().broker.shruns one Apache Kafka node (the official image,apache/kafka:4.4.0) through a new helper,e2e/admission/brokers/kafka.sh, and makes the topic in three partitions.dataflow.shwrites one record with the broker's console producer and waits for the fixture's shape onvx.kafka.orders.in.BROKERSat that broker andSECURITYatSASL_PLAINTEXT(no TLS in the stage), seeds the test user as the two secrets, and requires a green probe before the data flow.EXCEPTION.mdgoes. The recipe dir and its helper are one commit.The kcat route for Kerberos
The kcat source example leaves the catalog for
docs/examples/kafka-kerberos:kafka_orders_p0.vjs.example(one partition a manifest,-p 0, its ownOFFSET_KV) andkcat-source.sh.kcat-source.shstarts kcat. When the command pins no partition with-p, it counts the topic's partitions withkcat -Land the command's own-b,-Xand-F, and refuses on more than one. The refusal goes to the runtime's log at each start, exit code 2:The exec drivers do not change. The book gets a page, Exec bridges, which holds the route.
e2e/kafka.shphase 9 runs the route throughexec-stream-sourceagainst the broker. A pinned partition and a topic of one partition reach the bus with their commits. The command without-pon three partitions is refused at each start, puts nothing on the bus and commits nothing. No kcat outlives the runtime. The CI job installs the distribution's kcat.A finding on the way:
sh -cand dashThe exec drivers run
CMDwithsh -c. On Debian and Ubuntu,shis dash, which runs the command as a child instead of becoming it. The driver'schild.kill()then killssh, and the program goes on running. Phase 9 caught it: two kcat processes outlived the runtime's stop. The example'sCMDnow starts withexec, and the page says to do so for a long-running command. The drivers stay as they are in this PR, as the brief asks.A probe on a new bus
Phase 8 now also probes a unit on a bus where no unit ever ran, so
VEJAS_OFFSETSdoes not exist. The probe says "not committed yet" for the 4 partitions and makes no bucket. The real error text isfailed to get the bucket: jetstream error: stream not found (code 404, error code 10059). A mutant of thecontains("not found")match fails this check with that text.Tests
kafka_sourceandmqtt_sourceadmitted. A mutant subject in the manifest fails the data flow (the record never reached vx.kafka.orders.in).127.0.0.1:55557 (SaslPlaintext SCRAM-SHA-256): topic orders, 3 partitions. Partition 0: offset 0 committed, within the log (start 0, high watermark 0), 0 behind…e2e/kafka.shpasses with 84 checks on 4.4.0 and on 3.7.2 (77 before). The admission admits all 21 recipes,kafka_sourcein 19 s with the broker's start. The first run failed phase 9 on both versions: the runners resolvelocalhostto::1first, the broker is published on 127.0.0.1 only, and kcat took the refused::1for all brokers down and stopped. Phase 9 now passes-X broker.address.family=v4to kcat.-pnot seen, are both caught by phase 9. A value read as an option is caught only by a local check with a fake kcat (-o -t -t orders).Left out
kafka_sinkstays on kcat with its stated exception (step 4/5), and ADR-0022 is not marked superseded.sh -c, such as a process group killed as a whole, is a follow-up.kafka-inlogs in to. I did not look for the cause. It matters to thekafka_sinkrecipe, not to this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_018wXgxSSYsPm88PCqu98HPT