Repository navigation
fix(external-kafka): Refresh patches so they apply to master again - #4553
Conversation
The docker-compose patch failed to remove the bundled kafka service because its context still had the old image tag and settings, and the .env patch expected .env to end at SETUP_JS_SDK_ASSETS. Regenerate both from master. Also point launchpad-taskworker at KAFKA_BOOTSTRAP_SERVERS and drop its dependency on the bundled kafka service, which the patch removes; it was added after the patch and left the compose project invalid. Co-Authored-By: Claude <noreply@anthropic.com>
Coverage Results 📊✅ 22 passed | Total: 22 | Pass Rate: 100% | Execution Time: 11m 4s All tests are passing successfully. ✅ Patch coverage is 100.00% (no changed executable lines found; target 50%). Coverage diff@@ Coverage Diff @@
## master #4553 +/-##
==========================================
Coverage 95.52% 95.52% —%
==========================================
Files 5 5 —
Tracked lines 335 335 —
Branches 0 0 —
==========================================
Hits 320 320 —
Misses 15 15 —
Partials 0 0 —Generated by Coverage Action |
| @@ -763,9 +738,8 @@ | ||
| @@ -609,9 +580,8 @@ | ||
| read_only: true | ||
| source: ./geoip |
There was a problem hiding this comment.
Bug: The patch unconditionally adds a bind mount for ./certificates/kafka, which doesn't exist by default. This will cause docker compose up to fail on recent Docker versions.
Severity: CRITICAL
Suggested Fix
The bind mount for ./certificates/kafka should be made conditional so it is only applied when Kafka SSL is enabled. Alternatively, the certificates/kafka directory could be created in the repository with a .gitkeep file to ensure it always exists, preventing the startup error.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: optional-modifications/patches/external-kafka/docker-compose.yml.patch#L102
Potential issue: The patch unconditionally adds a bind mount for the
`./certificates/kafka` directory to the `relay` and `vroom` services. This directory
does not exist by default and is only intended for use when Kafka SSL is enabled. On
modern versions of Docker (v23+), which no longer automatically create missing source
paths for bind mounts, this will cause `docker compose up` to fail with a 'bind source
path does not exist' error. This failure prevents the `relay` and `vroom` services from
starting, which breaks critical functionality like event ingestion and profile
processing for any user not using SSL, which is the default configuration.
Also affects:
optional-modifications/patches/external-kafka/docker-compose.yml.patch:163~163
Did we get this right? 👍 / 👎 to inform future reviews.
The external Kafka patches in
optional-modifications/no longer applied cleanly to master, so following the README left the bundledkafkaservice in place:docker-compose.yml.patch: the hunk that removes thekafkaservice still had the old service definition as context (image7.6.6, 24h retention, 4096nofile), so it was rejected. Regenerated from master; apart from that block's context, the changes are the same as before..env.patch: expected.envto end atSETUP_JS_SDK_ASSETS. Regenerated so the same block is appended to the end of the current.env.launchpad-taskworkerwas added after the patch and still depended on the bundledkafkaservice, which made the patched compose project invalid (depends on undefined service "kafka"). It now usesKAFKA_BOOTSTRAP_SERVERSand no longer depends onkafka. Launchpad only reads the bootstrap servers, so it can't use SASL/SSL settings yet.All four patches now apply with
patch -p0in the README order, anddocker compose configaccepts the result.The
kafkahunk carries the whole service definition as context, so it will go stale again whenever that block changes (for example a Dependabot bump ofcp-kafka). A CI step that runspatch --dry-runwould catch that.