Skip to content

Commit c9f6da0

Browse files
authored
Merge branch 'main' into WasmEnableStreamingResponse
2 parents 746e3d3 + 84fe422 commit c9f6da0

36 files changed

+713
-547
lines changed

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
numbers of the shared frameworks. -->
104104
<MicrosoftWindowsDesktopAppRuntimePackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftWindowsDesktopAppRuntimePackageVersion>
105105
<MicrosoftWindowsDesktopAppRefPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</MicrosoftWindowsDesktopAppRefPackageVersion>
106-
<MicrosoftNETSdkWindowsDesktopPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</MicrosoftNETSdkWindowsDesktopPackageVersion>
107106
<MicrosoftWindowsDesktopAppInternalPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</MicrosoftWindowsDesktopAppInternalPackageVersion>
108107

109108
<HostFxrVersion>$(MicrosoftNETCoreAppRuntimePackageVersion)</HostFxrVersion>

eng/Version.Details.xml

Lines changed: 269 additions & 265 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 127 additions & 123 deletions
Large diffs are not rendered by default.

eng/common/core-templates/jobs/jobs.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ jobs:
8383
- template: /eng/common/core-templates/jobs/source-build.yml
8484
parameters:
8585
is1ESPipeline: ${{ parameters.is1ESPipeline }}
86-
allCompletedJobId: Source_Build_Complete
8786
${{ each parameter in parameters.sourceBuildParameters }}:
8887
${{ parameter.key }}: ${{ parameter.value }}
8988

@@ -108,8 +107,6 @@ jobs:
108107
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
109108
- ${{ each job in parameters.jobs }}:
110109
- ${{ job.job }}
111-
- ${{ if eq(parameters.enableSourceBuild, true) }}:
112-
- Source_Build_Complete
113110

114111
runAsPublic: ${{ parameters.runAsPublic }}
115112
publishAssetsImmediately: ${{ or(parameters.publishAssetsImmediately, parameters.isAssetlessBuild) }}

eng/common/core-templates/jobs/source-build.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ parameters:
22
# This template adds arcade-powered source-build to CI. A job is created for each platform, as
33
# well as an optional server job that completes when all platform jobs complete.
44

5-
# The name of the "join" job for all source-build platforms. If set to empty string, the job is
6-
# not included. Existing repo pipelines can use this job depend on all source-build jobs
7-
# completing without maintaining a separate list of every single job ID: just depend on this one
8-
# server job. By default, not included. Recommended name if used: 'Source_Build_Complete'.
9-
allCompletedJobId: ''
10-
115
# See /eng/common/core-templates/job/source-build.yml
126
jobNamePrefix: 'Source_Build'
137

@@ -31,16 +25,6 @@ parameters:
3125

3226
jobs:
3327

34-
- ${{ if ne(parameters.allCompletedJobId, '') }}:
35-
- job: ${{ parameters.allCompletedJobId }}
36-
displayName: Source-Build Complete
37-
pool: server
38-
dependsOn:
39-
- ${{ each platform in parameters.platforms }}:
40-
- ${{ parameters.jobNamePrefix }}_${{ platform.name }}
41-
- ${{ if eq(length(parameters.platforms), 0) }}:
42-
- ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }}
43-
4428
- ${{ each platform in parameters.platforms }}:
4529
- template: /eng/common/core-templates/job/source-build.yml
4630
parameters:

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
}
2222
},
2323
"msbuild-sdks": {
24-
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25373.106",
25-
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25373.106",
24+
"Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25377.103",
25+
"Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25377.103",
2626
"Microsoft.Build.NoTargets": "3.7.0",
2727
"Microsoft.Build.Traversal": "3.4.0",
2828
"Microsoft.WixToolset.Sdk": "5.0.2-dotnet.2737382"

src/BuiltInTools/AspireService/AspireServerService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private async ValueTask SendNotificationAsync<TNotification>(TNotification notif
170170
var jsonSerialized = JsonSerializer.SerializeToUtf8Bytes(notification, JsonSerializerOptions);
171171
await SendMessageAsync(dcpId, jsonSerialized, cancelationToken);
172172
}
173-
catch (Exception e) when (LogAndPropagate(e))
173+
catch (Exception e) when (e is not OperationCanceledException && LogAndPropagate(e))
174174
{
175175
}
176176

@@ -340,7 +340,7 @@ private async Task HandleStartSessionRequestAsync(HttpContext context)
340340
context.Response.StatusCode = (int)HttpStatusCode.Created;
341341
context.Response.Headers.Location = $"{context.Request.Scheme}://{context.Request.Host}{context.Request.Path}/{sessionId}";
342342
}
343-
catch (Exception e)
343+
catch (Exception e) when (e is not OperationCanceledException)
344344
{
345345
Log($"Failed to start project{(projectPath == null ? "" : $" '{projectPath}'")}: {e}");
346346

@@ -419,7 +419,7 @@ private async ValueTask HandleStopSessionRequestAsync(HttpContext context, strin
419419
var sessionExists = await _aspireServerEvents.StopSessionAsync(context.GetDcpId(), sessionId, _shutdownCancellationTokenSource.Token);
420420
context.Response.StatusCode = (int)(sessionExists ? HttpStatusCode.OK : HttpStatusCode.NoContent);
421421
}
422-
catch (Exception e)
422+
catch (Exception e) when (e is not OperationCanceledException)
423423
{
424424
Log($"[#{sessionId}] Failed to stop: {e}");
425425

src/BuiltInTools/DotNetDeltaApplier/Microsoft.Extensions.DotNetDeltaApplier.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(TargetFramework)' == 'net6.0'">
2626
<FrameworkReference Update="Microsoft.NETCore.App" TargetingPackVersion="6.0.0" />
2727
</ItemGroup>
28+
<ItemGroup>
29+
<Compile Include="..\dotnet-watch\Utilities\ProcessUtilities.cs" Link="ProcessUtilities.cs" />
30+
</ItemGroup>
2831

2932
<ItemGroup>
3033
<InternalsVisibleTo Include="Microsoft.Extensions.DotNetDeltaApplier.Tests" />

src/BuiltInTools/DotNetDeltaApplier/StartupHook.cs

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Diagnostics;
55
using System.IO.Pipes;
66
using Microsoft.DotNet.HotReload;
7+
using Microsoft.DotNet.Watch;
78

89
/// <summary>
910
/// The runtime startup hook looks for top-level type named "StartupHook".
@@ -58,7 +59,7 @@ public static void Initialize()
5859
return;
5960
}
6061

61-
RegisterPosixSignalHandlers();
62+
RegisterSignalHandlers();
6263

6364
var agent = new HotReloadAgent();
6465
try
@@ -79,27 +80,34 @@ public static void Initialize()
7980
}
8081
}
8182

82-
private static void RegisterPosixSignalHandlers()
83+
private static void RegisterSignalHandlers()
8384
{
85+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
86+
{
87+
ProcessUtilities.EnableWindowsCtrlCHandling(Log);
88+
}
89+
else
90+
{
8491
#if NET10_0_OR_GREATER
85-
// Register a handler for SIGTERM to allow graceful shutdown of the application on Unix.
86-
// See https://github.com/dotnet/docs/issues/46226.
92+
// Register a handler for SIGTERM to allow graceful shutdown of the application on Unix.
93+
// See https://github.com/dotnet/docs/issues/46226.
8794

88-
// Note: registered handlers are executed in reverse order of their registration.
89-
// Since the startup hook is executed before any code of the application, it is the first handler registered and thus the last to run.
90-
91-
s_signalRegistration = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
92-
{
93-
Log($"SIGTERM received. Cancel={context.Cancel}");
95+
// Note: registered handlers are executed in reverse order of their registration.
96+
// Since the startup hook is executed before any code of the application, it is the first handler registered and thus the last to run.
9497

95-
if (!context.Cancel)
98+
s_signalRegistration = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
9699
{
97-
Environment.Exit(0);
98-
}
99-
});
100+
Log($"SIGTERM received. Cancel={context.Cancel}");
100101

101-
Log("Posix signal handlers registered.");
102+
if (!context.Cancel)
103+
{
104+
Environment.Exit(0);
105+
}
106+
});
107+
108+
Log("Posix signal handlers registered.");
102109
#endif
110+
}
103111
}
104112

105113
private static async ValueTask InitializeAsync(NamedPipeClientStream pipeClient, HotReloadAgent agent, CancellationToken cancellationToken)

src/BuiltInTools/dotnet-watch/Aspire/AspireServiceFactory.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,7 @@ async Task StartChannelReader(CancellationToken cancellationToken)
157157
await _service.NotifyLogMessageAsync(dcpId, sessionId, isStdErr: line.IsError, data: line.Content, cancellationToken);
158158
}
159159
}
160-
catch (OperationCanceledException)
161-
{
162-
// nop
163-
}
164-
catch (Exception e)
160+
catch (Exception e) when (e is not OperationCanceledException)
165161
{
166162
Reporter.Error($"Unexpected error reading output of session '{sessionId}': {e}");
167163
}

0 commit comments

Comments
 (0)