grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

interop: Replace context.Background() with passed ctx

Open Aditya-Sood opened this issue 1 year ago • 6 comments

Fixes #6763

RELEASE NOTES: none

Aditya-Sood avatar Dec 01 '23 06:12 Aditya-Sood

Codecov Report

Merging #6827 (1ed10f4) into master (7935c4f) will increase coverage by 0.35%. Report is 49 commits behind head on master. The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6827      +/-   ##
==========================================
+ Coverage   83.40%   83.75%   +0.35%     
==========================================
  Files         285      287       +2     
  Lines       30879    30928      +49     
==========================================
+ Hits        25754    25904     +150     
+ Misses       4053     3963      -90     
+ Partials     1072     1061      -11     

see 65 files with indirect coverage changes

codecov[bot] avatar Dec 01 '23 06:12 codecov[bot]

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Dec 13 '23 22:12 github-actions[bot]

hi @dfawley, could you please reopen the PR? I have pushed the code review changes now

Aditya-Sood avatar Dec 22 '23 06:12 Aditya-Sood

thanks @dfawley, I've pushed the change in the latest commit

one query - is the use of CancelFunc unidirectional (parent to child ctx)? or can a child be allowed to cancel the ctx for itself and its siblings?

Aditya-Sood avatar Jan 15 '24 03:01 Aditya-Sood

one query - is the use of CancelFunc unidirectional (parent to child ctx)? or can a child be allowed to cancel the ctx for itself and its siblings?

Derived contexts cannot cancel their parents/siblings and cannot be cancelled via a method on the context itself (by design).

The thing that creates a context should be the only thing able to cancel it.

dfawley avatar Jan 16 '24 17:01 dfawley

thank you for the clarifications @dfawley! I've pushed the changes to the branch

Aditya-Sood avatar Jan 18 '24 05:01 Aditya-Sood

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Jan 30 '24 20:01 github-actions[bot]

hi @dfawley, thanks for the feedback - I'd missed the obvious use of WithTimeout instead of WithDeadline have pushed the review changes in new commit

Aditya-Sood avatar Jan 31 '24 06:01 Aditya-Sood