Skip to content

fix(gRPC): support identifying cascade cancel when gRPC handler ctx is wrapped by standard context - #1992

Open
DMwangnima wants to merge 1 commit into
cloudwego:mainfrom
DMwangnima:optimize/grpc-cascade-cancel
Open

DMwangnima wants to merge 1 commit into
cloudwego:mainfrom
DMwangnima:optimize/grpc-cascade-cancel

Conversation

@DMwangnima

@DMwangnima DMwangnima commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):
修复 gRPC handler context 经WithCancelWithTimeoutWithCancelCause 包装后无法识别级联 Cancel 的问题。通过私有取消原因标记保留 Kitex Stream 的取消来源,同时避免将用户主动 Cancel 或普通 Canceled Status 误判为级联 Cancel

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@DMwangnima
DMwangnima requested review from a team as code owners August 24, 2026 08:28
@DMwangnima
DMwangnima force-pushed the optimize/grpc-cascade-cancel branch from 2f4e255 to 2a97566 Compare August 24, 2026 10:15
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.11%. Comparing base (8bb270e) to head (b72f9cc).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/remote/trans/nphttp2/grpc/transport.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1992      +/-   ##
==========================================
+ Coverage   62.95%   63.11%   +0.15%     
==========================================
  Files         394      396       +2     
  Lines       30267    30382     +115     
==========================================
+ Hits        19056    19177     +121     
+ Misses       9924     9921       -3     
+ Partials     1287     1284       -3     
Flag Coverage Δ
integration 51.95% <60.00%> (+0.08%) ⬆️
unit 53.80% <92.00%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DMwangnima
DMwangnima force-pushed the optimize/grpc-cascade-cancel branch 4 times, most recently from ce17691 to 25bcc43 Compare August 25, 2026 03:20
@DMwangnima
DMwangnima force-pushed the optimize/grpc-cascade-cancel branch from 25bcc43 to b72f9cc Compare August 25, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant