segmentio / topicctl

Tool for declarative management of Kafka topics
MIT License
599 stars 55 forks source link

apply: Allow ignoring a specific error returned from updatePartitions() #184

Closed shimon-armis closed 7 months ago

shimon-armis commented 8 months ago

Description

When applying topic's configuration, we'd like to be able avoid failing in case the desired topic's partitions count is smaller than the actual topic's partitions count (on the broker). We know that Kafka doesn't allow partitions decrease so instead of failing the operation we'd like to continue without doing anything (and make this operation idempotent, in that aspect). This is very convenient when trying to apply a batch of topics in which case, we don't want to fail the rest of the batch for one topic that its partitions count configuration is lower than the actual partitions count. (on the broker).

This change is backward compatible, as the default behavior is kept.

shimon-armis commented 8 months ago

@yolken-segment @cdignam-segment Hey guys. Can you plz take a look?

shimon-armis commented 8 months ago

@hhahn-tw @petedannemann Can you guys please review this one?

shimon-armis commented 8 months ago

@hhahn-tw Can you please assist with PR check?

shimon-armis commented 8 months ago

@noorul @jkoelker @mericsson @hhahn-tw Can you guys assist with the PR check failure? It doesn't seem related to my change.

jkoelker commented 8 months ago

@noorul @jkoelker @mericsson @hhahn-tw Can you guys assist with the PR check failure? It doesn't seem related to my change.

just rebase, it got removed recently: https://github.com/segmentio/topicctl/commit/b83ceba9383c89372b325f193caa113b9cd17eb7

shimon-armis commented 8 months ago

@jkoelker can you please approve?

shimon-armis commented 8 months ago

@jkoelker I've addressed the comment and updated the code. Can you please approve?

shimon-armis commented 8 months ago

@yolken-segment @cdignam-segment Can you guys approve? (Looking for a maintainer to approve - not sure who is the maintainer here...)

shimon-armis commented 8 months ago

@jkoelker Who can merge this?

shimon-armis commented 7 months ago

@hhahn-tw @jkoelker Who can merge this PR?