Skip to content

fix(deps): Update github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main)#21696

Merged
rfratto merged 1 commit into
mainfrom
deps-update/main-github.comtwmbfranz-gopkgkadm
Jun 12, 2026
Merged

fix(deps): Update github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main)#21696
rfratto merged 1 commit into
mainfrom
deps-update/main-github.comtwmbfranz-gopkgkadm

Conversation

@renovate-sh-app

@renovate-sh-app renovate-sh-app Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/twmb/franz-go/pkg/kadm v1.17.2v1.18.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

twmb/franz-go (github.com/twmb/franz-go/pkg/kadm)

v1.18.0

===

This release adds support for Kafka 3.7, adds a few community requested APIs,
some internal improvements, and fixes two bugs. One of the bugfixes is for a
deadlock; it is recommended to bump to this release to ensure you do not run
into the deadlock. The features in this release are relatively small.

This adds protocol support for KIP-890 and KIP-994, and
adds further protocol support for [KIP-848][KIP-848]. If you are using
transactions, you may see a new kerr.TransactionAbortable error, which
signals that your ongoing transaction should be aborted and will not be
successful if you try to commit it.

Lastly, there have been a few improvements to pkg/sr that are not mentioned
in these changelog notes.

Bug fixes

  • If you canceled the context used while producing while your client was
    at the maximum buffered records or bytes, it was possible to experience
    deadlocks. This has been fixed. See #​832 for more details.

  • Previously, if using GetConsumeTopics while regex consuming, the function
    would return all topics ever discovered. It now returns only the topics that
    are being consumed.

Improvements

  • The client now internaly ignores OutOfOrderSequenceNumber errors that are
    encountered when consuming if possible. If a producer produces very infrequently,
    it is possible the broker forgets the producer by the next time the producer
    produces. In this case, the producer receives an OutOfOrderSequenceNumber error.
    The client now internally resets properly so that you do not see the error.

Features

  • AllowRebalance and CloseAllowingRebalance have been added to GroupTransactSession.
  • The FetchTopic type now has includes the topic's TopicID.
  • The ErrGroupSession internal error field is now public, allowing you to test how you handle the internal error.
  • You may now receive a kerr.TransactionAbortable error from many functions while using transactions.

Relevant commits

  • 0fd1959d kgo: support Kafka 3.8's kip-890 modifications
  • 68163c55 bugfix kgo: do not add all topics to internal tps map when regex consuming
  • 3548d1f7 improvement kgo: ignore OOOSN where possible
  • 6a759401 bugfix kgo: fix potential deadlock when reaching max buffered (records|bytes)
  • 4bfb0c68 feature kgo: add TopicID to the FetchTopic type
  • 06a9c47d feature kgo: export the wrapped error from ErrGroupSession
  • 4affe8ef feature kgo: add AllowRebalance and CloseAllowingRebalance to GroupTransactSession

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

@renovate-sh-app renovate-sh-app Bot added dependencies Pull requests that update a dependency file update-minor labels Apr 24, 2026
@renovate-sh-app renovate-sh-app Bot requested a review from a team as a code owner April 24, 2026 22:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Autofix Details

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: GetConsumeTopics returns nil for share consumers
    • I updated the early guard in GetConsumeTopics to include c.s so share-group consumers no longer return nil prematurely.
  • ✅ Fixed: FetchOffsetsByID v0-v7 fallback collapses topics
    • I changed the v0-v7 fallback to resolve topic names to TopicIDs and return an explicit error if resolution fails, preventing silent overwrites under TopicID{}.

Create PR

Or push these changes by commenting:

@cursor push 3b96a4c253
Preview (3b96a4c253)
diff --git a/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go b/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
--- a/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
+++ b/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
@@ -2738,8 +2738,19 @@
 
 	// v0-v7 fallback: resp.Topics only. Convert to group format
 	// for the shared buildPartitions helper.
+	// Resolve topic names to IDs to avoid collapsing all responses
+	// under a zero TopicID key.
+	topics := make(Offsets, len(resp.Topics))
+	for _, t := range resp.Topics {
+		topics[t.Topic] = nil
+	}
+	name2id := cl.resolveTopicIDs(ctx, topics)
 	rs := make(OffsetResponsesByID)
 	for _, t := range resp.Topics {
+		id := name2id[t.Topic]
+		if id == (TopicID{}) {
+			return nil, fmt.Errorf("unable to resolve topic ID for topic %q in offset fetch response", t.Topic)
+		}
 		gp := make([]kmsg.OffsetFetchResponseGroupTopicPartition, len(t.Partitions))
 		for i, p := range t.Partitions {
 			gp[i] = kmsg.OffsetFetchResponseGroupTopicPartition{
@@ -2750,12 +2761,11 @@
 				ErrorCode:   p.ErrorCode,
 			}
 		}
-		// v0-v7 has no TopicID; use zero value.
-		rt, err := buildPartitions(t.Topic, TopicID{}, gp)
+		rt, err := buildPartitions(t.Topic, id, gp)
 		if err != nil {
 			return nil, err
 		}
-		rs[TopicID{}] = rt
+		rs[id] = rt
 	}
 	return rs, nil
 }

