Skip to content

Conversation

@grobinson-grafana
Copy link
Contributor

@grobinson-grafana grobinson-grafana commented Feb 9, 2026

What this PR does / why we need it:

This commit fixes how we do cancelation in kafkav2/consumer.go. There was a select which wasn't needed as b.Ongoing() checks for ctx.Done(), and then we also returned a non-nil error if PollRecords was aborted, which would have been reported as a service failure at shutdown.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@grobinson-grafana grobinson-grafana requested a review from a team as a code owner February 9, 2026 13:04
This commit fixes how we do cancelation in kafkav2/consumer.go.
There was a select which wasn't needed as b.Ongoing() checks for
ctx.Done(), and then we also returned a non-nil error if
PollRecords was aborted, otherwise it would be reported as a
service failure at shutdown.
@grobinson-grafana grobinson-grafana force-pushed the grobinson/fix-context-handle-consumer branch from dd27961 to 60f79ed Compare February 9, 2026 13:23
@grobinson-grafana grobinson-grafana merged commit f9f20e5 into main Feb 10, 2026
136 of 143 checks passed
@grobinson-grafana grobinson-grafana deleted the grobinson/fix-context-handle-consumer branch February 10, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants