Skip to content

reassign verify, features update --release-version - #80

Merged
twmb merged 3 commits into
masterfrom
reassign-verify
Sep 18, 2026
Merged

twmb merged 3 commits into
masterfrom
reassign-verify

Conversation

@twmb

@twmb twmb commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

kcl reassign verify takes the plan kcl reassign alter took and prints one row per partition: in-progress when ListPartitionReassignments still lists it, complete when the replicas in the metadata equal the target as a set (order is not compared), and differs otherwise. A partition the metadata or the list answers with an error has an unknown STATUS with the error in ERROR and MESSAGE. The command exits 1 unless every row is complete, so until kcl reassign verify 'foo:0->2,3'; do sleep 10; done waits for the move. When every row is complete it clears the throttle alter --throttle set, the way kafka-reassign-partitions.sh --verify does: both rates are deleted on every broker in the union of current and target replicas, and both replica lists on every topic in the plan, in one IncrementalAlterConfigs. Text names what was cleared on stderr; JSON carries throttles_cleared: {brokers, topics, error}, the arrays empty when nothing was cleared. A delete that fails lands in throttles_cleared.error (one JSON object, never a second error object after the table), a stderr line in text, and the command exits 1. alter --throttle's help and stderr line now point at verify instead of a hand-typed config alter.

kcl cluster features update --release-version 4.4 updates every feature to the level a new 4.4 cluster is formatted with, from kversion's table, in place of the FEATURE=VERSION arguments; giving both is a usage error, and so is a release kversion does not know, which names the newest it does. Both forms now print FROM and TO: FROM is the level the cluster has finalized today, read from one ApiVersions request before the update, 0 for a feature the cluster has not finalized and unknown when the broker's finalized epoch is -1; TO is the level requested. The walkthrough now runs --release-version 4.4 --dry-run and pins the header and keys.

Changelog

NEW

  • kcl reassign verify 'TOPIC:P->R,R'... prints whether each partition of a plan is in-progress, complete, or differs, exits 1 until all complete, and clears the throttle alter --throttle set.
  • kcl cluster features update --release-version 4.4 updates every feature to its level for that Kafka release, in place of FEATURE=VERSION arguments.

CHANGED

  • kcl cluster features update rows carry FROM and TO, the cluster's finalized level and the requested one: awk columns FEATURE FROM TO ERROR MESSAGE, JSON keys from and to.
  • kcl reassign alter --throttle help and stderr point at kcl reassign verify for clearing the throttle.

CHANGED

  • A command-level broker error puts the broker's message in parentheses after the kerr text (INVALID_UPDATE_VERSION: The given update version was invalid. (downgrade not allowed)); it followed a second colon.

kcl reassign verify takes the plan alter took and prints one row per
partition: in-progress when ListPartitionReassignments still lists it,
complete when the metadata replicas equal the target as a set, differs
otherwise, and an unknown STATUS with the error in ERROR and MESSAGE
when the metadata or the list answers the partition with an error. The
command exits 1 unless every row is complete, so a script can loop on
it.

When every row is complete, the throttle alter --throttle set is
deleted the way kafka-reassign-partitions.sh --verify deletes it: both
rates on every broker in the union of current and target replicas, and
both replica lists on every topic in the plan, one IncrementalAlterConfigs
with a DELETE per config. Text names what was cleared on stderr; JSON
carries it under throttles_cleared. A delete that fails is the
command's error after the table prints, and the resources that did
clear are still reported.

out.FormattedTable gains SetField for the top-level JSON key. alter
--throttle's help and stderr line now point at verify rather than at a
hand-typed config alter.
kcl cluster features update --release-version 4.4 expands to one
update per feature the release finalizes, from kversion's table, in
place of the FEATURE=VERSION arguments; both together is a usage
error, as is a release kversion does not know, which names the newest
it does.

Both forms now print FROM and TO: FROM is the level the cluster has
finalized, read from one ApiVersions request first, 0 for a feature it
has not finalized and unknown when the broker's finalized epoch is -1;
TO is the level requested. The walkthrough runs the dry run form and
pins the new header and keys.
verify printed its table and then, when deleting a throttle config
failed, returned the error, which under --format json wrote a second
JSON object after the first. The failure is now throttles_cleared.error
in the one document, a stderr line in text, and the command exits 1.

BrokerErr put the broker's message after a second colon, behind the
kerr description's own period: "invalid.: downgrade not allowed". The
message is in parentheses now.
@twmb
twmb merged commit 61b8e8a into master Sep 18, 2026
1 check passed
@twmb
twmb deleted the reassign-verify branch September 18, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant