Skip to content

feat(go): introduce context.Context to client methods#2964

Open
chengxilo wants to merge 15 commits intoapache:masterfrom
chengxilo:introduce-context
Open

feat(go): introduce context.Context to client methods#2964
chengxilo wants to merge 15 commits intoapache:masterfrom
chengxilo:introduce-context

Conversation

@chengxilo
Copy link
Copy Markdown
Contributor

@chengxilo chengxilo commented Mar 18, 2026

Which issue does this PR close?

N/A

Rationale

Standardizing the Go SDK to support context.Context across all client methods. This allows users to handle timeouts, cancellations

What changed?

The iggcon.Client interface and its TCP implementation have been updated to include context.Context as the first parameter for all API methods.
Correspondingly, all internal command-handling logic now respects context deadlines and cancellations.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Claude Sonnet 4.6
  2. Add context parameters, initial implementation of test (modifed manually)
  3. I read the code and test
  4. yes

@chengxilo chengxilo marked this pull request as draft March 18, 2026 05:24
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 75.64103% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.27%. Comparing base (27f0f11) to head (be075d5).

Files with missing lines Patch % Lines
foreign/go/samples/consumer/consumer.go 0.00% 11 Missing ⚠️
foreign/go/samples/producer/producer.go 0.00% 11 Missing ⚠️
foreign/go/client/tcp/tcp_core.go 78.94% 7 Missing and 1 partial ⚠️
foreign/go/client/iggy_client.go 60.00% 4 Missing ⚠️
foreign/go/client/tcp/tcp_clients_management.go 50.00% 2 Missing ⚠️
foreign/go/client/tcp/tcp_session_management.go 83.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2964      +/-   ##
============================================
- Coverage     72.71%   71.27%   -1.44%     
  Complexity      943      943              
============================================
  Files          1117     1136      +19     
  Lines         96285    98671    +2386     
  Branches      73485    75827    +2342     
============================================
+ Hits          70014    70329     +315     
- Misses        23725    25656    +1931     
- Partials       2546     2686     +140     
Components Coverage Δ
Rust Core 71.53% <ø> (-1.93%) ⬇️
Java SDK 62.30% <ø> (ø)
C# SDK 69.40% <ø> (ø)
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (ø)
Go SDK 39.30% <75.64%> (+0.32%) ⬆️
Files with missing lines Coverage Δ
foreign/go/client/tcp/cluster.go 55.55% <100.00%> (ø)
...reign/go/client/tcp/tcp_access_token_management.go 100.00% <100.00%> (ø)
...ign/go/client/tcp/tcp_consumer_group_management.go 96.82% <100.00%> (ø)
foreign/go/client/tcp/tcp_messaging.go 85.18% <100.00%> (ø)
foreign/go/client/tcp/tcp_offset_management.go 100.00% <100.00%> (ø)
foreign/go/client/tcp/tcp_partition_management.go 100.00% <100.00%> (ø)
foreign/go/client/tcp/tcp_stream_management.go 82.85% <100.00%> (ø)
foreign/go/client/tcp/tcp_topic_management.go 81.13% <100.00%> (ø)
foreign/go/client/tcp/tcp_user_management.go 92.00% <100.00%> (ø)
foreign/go/client/tcp/tcp_utilities.go 80.00% <100.00%> (ø)
... and 7 more

... and 225 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chengxilo chengxilo marked this pull request as ready for review March 18, 2026 06:03
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR.

Thank you for your contribution!

@github-actions github-actions bot added the stale Inactive issue or pull request label Mar 26, 2026
@github-actions github-actions bot removed the stale Inactive issue or pull request label Mar 27, 2026
@chengxilo chengxilo requested a review from hubcio March 31, 2026 19:15
Copy link
Copy Markdown
Member

@ryankert01 ryankert01 left a comment

Choose a reason for hiding this comment

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

Lg, like the idea.

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.

3 participants