From a348dad39a8ff19505af88aefd2e42f89f99123e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Sat, 24 Jul 2021 12:40:23 +0000 Subject: [PATCH 01/12] Update dependencies from https://github.com/dotnet/arcade build 20210723.11 (#1131) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- eng/common/templates/steps/source-build.yml | 6 ++++++ global.json | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 47caa67d..6ac02c54 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,25 @@ - + https://github.com/dotnet/arcade - 89806f0b9e93ad2bbe32c654412835c0801a2032 + c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 - + https://github.com/dotnet/arcade - 89806f0b9e93ad2bbe32c654412835c0801a2032 + c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 - + https://github.com/dotnet/arcade - 89806f0b9e93ad2bbe32c654412835c0801a2032 + c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 - + https://github.com/dotnet/arcade - 89806f0b9e93ad2bbe32c654412835c0801a2032 + c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 - + https://github.com/dotnet/arcade - 89806f0b9e93ad2bbe32c654412835c0801a2032 + c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 https://github.com/dotnet/arcade-services diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml index e20637ed..705b7a1c 100644 --- a/eng/common/templates/steps/source-build.yml +++ b/eng/common/templates/steps/source-build.yml @@ -29,6 +29,11 @@ steps: officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' fi + internalRuntimeDownloadArgs= + if [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then + internalRuntimeDownloadArgs='--runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)' + fi + targetRidArgs= if [ '${{ parameters.platform.targetRID }}' != '' ]; then targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' @@ -43,6 +48,7 @@ steps: --configuration $buildConfig \ --restore --build --pack $publishArgs -bl \ $officialBuildArgs \ + $internalRuntimeDownloadArgs \ $targetRidArgs \ /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ /p:ArcadeBuildFromSource=true diff --git a/global.json b/global.json index d0ec8d57..7d45c51f 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "6.0.100-preview.4.21255.9", + "dotnet": "6.0.100-preview.6.21355.2", "runtimes": { "dotnet": [ "3.1.14" @@ -11,6 +11,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21370.12" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21373.11" } } From cc9367a966455b19333b3553bbc1778200017252 Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Mon, 26 Jul 2021 15:10:27 -0700 Subject: [PATCH 02/12] Add timeout for Process.WaitForExit() --- src/Microsoft.Tye.Core/ProcessUtil.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Tye.Core/ProcessUtil.cs b/src/Microsoft.Tye.Core/ProcessUtil.cs index a2d65090..01270a45 100644 --- a/src/Microsoft.Tye.Core/ProcessUtil.cs +++ b/src/Microsoft.Tye.Core/ProcessUtil.cs @@ -23,6 +23,8 @@ namespace Microsoft.Tye private static readonly bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + private const int ProcessExitTimeoutMs = 60 * 1000; // 1 minute timeout for the process to exit. + public static Task ExecuteAsync( string command, string args, @@ -118,7 +120,12 @@ namespace Microsoft.Tye { // Even though the Exited event has been raised, WaitForExit() must still be called to ensure the output buffers // have been flushed before the process is considered completely done. - process.WaitForExit(); + // Because of the bug in the dotnet runtime https://github.com/dotnet/runtime/issues/29232, Process.WaitForExit() + // hangs for processes that spawn another long-running processes. + // Since these are expected to be long running processes and we're typically not concerned with capturing all of its output + // i.e. it's probably ok for some output to be lost on shutdown, since Tye is shutting down anyway, + // we call Process.WaitForProcessExit(ProcessExitTimeoutMs). + process.WaitForExit(ProcessExitTimeoutMs); } if (throwOnError && process.ExitCode != 0) From 074670ae8261563942e57be6a8f3be6d6129c1a7 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 27 Jul 2021 12:36:12 +0000 Subject: [PATCH 03/12] Update dependencies from https://github.com/dotnet/arcade build 20210726.4 (#1133) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- global.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6ac02c54..f1127490 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,25 @@ - + https://github.com/dotnet/arcade - c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 + e6abc186425e675e0f201acc1c33e183a0e51c86 - + https://github.com/dotnet/arcade - c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 + e6abc186425e675e0f201acc1c33e183a0e51c86 - + https://github.com/dotnet/arcade - c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 + e6abc186425e675e0f201acc1c33e183a0e51c86 - + https://github.com/dotnet/arcade - c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 + e6abc186425e675e0f201acc1c33e183a0e51c86 - + https://github.com/dotnet/arcade - c6a28c81f96d196338b3ea520bc1e6dc7c440ee2 + e6abc186425e675e0f201acc1c33e183a0e51c86 https://github.com/dotnet/arcade-services diff --git a/global.json b/global.json index 7d45c51f..1254fe03 100644 --- a/global.json +++ b/global.json @@ -11,6 +11,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21373.11" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21376.4" } } From 227906b7b88c1025824b9845e6d536ff8655cf1a Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Tue, 27 Jul 2021 09:36:57 -0700 Subject: [PATCH 04/12] Reduce timeout and fix broken test --- src/Microsoft.Tye.Core/ProcessUtil.cs | 2 +- test/E2ETest/ReplicaStoppingTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Tye.Core/ProcessUtil.cs b/src/Microsoft.Tye.Core/ProcessUtil.cs index 01270a45..d0c8ad1b 100644 --- a/src/Microsoft.Tye.Core/ProcessUtil.cs +++ b/src/Microsoft.Tye.Core/ProcessUtil.cs @@ -23,7 +23,7 @@ namespace Microsoft.Tye private static readonly bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - private const int ProcessExitTimeoutMs = 60 * 1000; // 1 minute timeout for the process to exit. + private const int ProcessExitTimeoutMs = 30 * 1000; // 30 seconds timeout for the process to exit. public static Task ExecuteAsync( string command, diff --git a/test/E2ETest/ReplicaStoppingTests.cs b/test/E2ETest/ReplicaStoppingTests.cs index 6ba8aa4e..91275181 100644 --- a/test/E2ETest/ReplicaStoppingTests.cs +++ b/test/E2ETest/ReplicaStoppingTests.cs @@ -61,7 +61,7 @@ namespace E2ETest var replicasToRestart = new[] { replicaToStop.Key }; var restOfReplicas = host.Application.Services.SelectMany(s => s.Value.Replicas).Select(r => r.Value.Name).Where(r => r != replicaToStop.Key).ToArray(); - Assert.True(await DoOperationAndWaitForReplicasToRestart(host, replicasToRestart.ToHashSet(), restOfReplicas.ToHashSet(), TimeSpan.FromSeconds(1), _ => + Assert.True(await DoOperationAndWaitForReplicasToRestart(host, replicasToRestart.ToHashSet(), restOfReplicas.ToHashSet(), TimeSpan.FromSeconds(30), _ => { replicaToStop.Value.StoppingTokenSource!.Cancel(); return Task.CompletedTask; From 79dd9690d11313793b0f8071c8c7a8eddf52b51b Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Tue, 27 Jul 2021 15:58:11 -0700 Subject: [PATCH 05/12] Add supporting comments --- src/Microsoft.Tye.Core/ProcessUtil.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.Tye.Core/ProcessUtil.cs b/src/Microsoft.Tye.Core/ProcessUtil.cs index d0c8ad1b..c89c4943 100644 --- a/src/Microsoft.Tye.Core/ProcessUtil.cs +++ b/src/Microsoft.Tye.Core/ProcessUtil.cs @@ -125,6 +125,7 @@ namespace Microsoft.Tye // Since these are expected to be long running processes and we're typically not concerned with capturing all of its output // i.e. it's probably ok for some output to be lost on shutdown, since Tye is shutting down anyway, // we call Process.WaitForProcessExit(ProcessExitTimeoutMs). + // Also, since this is a process.Exited event, process.ExitCode is valid even if WaitForExit() times out. process.WaitForExit(ProcessExitTimeoutMs); } @@ -134,6 +135,7 @@ namespace Microsoft.Tye } else { + // Since the process has exited, no additional data will be written to either output buffer or error buffer, it's thread-safe to call ToString() on both outputBuilder and errorBuilder. processLifetimeTask.TrySetResult(new ProcessResult(outputBuilder.ToString(), errorBuilder.ToString(), process.ExitCode)); } }; From 45c039a1acc152a1041ffba617c847c327afeffa Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 28 Jul 2021 12:36:12 +0000 Subject: [PATCH 06/12] Update dependencies from https://github.com/dotnet/arcade build 20210727.2 (#1134) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- global.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f1127490..5ad0c06c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,25 @@ - + https://github.com/dotnet/arcade - e6abc186425e675e0f201acc1c33e183a0e51c86 + cab4a3c50fd042677ea17cfc5171b4ce8b29930f - + https://github.com/dotnet/arcade - e6abc186425e675e0f201acc1c33e183a0e51c86 + cab4a3c50fd042677ea17cfc5171b4ce8b29930f - + https://github.com/dotnet/arcade - e6abc186425e675e0f201acc1c33e183a0e51c86 + cab4a3c50fd042677ea17cfc5171b4ce8b29930f - + https://github.com/dotnet/arcade - e6abc186425e675e0f201acc1c33e183a0e51c86 + cab4a3c50fd042677ea17cfc5171b4ce8b29930f - + https://github.com/dotnet/arcade - e6abc186425e675e0f201acc1c33e183a0e51c86 + cab4a3c50fd042677ea17cfc5171b4ce8b29930f https://github.com/dotnet/arcade-services diff --git a/global.json b/global.json index 1254fe03..5f757006 100644 --- a/global.json +++ b/global.json @@ -11,6 +11,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21376.4" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21377.2" } } From 099494bda6d8d9a6626de528702ce10b116c983f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Thu, 29 Jul 2021 12:37:00 +0000 Subject: [PATCH 07/12] Update dependencies from https://github.com/dotnet/arcade build 20210728.2 (#1135) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- eng/common/internal/Tools.csproj | 2 +- global.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 5ad0c06c..3f559af3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,25 @@ - + https://github.com/dotnet/arcade - cab4a3c50fd042677ea17cfc5171b4ce8b29930f + dd3652e2ae5ea89703a2286295de9efe908974f1 - + https://github.com/dotnet/arcade - cab4a3c50fd042677ea17cfc5171b4ce8b29930f + dd3652e2ae5ea89703a2286295de9efe908974f1 - + https://github.com/dotnet/arcade - cab4a3c50fd042677ea17cfc5171b4ce8b29930f + dd3652e2ae5ea89703a2286295de9efe908974f1 - + https://github.com/dotnet/arcade - cab4a3c50fd042677ea17cfc5171b4ce8b29930f + dd3652e2ae5ea89703a2286295de9efe908974f1 - + https://github.com/dotnet/arcade - cab4a3c50fd042677ea17cfc5171b4ce8b29930f + dd3652e2ae5ea89703a2286295de9efe908974f1 https://github.com/dotnet/arcade-services diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index f46d5efe..2067b8df 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -1,5 +1,5 @@ + - net472 diff --git a/global.json b/global.json index 5f757006..90c2796a 100644 --- a/global.json +++ b/global.json @@ -11,6 +11,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21377.2" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21378.2" } } From 836b0baa8a0ed5d8ca3bebc27c7d4f6d0a7bdfd9 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 30 Jul 2021 12:36:07 +0000 Subject: [PATCH 08/12] Update dependencies from https://github.com/dotnet/arcade build 20210729.2 (#1137) [main] Update dependencies from dotnet/arcade --- eng/Version.Details.xml | 20 ++++++++++---------- global.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3f559af3..ea3a21c8 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,25 +3,25 @@ - + https://github.com/dotnet/arcade - dd3652e2ae5ea89703a2286295de9efe908974f1 + 62a8aafffd4c68ef887680f6837abdff906a662c - + https://github.com/dotnet/arcade - dd3652e2ae5ea89703a2286295de9efe908974f1 + 62a8aafffd4c68ef887680f6837abdff906a662c - + https://github.com/dotnet/arcade - dd3652e2ae5ea89703a2286295de9efe908974f1 + 62a8aafffd4c68ef887680f6837abdff906a662c - + https://github.com/dotnet/arcade - dd3652e2ae5ea89703a2286295de9efe908974f1 + 62a8aafffd4c68ef887680f6837abdff906a662c - + https://github.com/dotnet/arcade - dd3652e2ae5ea89703a2286295de9efe908974f1 + 62a8aafffd4c68ef887680f6837abdff906a662c https://github.com/dotnet/arcade-services diff --git a/global.json b/global.json index 90c2796a..8080c289 100644 --- a/global.json +++ b/global.json @@ -11,6 +11,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21378.2" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21379.2" } } From b315fffd513b402b360d076099a48985d1eacfb4 Mon Sep 17 00:00:00 2001 From: Brandon Foss Date: Fri, 6 Aug 2021 15:37:28 -0700 Subject: [PATCH 09/12] Improves error code log message in watch mode --- src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs index b3e89dfe..fe6f1049 100644 --- a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs +++ b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Watcher { // Only show this error message if the process exited non-zero due to a normal process exit. // Don't show this if dotnet-watch killed the inner process due to file change or CTRL+C by the user - _logger.LogError($"watch: Exited with error code {processTask.Result}"); + _logger.LogError($"watch: Exited with exit code {processTask.Result.ExitCode}"); } else { @@ -109,7 +109,7 @@ namespace Microsoft.DotNet.Watcher if (exitCode == 0) { break; - // Build failed, keep retrying builds until successful build. + // Build failed, keep retrying builds until successful build. } await fileSetWatcher.GetChangedFileAsync(cancellationToken, () => _logger.LogWarning("Waiting for a file to change before restarting dotnet...")); From 002e71ed1ea082fa8f779ed0a48ef8bd42445748 Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Mon, 9 Aug 2021 11:01:18 -0700 Subject: [PATCH 10/12] 0.9.0 release --- docs/getting_started.md | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index cfa052c5..3214c5d3 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -8,13 +8,13 @@ Tye is a tool that makes developing, testing, and deploying microservices and di 1. Install tye via the following command: ```text - dotnet tool install -g Microsoft.Tye --version "0.8.0-alpha.21352.1" + dotnet tool install -g Microsoft.Tye --version "0.9.0-alpha.21380.1" ``` OR if you already have Tye installed and want to update: ```text - dotnet tool update -g Microsoft.Tye --version "0.8.0-alpha.21352.1" + dotnet tool update -g Microsoft.Tye --version "0.9.0-alpha.21380.1" ``` > If using Mac and, if getting "command not found" errors when running `tye`, you may need to ensure that the `$HOME/.dotnet/tools` directory has been added to `PATH`. @@ -37,13 +37,13 @@ Tye is a tool that makes developing, testing, and deploying microservices and di This will install the newest available build from our CI. ```txt -dotnet tool install -g Microsoft.Tye --version "0.9.0-*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json +dotnet tool install -g Microsoft.Tye --version "0.10.0-*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json ``` If you already have a build installed and you want to update, replace `install` with `update`: ```txt -dotnet tool update -g Microsoft.Tye --version "0.9.0-*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json +dotnet tool update -g Microsoft.Tye --version "0.10.0-*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json ``` > :bulb: Note that the version numbers for our CI builds and released packages will usually be different. diff --git a/eng/Versions.props b/eng/Versions.props index ad871e73..6c452d63 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 0.9.0 + 0.10.0 alpha false From 497d98c75cf670cddba55590caad63ecdcdb6182 Mon Sep 17 00:00:00 2001 From: Brandon Foss Date: Mon, 9 Aug 2021 14:29:17 -0700 Subject: [PATCH 11/12] Updates logging format to include more information. --- src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs index fe6f1049..4cc8bcb4 100644 --- a/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs +++ b/src/Microsoft.Tye.Hosting/Watch/DotNetWatcher.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Watcher { // Only show this error message if the process exited non-zero due to a normal process exit. // Don't show this if dotnet-watch killed the inner process due to file change or CTRL+C by the user - _logger.LogError($"watch: Exited with exit code {processTask.Result.ExitCode}"); + _logger.LogError("watch: {Replica} process exited with exit code {ExitCode}", replica, processTask.Result.ExitCode); } else { From 562bad1f698386fd44d7f60872d833d801a8dd47 Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Wed, 11 Aug 2021 11:54:52 -0700 Subject: [PATCH 12/12] Emit Pid after Tye application is started --- src/Microsoft.Tye.Hosting/TyeHost.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.Tye.Hosting/TyeHost.cs b/src/Microsoft.Tye.Hosting/TyeHost.cs index 4690d24f..3a51bee7 100644 --- a/src/Microsoft.Tye.Hosting/TyeHost.cs +++ b/src/Microsoft.Tye.Hosting/TyeHost.cs @@ -109,6 +109,7 @@ namespace Microsoft.Tye.Hosting try { await _processor.StartAsync(_application); + _logger.LogInformation($"Application {_application.Name} started successfully with Pid: {Process.GetCurrentProcess().Id}"); } catch (TyeBuildException ex) {