Skip to content

Removes Experimental attribute from ResilienceHandler class #5670

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/MakeApiBaselines.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Write-Output "Installing required toolset"
InitializeDotNetCli -install $true | Out-Null

$Project = $PSScriptRoot + "/../eng/Tools/ApiChief/ApiChief.csproj"
$Command = $PSScriptRoot + "/../artifacts/bin/ApiChief/Debug/net8.0/ApiChief.dll"
$Command = $PSScriptRoot + "/../artifacts/bin/ApiChief/Debug/net9.0/ApiChief.dll"
$LibrariesFolder = $PSScriptRoot + "/../src/Libraries"

Write-Output "Building ApiChief tool"
Expand All @@ -28,7 +28,7 @@ Write-Output "Creating API baseline files in the src/Libraries folder"
Get-ChildItem -Path $LibrariesFolder -Depth 1 -Include *.csproj | ForEach-Object `
{
$name = Split-Path $_.FullName -LeafBase
$path = "$PSScriptRoot\..\artifacts\bin\$name\Debug\net8.0\$name.dll"
$path = "$PSScriptRoot\..\artifacts\bin\$name\Debug\net9.0\$name.dll"
Write-Host " Processing" $name
dotnet $Command $path emit baseline -o "$LibrariesFolder/$name/$name.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Extensions.Resilience\Microsoft.Extensions.Resilience.csproj" />
<ProjectReference Include="..\Microsoft.Extensions.Http.Diagnostics\Microsoft.Extensions.Http.Diagnostics.csproj" />
Expand Down
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",
"Types": [
{
"Type": "class Microsoft.Extensions.Http.Resilience.HedgingEndpointOptions",
Expand Down Expand Up @@ -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"
}
]
},
Expand All @@ -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"
}
]
},
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -520,4 +564,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Http.Diagnostics;
using Microsoft.Extensions.Http.Resilience.Internal;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;
using Polly;

Expand All @@ -17,7 +15,6 @@ namespace Microsoft.Extensions.Http.Resilience;
/// <summary>
/// Base class for resilience handler, i.e. handlers that use resilience strategies to send the requests.
/// </summary>
[Experimental(diagnosticId: DiagnosticIds.Experiments.Resilience, UrlFormat = DiagnosticIds.UrlFormat)]
public class ResilienceHandler : DelegatingHandler
{
private readonly Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> _pipelineProvider;
Expand Down
Loading