diff --git a/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go b/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go
--- a/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go
+++ b/vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go
@@ -863,7 +863,7 @@
 // GetConsumeTopics retrieves a list of current topics being consumed.
 func (cl *Client) GetConsumeTopics() []string {
 	c := &cl.consumer
-	if c.g == nil && c.d == nil {
+	if c.g == nil && c.d == nil && c.s == nil {
 		return nil
 	}
 	var m map[string]*topicPartitions

You can send follow-ups to the cloud agent here.

Comment thread vendor/github.com/twmb/franz-go/pkg/kgo/consumer.go
Comment thread vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch 2 times, most recently from e80fce3 to 2a4969d Compare April 28, 2026 13:10
@renovate-sh-app renovate-sh-app Bot changed the title fix(deps): update module github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main) fix(deps): Update module github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main) Apr 28, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: CommitOffsets fails entirely when metadata fetch fails
    • CommitOffsets now distinguishes metadata request failure from unresolved topics and still sends the commit using topic names when metadata cannot be fetched.

Create PR

Or push these changes by commenting:

@cursor push 2f65b00e40
Preview (2f65b00e40)
diff --git a/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go b/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
--- a/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
+++ b/vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
@@ -824,7 +824,7 @@
 // failures are included in the responses.
 func (cl *Client) CommitOffsets(ctx context.Context, group string, os Offsets) (OffsetResponses, error) {
 	// Resolve topic names to IDs via metadata for v10+ support.
-	t2id := cl.resolveTopicIDs(ctx, os)
+	t2id, resolvedIDs := cl.resolveTopicIDs(ctx, os)
 
 	rs := make(OffsetResponses)
 
@@ -832,7 +832,7 @@
 	req.Group = group
 	for t, ps := range os {
 		id, ok := t2id[t]
-		if !ok {
+		if !ok && resolvedIDs {
 			// Cannot resolve topic name to ID -- inject error
 			// for all partitions and skip in the request.
 			rt := make(map[int32]OffsetResponse)
@@ -2524,18 +2524,18 @@
 
 // resolveTopicIDs issues a metadata request for the topics in the given
 // Offsets map and returns a name-to-TopicID mapping.
-func (cl *Client) resolveTopicIDs(ctx context.Context, os Offsets) map[string]TopicID {
+func (cl *Client) resolveTopicIDs(ctx context.Context, os Offsets) (map[string]TopicID, bool) {
 	topics := make([]string, 0, len(os))
 	for t := range os {
 		topics = append(topics, t)
 	}
 	t2id := make(map[string]TopicID, len(topics))
 	if len(topics) == 0 {
-		return t2id
+		return t2id, true
 	}
 	meta, err := cl.Metadata(ctx, topics...)
 	if err != nil {
-		return t2id
+		return t2id, false
 	}
 	for _, td := range meta.Topics {
 		if td.Err != nil {
@@ -2543,7 +2543,7 @@
 		}
 		t2id[td.Topic] = td.ID
 	}
-	return t2id
+	return t2id, true
 }
 
 // resolveTopicNames issues a metadata request for all topics and returns

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 2a4969d. Configure here.

Comment thread vendor/github.com/twmb/franz-go/pkg/kadm/groups.go
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch 8 times, most recently from b61d310 to 4a11836 Compare May 5, 2026 13:18
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch 11 times, most recently from 3eb4edf to 01506e4 Compare May 8, 2026 10:11
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch 22 times, most recently from 460b169 to d6fc8dc Compare May 14, 2026 05:11
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch from d6fc8dc to 2181d66 Compare May 27, 2026 17:20
@renovate-sh-app renovate-sh-app Bot changed the title fix(deps): Update module github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main) fix(deps): Update github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main) Jun 10, 2026
| datasource | package                           | from    | to      |
| ---------- | --------------------------------- | ------- | ------- |
| go         | github.com/twmb/franz-go/pkg/kadm | v1.17.2 | v1.18.0 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
@renovate-sh-app renovate-sh-app Bot force-pushed the deps-update/main-github.comtwmbfranz-gopkgkadm branch from 2181d66 to 3501141 Compare June 12, 2026 23:08
@rfratto rfratto merged commit 95f0aba into main Jun 12, 2026
87 checks passed
@rfratto rfratto deleted the deps-update/main-github.comtwmbfranz-gopkgkadm branch June 12, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/S update-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant