Skip to content

fix(kafka): use the shared wait_hr_ready body in the topic-data example - #4436

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/kafka-wait-hr-ready-copy
Sep 24, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
fix/kafka-wait-hr-ready-copy

Conversation

@myasnikovdaniil

@myasnikovdaniil myasnikovdaniil commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

#3580 landed with the old wait_hr_ready in examples/backups/kafka/00-helpers.sh. It was branched before #3769 moved the backup examples to one body, and hack/mariadb-first-boot-waits.bats runs every copy it finds, so unit tests are red on main now and on every PR tested against it (example run).

Function is replaced with the mariadb copy, rest of the file untouched. make unit-tests passes locally.

Screenshots

Downstream repositories

Release note

fix(kafka): the topic-data backup example now reports why a HelmRelease wait failed, same as the other backup examples.

Summary by CodeRabbit

  • Bug Fixes
    • Improved diagnostics when a Kafka backup release fails to become ready. Messages now distinguish lookup failures, releases that never appear, and releases deleted while waiting.
    • Failure reports include release conditions and available deployment history, making it easier to understand stalled or timed-out releases.

The topic-data example was branched before the backup examples moved to
one wait_hr_ready body and merged after they did, so it carried the old
copy. hack/mariadb-first-boot-waits.bats finds every copy in the tree and
runs its failure branches under errexit, and the old one does not report
a kubectl that cannot answer. That turned the unit job red on main and on
every pull request tested against it.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <[email protected]>
@github-actions github-actions Bot added area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) kind/bug Categorizes issue or PR as related to a bug size/M This PR changes 30-99 lines, ignoring generated files labels Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b21bc237-812a-4a9b-bfa1-734e517db2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 95ece88 and cadd72a.

📒 Files selected for processing (1)
  • examples/backups/kafka/00-helpers.sh

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

wait_hr_ready now tracks HelmRelease presence during polling. On failure, it reports state-specific diagnostics and includes conditions and history in the failure output.

Changes

HelmRelease readiness

Layer / File(s) Summary
Presence checks and failure reporting
examples/backups/kafka/00-helpers.sh
The helper distinguishes lookup errors, absent releases, and present releases. It checks Ready and Stalled only when the release is present. Failure output includes condition details and status history. Timeout diagnostics distinguish releases that never appeared from releases deleted while waiting.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to cadd7

The helper reports a failed HelmRelease lookup and stops provisioning rather than proceeding as if the release were ready. No identified issue blocks merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Kafka topic-data example and the replacement of its wait_hr_ready implementation with the shared body. It accurately summarizes the main change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

myasnikovdaniil LGTM. The kafka copy now matches the mariadb one byte for byte, and the first-boot bats suite passes locally. Redis and kafka-metadata still have their own bodies, but the suite lists them as exceptions, so that is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) kind/bug Categorizes issue or PR as related to a bug size/M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants