Repository navigation
examples: wait_for the first broker call on kafka/kafka-mesh - #1671
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The asynchronous Kafka producer can hide delivery failures and prevent retries, leaving the consumer waiting indefinitely; adding --sync is needed to propagate failed sends.
1 open issue
What changed in this PR
This PR adds startup retries to Kafka sandbox verification, extending #1667 to address the flakes exposed by dependency bumps #1657 and #1665.
Changes:
- Retries Kafka topic creation with
--if-not-existsto make repeated attempts safe. - Wraps the first Kafka mesh produce call in
wait_for.
| File | Description |
|---|---|
kafka/verify.sh |
Adds an idempotent retry around initial topic creation. |
kafka-mesh/verify.sh |
Adds a retry around the first produce to apples. |
Review effort: Balanced
The kafka and kafka-mesh proxy Envoys have no healthcheck, so `compose up --wait` can return before the listener is serving and the first kafka client call races it (what fails the examples job on cp-kafka bump PRs envoyproxy#1657/envoyproxy#1665). Retry the first end-to-end broker call until envoy and the upstream broker are serving: kafka's create-topic (--if-not-exists for idempotent retry) and kafka-mesh's first produce. Both verified green locally. Signed-off-by: Ryan Northey <ryan@synca.io>
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.

The
kafkaandkafka-meshproxy Envoys have no healthcheck, sodocker compose up --waitcan return before the listener is serving and the first kafka client call races it — which is what fails theexamplesjob on the cp-kafka digest-bump PRs #1657 / #1665 (the bumps are fine; the example flakes).Fix: retry the first end-to-end broker call until envoy and the upstream broker/cluster are both serving.
--if-not-existskeeps the retry idempotent)appleskafka_clientis a shell function, so it's passed straight towait_for(nobash -c, same shell). Both verified green locally.Follow-up to the wait_for sweep (#1667) — these two were deferred there as protocol-specific. With this in, #1657/#1665 should pass on
/retest.