fix(deps): Update github.com/twmb/franz-go/pkg/kadm to v1.18.0 (main)#21696
Merged
Conversation
There was a problem hiding this comment.
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{}.
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]*topicPartitionsYou can send follow-ups to the cloud agent here.
e80fce3 to
2a4969d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
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.
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 returnsYou can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 2a4969d. Configure here.
b61d310 to
4a11836
Compare
3eb4edf to
01506e4
Compare
460b169 to
d6fc8dc
Compare
d6fc8dc to
2181d66
Compare
| 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>
2181d66 to
3501141
Compare
rfratto
approved these changes
Jun 12, 2026
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.


This PR contains the following updates:
v1.17.2→v1.18.0Warning
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.TransactionAbortableerror, whichsignals 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/srthat are not mentionedin 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
GetConsumeTopicswhile regex consuming, the functionwould return all topics ever discovered. It now returns only the topics that
are being consumed.
Improvements
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
AllowRebalanceandCloseAllowingRebalancehave been added toGroupTransactSession.FetchTopictype now has includes the topic'sTopicID.ErrGroupSessioninternal error field is now public, allowing you to test how you handle the internal error.kerr.TransactionAbortableerror from many functions while using transactions.Relevant commits
0fd1959dkgo: support Kafka 3.8's kip-890 modifications68163c55bugfix kgo: do not add all topics to internal tps map when regex consuming3548d1f7improvement kgo: ignore OOOSN where possible6a759401bugfix kgo: fix potential deadlock when reaching max buffered (records|bytes)4bfb0c68feature kgo: add TopicID to the FetchTopic type06a9c47dfeature kgo: export the wrapped error from ErrGroupSession4affe8effeature kgo: add AllowRebalance and CloseAllowingRebalance to GroupTransactSessionConfiguration
📅 Schedule: (UTC)
🚦 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.
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.