diff --git a/src/Cli/dotnet/ToolPackage/ToolConfigurationDeserializer.cs b/src/Cli/dotnet/ToolPackage/ToolConfigurationDeserializer.cs index 6f6b0274a4ac..acf397e6b5ed 100644 --- a/src/Cli/dotnet/ToolPackage/ToolConfigurationDeserializer.cs +++ b/src/Cli/dotnet/ToolPackage/ToolConfigurationDeserializer.cs @@ -52,15 +52,24 @@ public static ToolConfiguration Deserialize(string pathToXml) throw new ToolConfigurationException(CommonLocalizableStrings.ToolSettingsMoreThanOneCommand); } - if (dotNetCliTool.Commands[0].Runner != "dotnet") + // if there is no runner, this could be an entirely different _kind_ of tool. + if (string.IsNullOrWhiteSpace(dotNetCliTool.Commands[0].Runner)) { - throw new ToolConfigurationException( - string.Format( - CommonLocalizableStrings.ToolSettingsUnsupportedRunner, - dotNetCliTool.Commands[0].Name, - dotNetCliTool.Commands[0].Runner)); + if (warnings.Count != 0) + { + throw new ToolConfigurationException(warnings[0]); + } } + if (dotNetCliTool.Commands[0].Runner != "dotnet") + { + throw new ToolConfigurationException( + string.Format( + CommonLocalizableStrings.ToolSettingsUnsupportedRunner, + dotNetCliTool.Commands[0].Name, + dotNetCliTool.Commands[0].Runner)); + } + return new ToolConfiguration( dotNetCliTool.Commands[0].Name, dotNetCliTool.Commands[0].EntryPoint, diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs index d79db49d7020..c5a2e230a2af 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs @@ -20,7 +20,7 @@ public CreateNewImageTests(ITestOutputHelper testOutput) _testOutput = testOutput; } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public void CreateNewImage_Baseline() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); @@ -69,7 +69,7 @@ private static ImageConfig GetImageConfigFromTask(CreateNewImage task) { return new(task.GeneratedContainerConfiguration); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public void ParseContainerProperties_EndToEnd() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); @@ -132,7 +132,7 @@ public void ParseContainerProperties_EndToEnd() /// /// Creates a console app that outputs the environment variable added to the image. /// - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public void Tasks_EndToEnd_With_EnvironmentVariable_Validation() { DirectoryInfo newProjectDir = new(GetTestDirectoryName()); @@ -215,7 +215,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation() .And.HaveStdOut("Foo"); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage() { const string RootlessBase ="dotnet/rootlessbase"; diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs index c1e9a19d5a4f..a0f90d4e4aac 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs @@ -17,7 +17,7 @@ public DockerRegistryTests(ITestOutputHelper testOutput) _loggerFactory = new TestLoggerFactory(testOutput); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task GetFromRegistry() { var loggerFactory = new TestLoggerFactory(_testOutput); @@ -37,7 +37,7 @@ public async Task GetFromRegistry() Assert.NotNull(downloadedImage); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task WriteToPrivateBasicRegistry() { ILogger logger = _loggerFactory.CreateLogger(nameof(WriteToPrivateBasicRegistry)); diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs index 9b3a6e25327c..90d188183a78 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/DockerTestsCollection.cs @@ -5,7 +5,9 @@ namespace Microsoft.NET.Build.Containers.IntegrationTests; [CollectionDefinition("Docker tests")] #pragma warning disable CA1711 // Identifiers should not have incorrect suffix -public class DockerTestsCollection : ICollectionFixture +// TODO: skipped due to docker infra instability - need to use new ACR. +// See https://github.com/dotnet/sdk/issues/49300 +public class DockerTestsCollection // : ICollectionFixture #pragma warning restore CA1711 // Identifiers should not have incorrect suffix { // This class has no code, and is never created. Its purpose is simply diff --git a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 8f733366eed8..867c9a88e9cf 100644 --- a/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/src/Tests/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -38,7 +38,7 @@ public void Dispose() _loggerFactory.Dispose(); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task ApiEndToEndWithRegistryPushAndPull() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithRegistryPushAndPull)); @@ -85,7 +85,7 @@ public async Task ApiEndToEndWithRegistryPushAndPull() } } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task ApiEndToEndWithLocalLoad() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithLocalLoad)); @@ -126,7 +126,7 @@ public async Task ApiEndToEndWithLocalLoad() } } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task ApiEndToEndWithArchiveWritingAndLoad() { ILogger logger = _loggerFactory.CreateLogger(nameof(ApiEndToEndWithArchiveWritingAndLoad)); @@ -210,7 +210,7 @@ private string BuildLocalApp([CallerMemberName] string testName = "TestName", st } - [DockerAvailableTheory()] + [DockerAvailableTheory(Skip = "https://github.com/dotnet/sdk/issues/49300")] [InlineData("webapi", false)] [InlineData("webapi", true)] [InlineData("worker", false)] @@ -386,7 +386,7 @@ public async Task EndToEnd_NoAPI_ProjectType(string projectType, bool addPackage privateNuGetAssets.Delete(true); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/49300")] public void EndToEnd_NoAPI_Console() { DirectoryInfo newProjectDir = new DirectoryInfo(Path.Combine(TestSettings.TestArtifactsDirectory, "CreateNewImageTest")); @@ -473,7 +473,7 @@ public void EndToEnd_NoAPI_Console() [DockerSupportsArchInlineData("linux/386", "linux-x86", "/app", Skip = "There's no apphost for linux-x86 so we can't execute self-contained, and there's no .NET runtime base image for linux-x86 so we can't execute framework-dependent.")] [DockerSupportsArchInlineData("windows/amd64", "win-x64", "C:\\app")] [DockerSupportsArchInlineData("linux/amd64", "linux-x64", "/app")] - [DockerAvailableTheory] + [DockerAvailableTheory(Skip = "https://github.com/dotnet/sdk/issues/49300")] public async Task CanPackageForAllSupportedContainerRIDs(string dockerPlatform, string rid, string workingDir) { ILogger logger = _loggerFactory.CreateLogger(nameof(CanPackageForAllSupportedContainerRIDs));