Skip to content

refactor(client): promote ContextualTransport to runtime package#471

Merged
fredbi merged 1 commit into
go-openapi:masterfrom
fredbi:fix/contextual-client
May 25, 2026
Merged

refactor(client): promote ContextualTransport to runtime package#471
fredbi merged 1 commit into
go-openapi:masterfrom
fredbi:fix/contextual-client

Conversation

@fredbi
Copy link
Copy Markdown
Member

@fredbi fredbi commented May 25, 2026

Move ContextualTransport from client/ to the runtime root package so it sits side-by-side with ClientTransport, its canonical home. Update WithOpenTelemetry/WithOpenTracing return types and the submitWrapped type assertion to use the qualified name.

Mark the cached Context fields on runtime.ClientOperation and client.Runtime as Deprecated, redirecting callers to ContextualTransport.SubmitContext. The internal ensureContext fallback keeps reading the legacy field under an explicit //nolint:staticcheck.

Refresh stale commented signatures on ClientTransport.Submit and ContextualTransport.SubmitContext with short modern docstrings.

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist

  • I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
  • I have rebased and squashed my work, so only one commit remains
  • I have added tests to cover my changes.
  • I have properly enriched go doc comments in code.
  • I have properly documented any breaking change.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.23%. Comparing base (c1e2e2c) to head (7dba3f8).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
client/opentelemetry.go 33.33% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
- Coverage   83.30%   83.23%   -0.07%     
==========================================
  Files          64       64              
  Lines        4516     4516              
==========================================
- Hits         3762     3759       -3     
- Misses        583      585       +2     
- Partials      171      172       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Move ContextualTransport from client/ to the runtime root package so it
sits side-by-side with ClientTransport, its canonical home. Update
WithOpenTelemetry/WithOpenTracing return types and the submitWrapped
type assertion to use the qualified name.

Mark the cached Context fields on runtime.ClientOperation and
client.Runtime as Deprecated, redirecting callers to
ContextualTransport.SubmitContext. The internal ensureContext fallback
keeps reading the legacy field under an explicit //nolint:staticcheck.

Refresh stale commented signatures on ClientTransport.Submit and
ContextualTransport.SubmitContext with short modern docstrings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi force-pushed the fix/contextual-client branch from 1102054 to 7dba3f8 Compare May 25, 2026 16:36
@fredbi fredbi merged commit af192a9 into go-openapi:master May 25, 2026
31 of 32 checks passed
@fredbi fredbi deleted the fix/contextual-client branch May 25, 2026 16:41
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.

1 participant