Skip to content

test(kafka): wait for ZooKeeper PVC deletion - #4481

Closed
europrinter (yankawai) wants to merge 1 commit into
cozystack:release-1.6from
yankawai:fix/kafka-pvc-wait-release-1.6
Closed

europrinter (yankawai) wants to merge 1 commit into
cozystack:release-1.6from
yankawai:fix/kafka-pvc-wait-release-1.6

Conversation

@yankawai

Copy link
Copy Markdown
Contributor

What this PR does

Wait for both ZooKeeper PVCs to disappear after Kafka deletion. Negative assertions can stop on an API read error before their timeout; deletion watches wait for the resource to be removed. The existing Bound and KafkaTopic checks are unchanged.

Carries the test-only change from c92828c in #4339, which was not included in #4402. This targets release-1.6; the Kafka suite on main uses KRaft without ZooKeeper.

Validated with Chainsaw 0.2.15: delayed deletion, an already absent PVC, an interrupted watch, and the read-error fixture pass. A retained PVC and forbidden access fail. The full Kafka E2E run remains for CI.

Screenshots

Not applicable.

Downstream repositories

Release note

NONE

Negative PVC assertions can stop on an API read error before the deletion
 timeout expires.

Signed-off-by: Yan Bondarenko <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Advanced

Run ID: b506725a-0019-445e-ab8e-5f73a44638e3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) size/S This PR changes 10-29 lines, ignoring generated files labels Sep 25, 2026

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.

europrinter (@yankawai) LGTM. Deletion waits are the right shape for this step. A wait with for: deletion runs kubectl wait --for=delete under the same 2m bound, so an API read error no longer ends the step early, and a PVC that is already gone still passes.

The PVC names match what Strimzi creates on release-1.6. The chart sets zookeeper.replicas: 2 with persistent-claim storage and deleteClaim: true, and the Bound asserts earlier in the same file use the same names. Nothing needs to land on main first: the Kafka suite there runs KRaft and has no ZooKeeper PVC check at all.

Nothing has exercised this change yet. The Pull Request, Pre-Commit Checks and API Review Gate runs on ead8bb3 are waiting for maintainer approval, and no job ran. Even after approval I'd expect the release-1.6 fork lane to fail at the image build or installer push, because it skips registry login for forks and has no fork export path. So the suite result will probably have to come from a same-repo branch.

Minor, non-blocking:

  • The body says this carries the test-only change from c92828c. Only the PVC half is new here, the KafkaTopic asserts from that commit are already on release-1.6.
  • The reworded header comment line is 84 columns now. c92828c had reflowed it.

@lexfrei

Copy link
Copy Markdown
Contributor

Closing in favour of #4484, which carries this commit unchanged from a branch in this repository so the release-1.6 CI can build and run e2e. Thanks for picking up the part #4402 left out.

Aleksei Sviridkin (lexfrei) added a commit that referenced this pull request Sep 25, 2026
This reopens a fork pull request from a branch in this repository so its
CI can run. The commit is the one from #4481 by @yankawai, unchanged. On
release-1.6 the pull-request CI pushes the images it builds, and a run
from a fork has no registry credentials, so #4481 could never get past
the build jobs to e2e. The description below is the author's.

## What this PR does

Wait for both ZooKeeper PVCs to disappear after Kafka deletion. Negative
assertions can stop on an API read error before their timeout; deletion
watches wait for the resource to be removed. The existing Bound and
KafkaTopic checks are unchanged.

Carries the test-only change from c92828c in #4339, which was not
included in #4402. This targets `release-1.6`; the Kafka suite on `main`
uses KRaft without ZooKeeper.

Validated with Chainsaw 0.2.15: delayed deletion, an already absent PVC,
an interrupted watch, and the read-error fixture pass. A retained PVC
and forbidden access fail. The full Kafka E2E run remains for CI.

### Screenshots

Not applicable.

### Downstream repositories

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:

### Release note

```release-note
NONE
```
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) size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants