From 6be8fa04fc47a1e152589775757e3d12b643a46f Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Fri, 4 Jun 2021 13:15:51 -0700 Subject: [PATCH 1/6] Update build configuration. --- eng/common/dotnet-install.sh | 2 +- global.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh index d6efeb4..06f56ee 100755 --- a/eng/common/dotnet-install.sh +++ b/eng/common/dotnet-install.sh @@ -52,7 +52,7 @@ done # Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples cpuname=$(uname -m) case $cpuname in - aarch64) + aarch64|arm64) buildarch=arm64 ;; amd64|x86_64) diff --git a/global.json b/global.json index 71f1b11..6be781e 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,12 @@ { "tools": { - "dotnet": "6.0.100-preview.3.21202.5", + "dotnet": "6.0.100-preview.4.21253.7", "runtimes": { "dotnet": [ - "3.1.14" + "6.0.0-preview.4.21253.7" ], "aspnetcore": [ - "3.1.14" + "6.0.0-preview.4.21253.5" ] } }, From bd0968bd1ed3ed3e1d7f200c6ed350520107e9d5 Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Fri, 4 Jun 2021 15:42:55 -0700 Subject: [PATCH 2/6] Update projects/tests to target .NET 6. --- eng/common/tools.ps1 | 2 +- eng/common/tools.sh | 2 +- src/Microsoft.Tye.Core/ApplicationFactory.cs | 3 ++- .../ConfigModel/ConfigApplication.cs | 3 ++- src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj | 2 +- .../Microsoft.Tye.Extensions.csproj | 2 +- .../Microsoft.Tye.Hosting.Diagnostics.csproj | 2 +- src/Microsoft.Tye.Hosting/HttpProxyService.cs | 3 ++- .../Infrastructure/ProxyExtensions.cs | 6 ++++-- .../Infrastructure/ServiceLoggerProvider.cs | 7 +++++-- .../Microsoft.Tye.Hosting.csproj | 2 +- src/Microsoft.Tye.Hosting/ProxyService.cs | 12 ++++++++---- .../TransformProjectsIntoContainers.cs | 4 ++-- src/Microsoft.Tye.Hosting/TyeHost.cs | 3 ++- src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj | 2 +- src/Microsoft.Tye.Proxy/Program.cs | 14 +++++++++----- src/shared/KubectlDetector.cs | 5 +++-- src/tye-diag-agent/tye-diag-agent.csproj | 2 +- src/tye/InitHost.cs | 3 ++- src/tye/tye.csproj | 2 +- test/E2ETest/ApplicationFactoryTests.cs | 6 +++--- test/E2ETest/Microsoft.Tye.E2ETests.csproj | 2 +- test/E2ETest/TyeBuildTests.Dockerfile.cs | 4 ++-- test/E2ETest/TyeRunTests.cs | 2 +- .../Console.Normalization.svc.Name.csproj | 2 +- .../ApplicationA/ApplicationA.csproj | 2 +- .../ApplicationB/ApplicationB.csproj | 2 +- .../ApplicationC-UI/ApplicationC-UI.csproj | 2 +- .../azure-functions/backend/backend.csproj | 2 +- .../azure-functions/frontend/frontend.csproj | 2 +- test/E2ETest/testassets/projects/dapr/dapr.csproj | 2 +- .../projects/dockerfile/frontend/frontend.csproj | 2 +- .../backend/backend-baseimage.csproj | 2 +- .../frontend-backend/backend/backend.csproj | 2 +- .../frontend-backend/frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../projects/health-checks/api/api.csproj | 2 +- .../multi-phase-dockerfile.csproj | 2 +- .../projects/multi-project/backend/backend.csproj | 2 +- .../multi-project/frontend/frontend.csproj | 2 +- .../projects/multi-project/worker/worker.csproj | 2 +- .../multi-targetframeworks.csproj | 2 +- .../tye-with-netcoreapp31.yaml | 2 +- .../projects/multirepo/results/results.csproj | 2 +- .../testassets/projects/multirepo/vote/vote.csproj | 2 +- .../projects/multirepo/worker/worker.csproj | 2 +- .../nginx-ingress/ApplicationA/ApplicationA.csproj | 2 +- .../nginx-ingress/ApplicationB/ApplicationB.csproj | 2 +- .../projects/project-types/app/app.csproj | 2 +- .../class-library/class-library.csproj | 2 +- .../project-types/test-project/test-project.csproj | 2 +- .../single-phase-dockerfile-args.csproj | 2 +- .../single-phase-dockerfile-args.csproj | 2 +- .../single-phase-dockerfile-multi-args.csproj | 2 +- .../single-phase-dockerfile.csproj | 2 +- .../test-project/test-project.csproj | 2 +- .../projects/volume-test/volume-test.csproj | 2 +- .../testassets/projects/web-app/web-app.csproj | 2 +- ...osoft.Tye.Extensions.Configuration.Tests.csproj | 2 +- .../Test.Infrastructure/Test.Infrastructure.csproj | 2 +- test/UnitTests/Microsoft.Tye.UnitTests.csproj | 2 +- 63 files changed, 96 insertions(+), 77 deletions(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 2d8a74f..89c55b1 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -521,7 +521,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' } + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net6.0' } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 5fad184..0af8495 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -306,7 +306,7 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" - _InitializeBuildToolFramework="netcoreapp3.1" + _InitializeBuildToolFramework="net6.0" } # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 diff --git a/src/Microsoft.Tye.Core/ApplicationFactory.cs b/src/Microsoft.Tye.Core/ApplicationFactory.cs index b65b3aa..a8120be 100644 --- a/src/Microsoft.Tye.Core/ApplicationFactory.cs +++ b/src/Microsoft.Tye.Core/ApplicationFactory.cs @@ -164,7 +164,8 @@ public static async Task CreateAsync(OutputContext output, F if (!string.IsNullOrEmpty(configService.Project)) { - var project = new DotnetProjectServiceBuilder(configService.Name!, new FileInfo(configService.ProjectFullPath)); + // TODO: Investigate possible null. + var project = new DotnetProjectServiceBuilder(configService.Name!, new FileInfo(configService.ProjectFullPath!)); service = project; project.Build = configService.Build ?? true; diff --git a/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs b/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs index 7093eaa..1d7c47e 100644 --- a/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs +++ b/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs @@ -142,7 +142,8 @@ public void Validate() foreach (var probe in probes) { context = new ValidationContext(probe.Probe!); - if (!Validator.TryValidateObject(probe.Probe, context, results, validateAllProperties: true)) + // TODO: Investigate possible null. + if (!Validator.TryValidateObject(probe.Probe!, context, results, validateAllProperties: true)) { throw new TyeYamlException( $"Probe '{probe.Name}' in service '{service.Name}' validation failed." + Environment.NewLine + diff --git a/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj b/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj index b35ca1b..8568bcf 100644 --- a/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj +++ b/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 Tye Microsoft.Tye.Core Microsoft.Tye.Core diff --git a/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj b/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj index 0ca4ab5..65d4a59 100644 --- a/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj +++ b/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj b/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj index 3b0db74..d46381f 100644 --- a/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj +++ b/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 Diagnostics collector and exporter for .NET Core applications. Microsoft.Tye.Hosting.Diagnostics Microsoft.Tye.Hosting.Diagnostics diff --git a/src/Microsoft.Tye.Hosting/HttpProxyService.cs b/src/Microsoft.Tye.Hosting/HttpProxyService.cs index cf3b1a0..f659e41 100644 --- a/src/Microsoft.Tye.Hosting/HttpProxyService.cs +++ b/src/Microsoft.Tye.Hosting/HttpProxyService.cs @@ -177,7 +177,8 @@ public async Task StartAsync(Application application) } var uri = new UriBuilder(uris[next].Uri) { - Path = rule.PreservePath ? $"{context.Request.Path}" : (string)context.Request.RouteValues["path"] ?? "/", + // TODO: Investigate possible null. + Path = rule.PreservePath ? $"{context.Request.Path}" : (string)context.Request!.RouteValues["path"]! ?? "/", Query = context.Request.QueryString.Value }; diff --git a/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs b/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs index 36e4082..ce6fac2 100644 --- a/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs +++ b/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs @@ -88,7 +88,8 @@ public static HttpRequestMessage CreateProxyHttpRequest(this HttpContext context // Append request forwarding headers requestMessage.Headers.TryAddWithoutValidation("Via", $"{context.Request.Protocol} Tye"); - requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-For", context.Connection.RemoteIpAddress.ToString()); + // TODO: Investigate possible null. + requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-For", context.Connection!.RemoteIpAddress!.ToString()); requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-Proto", request.Scheme); requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-Host", request.Host.ToUriComponent()); @@ -129,7 +130,8 @@ public static async Task AcceptProxyWebSocketRequest(this HttpContext cont } AppendHeaderValue(client.Options, context.Request.Headers, "Via", context.Request.Protocol); - AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-For", context.Connection.RemoteIpAddress.ToString()); + // TODO: Investigate possible null. + AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-For", context.Connection!.RemoteIpAddress!.ToString()); AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-Proto", context.Request.Scheme); AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-Host", context.Request.Host.ToUriComponent()); diff --git a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs index eac5143..04a1fc2 100644 --- a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs +++ b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs @@ -47,9 +47,12 @@ public bool IsEnabled(LogLevel logLevel) return true; } - public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func? formatter) { - _logs.OnNext($"[{logLevel}]: {formatter(state, exception)}"); + if (formatter != null && exception != null) + { + _logs.OnNext($"[{logLevel}]: {formatter(state, exception)}"); + } if (exception != null) { diff --git a/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj b/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj index c4c1af8..e2c1ac6 100644 --- a/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj +++ b/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj @@ -2,7 +2,7 @@ Library - netcoreapp3.1 + net6.0 Orchestration host APIs. Microsoft.Tye.Hosting Microsoft.Tye.Hosting diff --git a/src/Microsoft.Tye.Hosting/ProxyService.cs b/src/Microsoft.Tye.Hosting/ProxyService.cs index b11d60f..24d6f61 100644 --- a/src/Microsoft.Tye.Hosting/ProxyService.cs +++ b/src/Microsoft.Tye.Hosting/ProxyService.cs @@ -89,7 +89,8 @@ public Task StartAsync(Application application) return; } - using var _ = cts.Token.Register(() => notificationFeature.RequestClose()); + // TODO: Investigate possible null. + using var _ = cts.Token.Register(() => notificationFeature!.RequestClose()); NetworkStream? targetStream = null; @@ -126,11 +127,13 @@ public Task StartAsync(Application application) { _logger.LogDebug("Proxying traffic to {ServiceName} {ExternalPort}:{InternalPort}", service.Description.Name, binding.Port, ports[next]); + // TODO: Investigate possible null. // external -> internal - var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature.ConnectionClosedRequested)); + var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature!.ConnectionClosedRequested)); + // TODO: Investigate possible null. // internal -> external - var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature.ConnectionClosedRequested)); + var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature!.ConnectionClosedRequested)); await Task.WhenAll(reading, writing); } @@ -144,7 +147,8 @@ public Task StartAsync(Application application) } catch (OperationCanceledException ex) { - if (!notificationFeature.ConnectionClosedRequested.IsCancellationRequested) + // TODO: Investigate possible null. + if (!notificationFeature!.ConnectionClosedRequested.IsCancellationRequested) { _logger.LogDebug(0, ex, "Proxy error for service {ServiceName}", service.Description.Name); } diff --git a/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs b/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs index 99225ba..36a01a4 100644 --- a/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs +++ b/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs @@ -87,10 +87,10 @@ private async Task TransformProjectToContainer(Service service, ProjectRunInfo p // This is .NET specific var userSecretStore = GetUserSecretsPathFromSecrets(); - Directory.CreateDirectory(userSecretStore); - if (!string.IsNullOrEmpty(userSecretStore)) { + Directory.CreateDirectory(userSecretStore); + // Map the user secrets on this drive to user secrets dockerRunInfo.VolumeMappings.Add(new DockerVolume(source: userSecretStore, name: null, target: "/root/.microsoft/usersecrets", readOnly: true)); } diff --git a/src/Microsoft.Tye.Hosting/TyeHost.cs b/src/Microsoft.Tye.Hosting/TyeHost.cs index 4690d24..2392601 100644 --- a/src/Microsoft.Tye.Hosting/TyeHost.cs +++ b/src/Microsoft.Tye.Hosting/TyeHost.cs @@ -102,7 +102,8 @@ public async Task StartAsync() await app.StartAsync(); - _addresses = DashboardWebApplication.Services.GetRequiredService().Features.Get().Addresses; + // TODO: Investigate possible null. + _addresses = DashboardWebApplication.Services.GetRequiredService().Features.Get()!.Addresses; _logger.LogInformation("Dashboard running on {Address}", _addresses.First()); diff --git a/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj b/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj index 6a001f9..47d8f1a 100644 --- a/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj +++ b/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 diff --git a/src/Microsoft.Tye.Proxy/Program.cs b/src/Microsoft.Tye.Proxy/Program.cs index fb5e2ce..53ac563 100644 --- a/src/Microsoft.Tye.Proxy/Program.cs +++ b/src/Microsoft.Tye.Proxy/Program.cs @@ -64,7 +64,8 @@ static async Task Main(string[] args) logger.LogDebug("Attempting to connect to {ServiceName} listening on {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); - await target.ConnectAsync(containerHost, mapping.ExternalPort); + // TODO: Investigate null host. + await target.ConnectAsync(containerHost!, mapping.ExternalPort); logger.LogDebug("Successfully connected to {ServiceName} listening on {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); @@ -87,11 +88,13 @@ static async Task Main(string[] args) { logger.LogDebug("Proxying traffic to {ServiceName} {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); - // external -> internal - var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature.ConnectionClosedRequested)); + // TODO: Investigate possible null. + // external -> internal + var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature!.ConnectionClosedRequested)); + // TODO: Investigate possible null. // internal -> external - var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature.ConnectionClosedRequested)); + var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature!.ConnectionClosedRequested)); await Task.WhenAll(reading, writing); } @@ -105,7 +108,8 @@ static async Task Main(string[] args) } catch (OperationCanceledException ex) { - if (!notificationFeature.ConnectionClosedRequested.IsCancellationRequested) + // TODO: Investigate possible null. + if (!notificationFeature!.ConnectionClosedRequested.IsCancellationRequested) { logger.LogDebug(0, ex, "Proxy error for service {ServiceName}", serviceName); } diff --git a/src/shared/KubectlDetector.cs b/src/shared/KubectlDetector.cs index 1cd0ca7..2bef51f 100644 --- a/src/shared/KubectlDetector.cs +++ b/src/shared/KubectlDetector.cs @@ -47,8 +47,9 @@ public static Task IsKubectlConnectedToClusterAsync(OutputContext output) { continue; } - var major = int.Parse(element.Value.GetProperty("major").GetString()); - var minor = int.Parse(element.Value.GetProperty("minor").GetString().Trim('+')); + // TODO: Investigate possible null. + var major = int.Parse(element.Value!.GetProperty("major")!.GetString()!); + var minor = int.Parse(element.Value!.GetProperty("minor")!.GetString()!.Trim('+')); var version = new Version(major, minor); return version; } diff --git a/src/tye-diag-agent/tye-diag-agent.csproj b/src/tye-diag-agent/tye-diag-agent.csproj index 6278740..b630c6c 100644 --- a/src/tye-diag-agent/tye-diag-agent.csproj +++ b/src/tye-diag-agent/tye-diag-agent.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye diff --git a/src/tye/InitHost.cs b/src/tye/InitHost.cs index e0daeb3..56119fb 100644 --- a/src/tye/InitHost.cs +++ b/src/tye/InitHost.cs @@ -37,7 +37,8 @@ public static (string, string) CreateTyeFileContent(FileInfo? path, bool force) throw new CommandException(errorMessage!); } - path = new FileInfo(filePath); + // TODO: Investigate possible null. + path = new FileInfo(filePath!); } var template = @" diff --git a/src/tye/tye.csproj b/src/tye/tye.csproj index cbafea8..fbc3ad9 100644 --- a/src/tye/tye.csproj +++ b/src/tye/tye.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 Microsoft.Tye tye Microsoft.Tye diff --git a/test/E2ETest/ApplicationFactoryTests.cs b/test/E2ETest/ApplicationFactoryTests.cs index 3646d25..40f900e 100644 --- a/test/E2ETest/ApplicationFactoryTests.cs +++ b/test/E2ETest/ApplicationFactoryTests.cs @@ -135,14 +135,14 @@ public async Task TargetFrameworkFromCliArgs() // Debug targets can be null if not specified, so make sure calling host.Start does not throw. var outputContext = new OutputContext(_sink, Verbosity.Debug); var projectFile = new FileInfo(yamlFile); - var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); Assert.Single(applicationBuilder.Services); var service = applicationBuilder.Services.Single(s => s.Name == "multi-targetframeworks"); var containsTargetFramework = ((DotnetProjectServiceBuilder)service).BuildProperties.TryGetValue("TargetFramework", out var targetFramework); Assert.True(containsTargetFramework); - Assert.Equal("netcoreapp3.1", targetFramework); + Assert.Equal("net6.0", targetFramework); } [Fact] @@ -154,7 +154,7 @@ public async Task TargetFrameworkFromCliArgsDoesNotOverwriteYaml() // Debug targets can be null if not specified, so make sure calling host.Start does not throw. var outputContext = new OutputContext(_sink, Verbosity.Debug); var projectFile = new FileInfo(yamlFile); - var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); Assert.Single(applicationBuilder.Services); var service = applicationBuilder.Services.Single(s => s.Name == "multi-targetframeworks"); diff --git a/test/E2ETest/Microsoft.Tye.E2ETests.csproj b/test/E2ETest/Microsoft.Tye.E2ETests.csproj index 71705c1..668ec7a 100644 --- a/test/E2ETest/Microsoft.Tye.E2ETests.csproj +++ b/test/E2ETest/Microsoft.Tye.E2ETests.csproj @@ -2,7 +2,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye.E2ETest true true diff --git a/test/E2ETest/TyeBuildTests.Dockerfile.cs b/test/E2ETest/TyeBuildTests.Dockerfile.cs index d81c94c..10cffd9 100644 --- a/test/E2ETest/TyeBuildTests.Dockerfile.cs +++ b/test/E2ETest/TyeBuildTests.Dockerfile.cs @@ -226,7 +226,7 @@ public async Task TyeBuild_MultipleTargetFrameworks_CliArgs() var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-no-buildproperties.yaml")); var outputContext = new OutputContext(sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); application.Registry = new ContainerRegistry("test"); @@ -260,7 +260,7 @@ public async Task TyeBuild_MultipleTargetFrameworks_YamlBuildProperties() var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-with-netcoreapp31.yaml")); var outputContext = new OutputContext(sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); application.Registry = new ContainerRegistry("test"); diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 95193fb..ac9ae81 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -1040,7 +1040,7 @@ public async Task RunWithArgsMultipleTargetFrameworksTest() var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-no-buildproperties.yaml")); var outputContext = new OutputContext(_sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); var handler = new HttpClientHandler { diff --git a/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj b/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj index c73e0d1..41f1d5a 100644 --- a/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj +++ b/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj index 4f703f2..8516359 100644 --- a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1 + net6.0 v3 diff --git a/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj b/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj index 0aa4abc..614c817 100644 --- a/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/dapr/dapr.csproj b/test/E2ETest/testassets/projects/dapr/dapr.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/dapr/dapr.csproj +++ b/test/E2ETest/testassets/projects/dapr/dapr.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj b/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj index 0aa4abc..614c817 100644 --- a/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj b/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj index c99f0de..97be2d5 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj b/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj index 4e98f5a..887a450 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj b/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj index 0aa4abc..614c817 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/health-checks/api/api.csproj b/test/E2ETest/testassets/projects/health-checks/api/api.csproj index d12c450..7ebfd2b 100644 --- a/test/E2ETest/testassets/projects/health-checks/api/api.csproj +++ b/test/E2ETest/testassets/projects/health-checks/api/api.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj b/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj index a08de39..de81afb 100644 --- a/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj +++ b/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 multi_phase_dockerfile diff --git a/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj b/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj index 9559649..079d8fa 100644 --- a/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj b/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj index 82e8a2c..6c3aac9 100644 --- a/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj b/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj index bc8e461..85476ad 100644 --- a/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj +++ b/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 dotnet-worker-E4419EA1-F496-4FE1-A024-7E75E40B9E10 Worker diff --git a/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj b/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj index 55ff0ba..d8c694b 100644 --- a/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj +++ b/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;netcoreapp2.1 + net6.0;netcoreapp2.1 MultiTargetFrameworks diff --git a/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml b/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml index 2aedef8..71daa32 100644 --- a/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml +++ b/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml @@ -6,4 +6,4 @@ services: project: multi-targetframeworks/multi-targetframeworks.csproj buildProperties: - name: TargetFramework - value: netcoreapp3.1 + value: net6.0 diff --git a/test/E2ETest/testassets/projects/multirepo/results/results.csproj b/test/E2ETest/testassets/projects/multirepo/results/results.csproj index 679a08e..5a4165f 100644 --- a/test/E2ETest/testassets/projects/multirepo/results/results.csproj +++ b/test/E2ETest/testassets/projects/multirepo/results/results.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Results diff --git a/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj b/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj index ed4c23a..11a46df 100644 --- a/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj +++ b/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Vote diff --git a/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj b/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj index fe7d9b4..e6ccfe0 100644 --- a/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj +++ b/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 dotnet-worker-A47A7C4B-4BF2-4243-9BBE-E6B3CB3E9C6F Worker diff --git a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj +++ b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj +++ b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/project-types/app/app.csproj b/test/E2ETest/testassets/projects/project-types/app/app.csproj index 92605c5..e948168 100644 --- a/test/E2ETest/testassets/projects/project-types/app/app.csproj +++ b/test/E2ETest/testassets/projects/project-types/app/app.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj b/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj index 1ed8b4e..2084800 100644 --- a/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj +++ b/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 class_library diff --git a/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj b/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj index 72961ab..9c5c6b3 100644 --- a/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj +++ b/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 test_project false diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj index ffa9658..ec070fc 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj index ffa9658..ec070fc 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj index ffa9658..ec070fc 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj index 6c326b1..eb60158 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile diff --git a/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj b/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj index 86df20c..4d2984a 100644 --- a/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj +++ b/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 test_project diff --git a/test/E2ETest/testassets/projects/volume-test/volume-test.csproj b/test/E2ETest/testassets/projects/volume-test/volume-test.csproj index 50570be..5d1a393 100644 --- a/test/E2ETest/testassets/projects/volume-test/volume-test.csproj +++ b/test/E2ETest/testassets/projects/volume-test/volume-test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 volume_test diff --git a/test/E2ETest/testassets/projects/web-app/web-app.csproj b/test/E2ETest/testassets/projects/web-app/web-app.csproj index d6bda1c..26d2360 100644 --- a/test/E2ETest/testassets/projects/web-app/web-app.csproj +++ b/test/E2ETest/testassets/projects/web-app/web-app.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 web_app diff --git a/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj b/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj index dffc8b0..62b5242 100644 --- a/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj +++ b/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 true diff --git a/test/Test.Infrastructure/Test.Infrastructure.csproj b/test/Test.Infrastructure/Test.Infrastructure.csproj index 8cc2cfb..bf67871 100644 --- a/test/Test.Infrastructure/Test.Infrastructure.csproj +++ b/test/Test.Infrastructure/Test.Infrastructure.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 false XUnit disable diff --git a/test/UnitTests/Microsoft.Tye.UnitTests.csproj b/test/UnitTests/Microsoft.Tye.UnitTests.csproj index c526b11..d2addfe 100644 --- a/test/UnitTests/Microsoft.Tye.UnitTests.csproj +++ b/test/UnitTests/Microsoft.Tye.UnitTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye.UnitTests true true From 50f4328fbed6f0996cf3eb614eef89557442adaa Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Tue, 22 Jun 2021 13:49:12 -0700 Subject: [PATCH 3/6] Update to .NET 6 Preview 5. --- global.json | 6 +++--- src/Microsoft.Tye.Hosting/DockerRunner.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global.json b/global.json index c93475f..cd43cf8 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,12 @@ { "tools": { - "dotnet": "6.0.100-preview.4.21253.7", + "dotnet": "6.0.100-preview.5.21302.13", "runtimes": { "dotnet": [ - "6.0.0-preview.4.21253.7" + "6.0.0-preview.5.21301.5" ], "aspnetcore": [ - "6.0.0-preview.4.21253.5" + "6.0.0-preview.5.21301.17" ] } }, diff --git a/src/Microsoft.Tye.Hosting/DockerRunner.cs b/src/Microsoft.Tye.Hosting/DockerRunner.cs index 4a23528..8a575c4 100644 --- a/src/Microsoft.Tye.Hosting/DockerRunner.cs +++ b/src/Microsoft.Tye.Hosting/DockerRunner.cs @@ -62,7 +62,7 @@ service.Description.RunInfo is IngressRunInfo || // Inject a proxy per non-container service. This allows the container to use normal host names within the // container network to talk to services on the host - var proxyContainer = new DockerRunInfo($"mcr.microsoft.com/dotnet/core/sdk:3.1", "dotnet Microsoft.Tye.Proxy.dll") + var proxyContainer = new DockerRunInfo($"mcr.microsoft.com/dotnet/sdk:6.0", "dotnet Microsoft.Tye.Proxy.dll") { WorkingDirectory = "/app", NetworkAlias = service.Description.Name, From c774c2bfeb7908841ab0a431c9d0a04407923f95 Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Wed, 14 Jul 2021 10:47:38 -0700 Subject: [PATCH 4/6] Updates for .NET 6 Preview 6. --- global.json | 6 +++--- .../Infrastructure/ServiceLoggerProvider.cs | 11 +++++++++-- src/Microsoft.Tye.Hosting/TyeHost.cs | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index ba6539d..3ea7289 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,12 @@ { "tools": { - "dotnet": "6.0.100-preview.5.21302.13", + "dotnet": "6.0.100-preview.6.21355.2", "runtimes": { "dotnet": [ - "6.0.0-preview.5.21301.5" + "6.0.0-preview.6.21352.12" ], "aspnetcore": [ - "6.0.0-preview.5.21301.17" + "6.0.0-preview.6.21355.2" ] } }, diff --git a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs index 04a1fc2..5885ba8 100644 --- a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs +++ b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs @@ -37,9 +37,9 @@ public ServiceLogger(string categoryName, Subject logs) _logs = logs; } - public IDisposable? BeginScope(TState state) + public IDisposable BeginScope(TState state) { - return null; + return new NoOpScope(); } public bool IsEnabled(LogLevel logLevel) @@ -59,6 +59,13 @@ public void Log(LogLevel logLevel, EventId eventId, TState state, Except _logs.OnNext(exception.ToString()); } } + + private sealed class NoOpScope : IDisposable + { + public void Dispose() + { + } + } } } } diff --git a/src/Microsoft.Tye.Hosting/TyeHost.cs b/src/Microsoft.Tye.Hosting/TyeHost.cs index 2392601..8e6d3b2 100644 --- a/src/Microsoft.Tye.Hosting/TyeHost.cs +++ b/src/Microsoft.Tye.Hosting/TyeHost.cs @@ -333,7 +333,7 @@ private async Task StopAsync() } catch (Exception ex) { - _logger.LogError(ex, "Error while shutting down"); + _logger?.LogError(ex, "Error while shutting down"); } finally { @@ -375,7 +375,7 @@ private void OpenDashboard(string url) } catch (Exception ex) { - _logger.LogError(ex, "Error launching dashboard."); + _logger?.LogError(ex, "Error launching dashboard."); } } From 21aac2b6e78d034b1da44f32af28d94ef4388ada Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Mon, 16 Aug 2021 10:39:50 -0700 Subject: [PATCH 5/6] Update to .NET 6 Preview 7. --- Directory.Build.props | 2 +- global.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 4229b0c..1a214e1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,7 +16,7 @@ $(NoWarn);8002 enable - 8.0 + 10.0 diff --git a/global.json b/global.json index 3b7d62f..ad3d1e9 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,12 @@ { "tools": { - "dotnet": "6.0.100-preview.6.21355.2", + "dotnet": "6.0.100-preview.7.21379.14", "runtimes": { "dotnet": [ - "6.0.0-preview.6.21352.12" + "6.0.0-preview.7.21377.19" ], "aspnetcore": [ - "6.0.0-preview.6.21355.2" + "6.0.0-preview.7.21378.6" ] } }, From 6b3662f997d4fb012763a7c6e01ff7c313c1da54 Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Thu, 14 Oct 2021 09:15:24 -0700 Subject: [PATCH 6/6] Update to 6.0 RC2. --- global.json | 6 +++--- test/E2ETest/TyeRunTests.cs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/global.json b/global.json index ad3d1e9..4e75a1d 100644 --- a/global.json +++ b/global.json @@ -1,12 +1,12 @@ { "tools": { - "dotnet": "6.0.100-preview.7.21379.14", + "dotnet": "6.0.100-rc.2.21505.57", "runtimes": { "dotnet": [ - "6.0.0-preview.7.21377.19" + "6.0.0-rc.2.21480.5" ], "aspnetcore": [ - "6.0.0-preview.7.21378.6" + "6.0.0-rc.2.21480.10" ] } }, diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 4c4e853..5e7025b 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -799,7 +799,8 @@ public async Task IngressAllIPv4Test() [Fact] public async Task IngressAllIPTest() { - await TestIngressIP($"'*'", GetLiveIPAddresses().FirstOrDefault()); + // TODO: Possible null reference (the default case). + await TestIngressIP($"'*'", GetLiveIPAddresses().FirstOrDefault()!); }