Repository navigation
feat(admin): support DescribeLogDirs v3–v5 and AlterPartitionReassignments v1 - #272
Merged
Merged
Conversation
The argument parser turns a repeatable flag that was not passed into an empty array. cluster log-dirs read that as "no brokers" and "no topics", so it failed with "No brokers available to describe log dirs" unless --broker was given, and printed no partitions unless --topic was.
DescribeLogDirs now negotiates v0-v5. v3 adds a request-level error code, which describeLogDirs throws; v4 adds each log dir's totalBytes and usableBytes (KIP-827); v5 adds isCordoned. Fields the broker does not send, and a -1 volume size, are left out of the result. AlterPartitionReassignments now negotiates v0-v1, and alterPartitionReassignments accepts allowReplicationFactorChange (KIP-860, default true). Passing false to a broker that only speaks v0 throws instead of silently allowing the change. Refs #270
cluster log-dirs prints a log-dir table with each volume's total and usable bytes and whether the dir is cordoned, ahead of the partition table. cluster reassign execute gains --disallow-replication-factor-change, which needs Kafka 4.1+. Refs #270
The cluster overview gains a log directories card: each broker's log dirs with used and usable volume space and whether the dir is cordoned, served by a new GET /api/cluster/log-dirs route. Refs #270
Replace the Kafka 4.3 compose stack (apache/kafka:4.3.2) with Kafka 4.4 (apache/kafka:4.4.0) for core, CLI and Studio integration tests and the CI matrix, and update the docs that list the tested brokers. The benchmark broker follows, as benchmarks/docker/compose.yml asks; published benchmark results still record the image they ran on.
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.
Summary
Closes #270.
feat(admin)): DescribeLogDirs negotiates v0–v5.describeLogDirsthrows.totalBytesandusableBytesper log dir.isCordoned.LogDirDescription, and so is a-1(unreadable) volume size.alterPartitionReassignmentsacceptsallowReplicationFactorChange(KIP-860, defaulttrue). On a broker that only speaks v0,falsethrowsKafkaNonRetriableErrorinstead of being silently ignored.feat(cli)):cluster log-dirsprints a log-dir table (TOTAL_BYTES,USABLE_BYTES,CORDONED) ahead of the partition table.cluster reassign executegains--disallow-replication-factor-change.feat(studio)): the cluster overview gains a Log directories card, served byGET /api/cluster/log-dirs.fix(cli), found while testing on a live broker): the argument parser turns an omitted repeatable flag into[]. Because of that,cluster log-dirsondevelopfailed with "No brokers available to describe log dirs" unless--brokerwas given, and showed no partitions unless--topicwas.apache/kafka:4.3.2) to Kafka 4.4 (apache/kafka:4.4.0). This covers core, CLI and Studio setup, the CI matrix and the docs that list the tested brokers. The benchmark broker follows, asbenchmarks/docker/compose.ymlasks; published benchmark results are unchanged. This was requested together with this change and is a separate commit, so it can be split into its own PR if preferred.Behaviour change: a broker that refuses DescribeLogDirs (for example
CLUSTER_AUTHORIZATION_FAILED) now makesdescribeLogDirsthrow. Before, it returned no log dirs. This is documented incompatibility.md.Screenshots or video
Cluster overview, 1280×1000. Before (
develop):After:
After, 390 px wide (the table scrolls inside its region):
Test plan
pnpm test) cover the changeKAFKA_VERSION=… pnpm --filter @cookiemonsterdev/kafka-core test:integration)test/suites/admin/log-dirs.test.tsruns on its own against a fresh cluster, the existing "describes replica log dirs" test fails, because it needs a topic created by another suite. It passes in the full suite. This predates this change.cluster log-dirsprints both tables.reassign execute --disallow-replication-factor-changeon an RF-2→1 file reportsReplication-factor is invalidand exits 1.pnpm skills:validate.prefers-reduced-motion(see CONTRIBUTING.md)aria-hidden, and usage is given as text.Checklist
type/short-kebab-description(see CONTRIBUTING.md)feat,fix, …)pnpm lint,pnpm format:check, andpnpm typecheckare clean