-
Notifications
You must be signed in to change notification settings - Fork 757
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
Removes Experimental attribute from ResilienceHandler class #5670
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,12 @@ | |
<MinMutationScore>100</MinMutationScore> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- Disable "Published symbols cannot be deleted to maintain compatibility" warning | ||
because we have different APIs for different TFMs. --> | ||
<NoWarn Condition="'$(TargetFramework)' == 'net462'">$(NoWarn);LA0006</NoWarn> | ||
</PropertyGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have to suppress There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is suppressing all of the warnings on public symbols though, right? Is there not a way to suppress that single change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, I'm not very familiar to which analyzer is throwing those errors, but FWIW we do run package validation when we pack projects, which would catch compatibility issues in packages. In this case, net462 and net6.0+ aren't even supposed to be compatible with each other so perhaps the analyzer tooling being used here is not correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sometime ago I tried to suppress the warning in a source file for a particular change, but it didn't work. Here is another fresher PR #5690 where I tried it again and it didn't work. Unfortunately, we have to suppress the warning for the whole project.
Yes, I agree. I don't understand what exactly the analyzer is catching. Adding a non-abstract method that is available in net6+ and is not on net462 is alright in regards of compatibility, i.e. upgrading from net462 to net6+ will not break. Right? |
||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Microsoft.Extensions.Resilience\Microsoft.Extensions.Resilience.csproj" /> | ||
<ProjectReference Include="..\Microsoft.Extensions.Http.Diagnostics\Microsoft.Extensions.Http.Diagnostics.csproj" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"Name": "Microsoft.Extensions.Http.Resilience, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", | ||
"Name": "Microsoft.Extensions.Http.Resilience, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API json file hasn't been updated since dotnet/extensions 8.0.0 therefore the changes to this file also include APIs that were changed/updated earlier. |
||
"Types": [ | ||
{ | ||
"Type": "class Microsoft.Extensions.Http.Resilience.HedgingEndpointOptions", | ||
|
@@ -42,6 +42,10 @@ | |
{ | ||
"Member": "static bool Microsoft.Extensions.Http.Resilience.HttpClientHedgingResiliencePredicates.IsTransient(Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome);", | ||
"Stage": "Stable" | ||
}, | ||
{ | ||
"Member": "static bool Microsoft.Extensions.Http.Resilience.HttpClientHedgingResiliencePredicates.IsTransient(Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome, System.Threading.CancellationToken cancellationToken);", | ||
"Stage": "Experimental" | ||
} | ||
] | ||
}, | ||
|
@@ -52,6 +56,10 @@ | |
{ | ||
"Member": "static bool Microsoft.Extensions.Http.Resilience.HttpClientResiliencePredicates.IsTransient(Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome);", | ||
"Stage": "Stable" | ||
}, | ||
{ | ||
"Member": "static bool Microsoft.Extensions.Http.Resilience.HttpClientResiliencePredicates.IsTransient(Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome, System.Threading.CancellationToken cancellationToken);", | ||
"Stage": "Experimental" | ||
} | ||
] | ||
}, | ||
|
@@ -75,6 +83,20 @@ | |
} | ||
] | ||
}, | ||
{ | ||
"Type": "static class Polly.HttpResilienceContextExtensions", | ||
"Stage": "Experimental", | ||
"Methods": [ | ||
{ | ||
"Member": "static System.Net.Http.HttpRequestMessage? Polly.HttpResilienceContextExtensions.GetRequestMessage(this Polly.ResilienceContext context);", | ||
"Stage": "Experimental" | ||
}, | ||
{ | ||
"Member": "static void Polly.HttpResilienceContextExtensions.SetRequestMessage(this Polly.ResilienceContext context, System.Net.Http.HttpRequestMessage? requestMessage);", | ||
"Stage": "Experimental" | ||
} | ||
] | ||
}, | ||
{ | ||
"Type": "static class System.Net.Http.HttpResilienceHttpRequestMessageExtensions", | ||
"Stage": "Stable", | ||
|
@@ -287,6 +309,28 @@ | |
} | ||
] | ||
}, | ||
{ | ||
"Type": "class Microsoft.Extensions.Http.Resilience.ResilienceHandler : System.Net.Http.DelegatingHandler", | ||
"Stage": "Stable", | ||
"Methods": [ | ||
{ | ||
"Member": "Microsoft.Extensions.Http.Resilience.ResilienceHandler.ResilienceHandler(System.Func<System.Net.Http.HttpRequestMessage, Polly.ResiliencePipeline<System.Net.Http.HttpResponseMessage>> pipelineProvider);", | ||
"Stage": "Stable" | ||
}, | ||
{ | ||
"Member": "Microsoft.Extensions.Http.Resilience.ResilienceHandler.ResilienceHandler(Polly.ResiliencePipeline<System.Net.Http.HttpResponseMessage> pipeline);", | ||
"Stage": "Stable" | ||
}, | ||
{ | ||
"Member": "override System.Net.Http.HttpResponseMessage Microsoft.Extensions.Http.Resilience.ResilienceHandler.Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);", | ||
"Stage": "Stable" | ||
}, | ||
{ | ||
"Member": "override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> Microsoft.Extensions.Http.Resilience.ResilienceHandler.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken);", | ||
"Stage": "Stable" | ||
} | ||
] | ||
}, | ||
{ | ||
"Type": "sealed class Microsoft.Extensions.Http.Resilience.ResilienceHandlerContext", | ||
"Stage": "Stable", | ||
|
@@ -520,4 +564,4 @@ | |
] | ||
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now build the
ApiChief
tool fornet9.0
that is why I changed this.