Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cancellation token reported when using retries #2345

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 2, 2024

Fixes #2304

}
else
{
if (Options.CancellationToken.IsCancellationRequested && Options.CancellationToken != operationCanceledException.CancellationToken)
Copy link
Contributor

Choose a reason for hiding this comment

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

I just want to check the intent here... "if something cancelled (ex), and Options is also cancelled, but isn't the thing being reported by ex: replace ex with the cancellation of Options" - is that right? are we happy to simply lose the original ex (which is a different calcellation)? should it be an inner-exception?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is replacing the OCE from CancellationTokenSource with an OCE using Options.CancellationToken if it is canceled. I added a comment.

The original exception is from an internal CT so it isn't valuable to keep. An OCE nested inside an OCE would be confusing.

Copy link
Contributor

@mgravell mgravell left a comment

Choose a reason for hiding this comment

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

discussion point added, but looks good

@JamesNK JamesNK merged commit f075c79 into grpc:master Jan 2, 2024
5 checks passed
@JamesNK JamesNK deleted the jamesnk/retry-cancellationtoken branch January 2, 2024 23:29
oguzhand95 referenced this pull request in cerbos/cerbos-sdk-net Feb 26, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [Google.Protobuf](https://togithub.com/protocolbuffers/protobuf) |
`3.25.2` -> `3.25.3` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Google.Protobuf/3.25.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Google.Protobuf/3.25.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Google.Protobuf/3.25.2/3.25.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Google.Protobuf/3.25.2/3.25.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [Grpc.Net.Client](https://togithub.com/grpc/grpc-dotnet) | `2.60.0` ->
`2.61.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Grpc.Net.Client/2.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Grpc.Net.Client/2.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Grpc.Net.Client/2.60.0/2.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Grpc.Net.Client/2.60.0/2.61.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [NUnit](https://nunit.org/)
([source](https://togithub.com/nunit/nunit)) | `4.0.1` -> `4.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/NUnit/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/NUnit/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/NUnit/4.0.1/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/NUnit/4.0.1/4.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [coverlet.collector](https://togithub.com/coverlet-coverage/coverlet)
| `6.0.0` -> `6.0.1` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/coverlet.collector/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/coverlet.collector/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/coverlet.collector/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/coverlet.collector/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>protocolbuffers/protobuf (Google.Protobuf)</summary>

###
[`v3.25.3`](https://togithub.com/protocolbuffers/protobuf/compare/v3.25.2...v3.25.3)

</details>

<details>
<summary>grpc/grpc-dotnet (Grpc.Net.Client)</summary>

###
[`v2.61.0`](https://togithub.com/grpc/grpc-dotnet/releases/tag/v2.61.0)

##### What's Changed

- Update Grpc.Tools to 2.60.0 by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2336](https://togithub.com/grpc/grpc-dotnet/pull/2336)
- Bump dev version to 2.61.0-dev on master branch by
[@&#8203;stanley-cheung](https://togithub.com/stanley-cheung) in
[https://github.com/grpc/grpc-dotnet/pull/2337](https://togithub.com/grpc/grpc-dotnet/pull/2337)
- Fix cancellation token reported when using retries by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2345](https://togithub.com/grpc/grpc-dotnet/pull/2345)
- First pass at Grpc.StatusProto API by
[@&#8203;tonydnewell](https://togithub.com/tonydnewell) in
[https://github.com/grpc/grpc-dotnet/pull/2205](https://togithub.com/grpc/grpc-dotnet/pull/2205)
- Add ProtoStatus example by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2273](https://togithub.com/grpc/grpc-dotnet/pull/2273)
- Grpc.StatusProto clean up by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2349](https://togithub.com/grpc/grpc-dotnet/pull/2349)
- Bump follow-redirects from 1.15.3 to 1.15.4 in
/testassets/InteropTestsGrpcWebWebsite/Tests by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/grpc/grpc-dotnet/pull/2352](https://togithub.com/grpc/grpc-dotnet/pull/2352)
- Add key services tests for service and interceptor by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2356](https://togithub.com/grpc/grpc-dotnet/pull/2356)
- Allow GrpcChannel to use WinHttpHandler on Windows Server 2019 by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2362](https://togithub.com/grpc/grpc-dotnet/pull/2362)
- Add .NET 9 NuGet feed by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2365](https://togithub.com/grpc/grpc-dotnet/pull/2365)
- Add missing package mapping for net9 feed by
[@&#8203;JamesNK](https://togithub.com/JamesNK) in
[https://github.com/grpc/grpc-dotnet/pull/2366](https://togithub.com/grpc/grpc-dotnet/pull/2366)
- proposal: Build changelog based on previous stable version by
[@&#8203;tomkerkhove](https://togithub.com/tomkerkhove) in
[https://github.com/grpc/grpc-dotnet/pull/2269](https://togithub.com/grpc/grpc-dotnet/pull/2269)
- Bump Grpc.Tools to 1.61.0 by
[@&#8203;apolcyn](https://togithub.com/apolcyn) in
[https://github.com/grpc/grpc-dotnet/pull/2370](https://togithub.com/grpc/grpc-dotnet/pull/2370)
- Bump versions on v2.61.x by
[@&#8203;apolcyn](https://togithub.com/apolcyn) in
[https://github.com/grpc/grpc-dotnet/pull/2371](https://togithub.com/grpc/grpc-dotnet/pull/2371)
- Bump to v2.61.0 on v2.61.x branch by
[@&#8203;apolcyn](https://togithub.com/apolcyn) in
[https://github.com/grpc/grpc-dotnet/pull/2374](https://togithub.com/grpc/grpc-dotnet/pull/2374)

##### New Contributors

- [@&#8203;tonydnewell](https://togithub.com/tonydnewell) made their
first contribution in
[https://github.com/grpc/grpc-dotnet/pull/2205](https://togithub.com/grpc/grpc-dotnet/pull/2205)
- [@&#8203;tomkerkhove](https://togithub.com/tomkerkhove) made their
first contribution in
[https://github.com/grpc/grpc-dotnet/pull/2269](https://togithub.com/grpc/grpc-dotnet/pull/2269)

**Full Changelog**:
grpc/grpc-dotnet@v2.60.0...v2.61.0

</details>

<details>
<summary>nunit/nunit (NUnit)</summary>

### [`v4.1.0`](https://togithub.com/nunit/nunit/releases/tag/4.1.0):
NUnit 4.1.0

See [release
notes](https://docs.nunit.org/articles/nunit/release-notes/framework.html#nunit-41---february-23-2024)

</details>

<details>
<summary>coverlet-coverage/coverlet (coverlet.collector)</summary>

###
[`v6.0.1`](https://togithub.com/coverlet-coverage/coverlet/releases/tag/v6.0.1)

##### Fixed

- Uncovered lines in .NET 8 for inheriting records
[#&#8203;1555](https://togithub.com/coverlet-coverage/coverlet/issues/1555)
- Fix record constructors not covered when SkipAutoProps is true
[#&#8203;1561](https://togithub.com/coverlet-coverage/coverlet/issues/1561)
- Fix .NET 7 Method Group branch coverage issue
[#&#8203;1447](https://togithub.com/coverlet-coverage/coverlet/issues/1447)
- Fix ExcludeFromCodeCoverage does not exclude method in a partial class
[#&#8203;1548](https://togithub.com/coverlet-coverage/coverlet/issues/1548)
- Fix ExcludeFromCodeCoverage does not exclude F# task
[#&#8203;1547](https://togithub.com/coverlet-coverage/coverlet/issues/1547)
- Fix issues where ExcludeFromCodeCoverage ignored
[#&#8203;1431](https://togithub.com/coverlet-coverage/coverlet/issues/1431)
- Fix issues with ExcludeFromCodeCoverage attribute
[#&#8203;1484](https://togithub.com/coverlet-coverage/coverlet/issues/1484)
- Fix broken links in documentation
[#&#8203;1514](https://togithub.com/coverlet-coverage/coverlet/issues/1514)
- Fix problem with coverage for .net5 WPF application
[#&#8203;1221](https://togithub.com/coverlet-coverage/coverlet/issues/1221)
by https://github.com/lg2de
- Fix unable to instrument module for Microsoft.AspNetCore.Mvc.Razor
[#&#8203;1459](https://togithub.com/coverlet-coverage/coverlet/issues/1459)
by https://github.com/lg2de

##### Improvements

- Extended exclude by attribute feature to work with fully qualified
name
[#&#8203;1589](https://togithub.com/coverlet-coverage/coverlet/issues/1589)
- Use System.CommandLine instead of McMaster.Extensions.CommandLineUtils
[#&#8203;1474](https://togithub.com/coverlet-coverage/coverlet/issues/1474)
by https://github.com/Bertk
- Fix deadlog in Coverlet.Integration.Tests.BaseTest
[#&#8203;1541](https://togithub.com/coverlet-coverage/coverlet/pull/1541)
by https://github.com/Bertk
- Add coverlet.msbuild.tasks unit tests
[#&#8203;1534](https://togithub.com/coverlet-coverage/coverlet/pull/1534)
by https://github.com/Bertk

[Diff between 6.0.0 and
6.0.1](https://togithub.com/coverlet-coverage/coverlet/compare/v6.0.0...v6.0.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cerbos/cerbos-sdk-net).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIxMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants