Skip to content

Commit d499b02

Browse files
authored
Merge branch 'dev' into jviau/abort-channel
2 parents 37b5f69 + 48712e8 commit d499b02

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
<add key="AzureFunctionsRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsRelease/nuget/v3/index.json" />
99
<add key="AzureFunctionsPreRelease" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsPreRelease/nuget/v3/index.json" />
1010
<add key="AzureFunctionsTempStaging" value="https://azfunc.pkgs.visualstudio.com/e6a70c92-4128-439f-8012-382fe78d6396/_packaging/AzureFunctionsTempStaging/nuget/v3/index.json" />
11+
<add key="AzureFunctionsInfra" value="https://pkgs.dev.azure.com/azfunc/public/_packaging/infra/nuget/v3/index.json" />
1112
</packageSources>
1213
</configuration>

eng/ci/templates/official/jobs/process-coldstart.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
artifact: $(artifactName)
3838

3939
steps:
40-
- checkout: none
4140
- pwsh: |
4241
$sampleSize = $env:SAMPLE_SIZE
4342
$values = @()
@@ -98,15 +97,8 @@ jobs:
9897
scriptType: 'pscore'
9998
scriptLocation: 'inlineScript'
10099
inlineScript: |
101-
$json = Get-Content -Path $(resultsJsonPath) -Raw
102-
$dateTimeUtc = [datetimeoffset]::UtcNow
103-
104-
$query = @"
105-
INSERT INTO ColdStart (DateTimeUtc, OS, Description, Document)
106-
VALUES ('$dateTimeUtc', '${{ parameters.os }}', '${{ parameters.description }}', '$json')
107-
"@
108-
109-
Invoke-Sqlcmd -ConnectionString "$(ColdStartResultsSqlConnectionString)" -Query $query
110-
100+
$env:PATH = [System.IO.Path]::Combine($env:USERPROFILE, ".dotnet", "tools") + ";$env:PATH"
101+
dotnet tool install -g Microsoft.Azure.Functions.ColdStartDataWriter --prerelease
102+
func-cold-start-data-writer --os '${{ parameters.os }}' --description '${{ parameters.description }}' --sql-connection '$(ColdStartResultsSqlConnectionString)' --document-file-path '$(resultsJsonPath)'
111103
displayName: Persist results
112104
condition: eq(variables['Build.Reason'], 'Schedule')

release_notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
- Update HttpWorkerOptions to implement IOptionsFormatter (#11175)
1212
- Improved metadata binding validation (#11101)
1313
- Throw exception instead of timing out when worker channel exits before initializing gRPC (#10937)
14+
- Skip logging errors on gRPC client disconnect (#10572)

src/WebJobs.Script.Grpc/Server/FunctionRpcService.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

44
using System;
5+
using System.IO;
56
using System.Reactive.Linq;
67
using System.Threading;
78
using System.Threading.Channels;
89
using System.Threading.Tasks;
910
using Grpc.Core;
11+
using Microsoft.AspNetCore.Connections;
1012
using Microsoft.Azure.WebJobs.Script.Eventing;
1113
using Microsoft.Azure.WebJobs.Script.Grpc.Eventing;
1214
using Microsoft.Azure.WebJobs.Script.Grpc.Messages;
1315
using Microsoft.Extensions.Logging;
14-
1516
using MsgType = Microsoft.Azure.WebJobs.Script.Grpc.Messages.StreamingMessage.ContentOneofCase;
1617

1718
namespace Microsoft.Azure.WebJobs.Script.Grpc
@@ -75,6 +76,14 @@ static Task<Task<bool>> MoveNextAsync(IAsyncStreamReader<StreamingMessage> reque
7576
}
7677
}
7778
}
79+
catch (IOException ex) when (ex.InnerException is ConnectionAbortedException && context.CancellationToken.IsCancellationRequested)
80+
{
81+
// Expected when the client disconnects.
82+
// Client side stream termination (e.g., process exit or network interruption)
83+
// can cause MoveNext() to throw an IOException with a ConnectionAbortedException as the inner exception.
84+
// If ServerCallContext's cancellation token is also canceled at this point, the exception can be safely ignored.
85+
return;
86+
}
7887
catch (Exception rpcException)
7988
{
8089
// We catch the exception, just to report it, then re-throw it

0 commit comments

Comments
 (0)