From c19b4ff2c86d80842a53d95c8f79be4380252380 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 19 Nov 2024 16:15:46 +0100 Subject: [PATCH 01/14] upgraded logging for #595 log url when connection is closed --- .../ContainerBuilder.cs | 5 +++++ ...UnableToDownloadFromRepositoryException.cs | 12 ++++++++++++ .../Registry/Registry.cs | 19 +++++++++++++------ .../Resources/Strings.Designer.cs | 11 +++++++++++ .../Resources/Strings.resx | 4 ++++ .../Resources/xlf/Strings.cs.xlf | 5 +++++ .../Resources/xlf/Strings.de.xlf | 5 +++++ .../Resources/xlf/Strings.es.xlf | 5 +++++ .../Resources/xlf/Strings.fr.xlf | 5 +++++ .../Resources/xlf/Strings.it.xlf | 5 +++++ .../Resources/xlf/Strings.ja.xlf | 5 +++++ .../Resources/xlf/Strings.ko.xlf | 5 +++++ .../Resources/xlf/Strings.pl.xlf | 5 +++++ .../Resources/xlf/Strings.pt-BR.xlf | 5 +++++ .../Resources/xlf/Strings.ru.xlf | 5 +++++ .../Resources/xlf/Strings.tr.xlf | 5 +++++ .../Resources/xlf/Strings.zh-Hans.xlf | 5 +++++ .../Resources/xlf/Strings.zh-Hant.xlf | 5 +++++ 18 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs index a723bafe4e4b..2013a4907990 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs @@ -238,6 +238,11 @@ private static async Task PushToRemoteRegistryAsync(ILogger logger, BuiltIm cancellationToken)).ConfigureAwait(false); logger.LogInformation(Strings.ContainerBuilder_ImageUploadedToRegistry, destinationImageReference, destinationImageReference.RemoteRegistry.RegistryName); } + catch (UnableToDownloadFromRepositoryException e) + { + logger.LogError(Resource.FormatString(nameof(Strings.UnableToDownloadFromRepository)), sourceImageReference); + return 1; + } catch (UnableToAccessRepositoryException) { logger.LogError(Resource.FormatString(nameof(Strings.UnableToAccessRepository), destinationImageReference.Repository, destinationImageReference.RemoteRegistry!.RegistryName)); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs new file mode 100644 index 000000000000..de69816d497f --- /dev/null +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -0,0 +1,12 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.NET.Build.Containers; + +internal sealed class UnableToDownloadFromRepositoryException : Exception +{ + public UnableToDownloadFromRepositoryException(string repository, string stackTrace) + : base($"The load of the image from registry {repository} has failed. Stack trace: {stackTrace}") + { + } +} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index fe43d88cc822..c15e74af9976 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -412,15 +412,22 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri return localPath; } - // No local copy, so download one - using Stream responseStream = await _registryAPI.Blob.GetStreamAsync(repository, descriptor.Digest, cancellationToken).ConfigureAwait(false); - string tempTarballPath = ContentStore.GetTempFile(); - using (FileStream fs = File.Create(tempTarballPath)) + + try { - await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); - } + // No local copy, so download one + using Stream responseStream = await _registryAPI.Blob.GetStreamAsync(repository, descriptor.Digest, cancellationToken).ConfigureAwait(false); + using (FileStream fs = File.Create(tempTarballPath)) + { + await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); + } + } + catch (Exception e) + { + throw new UnableToDownloadFromRepositoryException(repository, e.ToString()); + } cancellationToken.ThrowIfCancellationRequested(); File.Move(tempTarballPath, localPath, overwrite: true); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs index 9cf5fb285768..6d3c3f4435cd 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs @@ -780,6 +780,17 @@ internal static string UnableToAccessRepository { } } + /// + /// Looks up a localized string similar to CONTAINER1018: Unable to download image from the repository '{0}'. Stack trace: {1}. + /// + internal static string UnableToDownloadFromRepository + { + get + { + return ResourceManager.GetString("UnableToDownloadFromRepository", resourceCulture); + } + } + /// /// Looks up a localized string similar to CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}.. /// diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx index fd26dda65b56..68462409cbd8 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx @@ -436,6 +436,10 @@ CONTAINER1015: Unable to access the repository '{0}' at tag '{1}' in the registry '{2}'. Please confirm that this name and tag are present in the registry. {StrBegins="CONTAINER1015: "} + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER1016: Unable to access the repository '{0}' in the registry '{1}'. Please confirm your credentials are correct and that you have access to this repository and registry. {StrBegins="CONTAINER1016:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf index b44981ef4270..640f03f37379 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf @@ -399,6 +399,11 @@ CONTAINER1016: Nelze získat přístup k úložišti „{0}“ v registru „{1}“. Ověřte prosím správnost vašich přihlašovacích údajů a to, že máte přístup k tomuto úložišti a registru. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Neznámé AppCommandInstruction „{0}“. Platné pokyny jsou {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf index ddb19050d638..2090b343188e 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf @@ -399,6 +399,11 @@ CONTAINER1016: Auf das Repository "{0}" in der Registrierung "{1}" kann nicht zugegriffen werden. Vergewissern Sie sich, dass Ihre Anmeldeinformationen korrekt sind und dass Sie Zugriff auf dieses Repository und die Registrierung haben. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Unbekannte AppCommandInstruction "{0}". Gültige Anweisungen sind {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf index dece60a72610..b170fd453a62 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf @@ -399,6 +399,11 @@ CONTAINER1016: no se puede acceder al repositorio ''{0}'' en el registro ''{1}''. Confirme que las credenciales son correctas y que tiene acceso a este repositorio y registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction ''{0}desconocido. Las instrucciones válidas son {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf index 251a6f066724..362107f4c5ea 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf @@ -399,6 +399,11 @@ CONTAINER1016: nous n’avons pas pu accéder au référentiel '{0}' dans le Registre '{1}'. Confirmez que vos informations d’identification sont correctes et que vous avez accès à ce référentiel et à ce Registre. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: instruction de commande d'application inconnue '{0}'. Les instructions valides sont {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf index 6650435cb2e9..03356ecf74a7 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf @@ -399,6 +399,11 @@ CONTAINER1016: impossibile accedere al repository '{0}' nel Registro di sistema '{1}'. Verificare che le credenziali siano corrette e di avere accesso a questo repository e registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: appCommandInstruction '{0}'sconosciuta. Istruzioni valide sono {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf index 9ec7f8022fe0..6e0adacb2cbf 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf @@ -399,6 +399,11 @@ CONTAINER1016: レジストリ '{1}' のリポジトリ '{0}' にアクセスできません。資格情報が正しいこと、およびこのリポジトリとレジストリへのアクセス権があることを確認してください。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 不明な AppCommandInstruction '{0}'。有効な手順は {1} です。 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf index cbf4c28633b4..7918578b6e83 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf @@ -399,6 +399,11 @@ CONTAINER1016: '{1}' 레지스트리의 '{0}' 리포지토리에 액세스할 수 없습니다. 자격 증명이 올바르고 이 리포지토리 및 레지스트리에 액세스할 수 있는지 확인하세요. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 알 수 없는 AppCommandInstruction '{0}'. 올바른 지침은 {1}입니다. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf index 7d7e97470018..56753d36db71 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf @@ -399,6 +399,11 @@ CONTAINER1016: nie można uzyskać dostępu do repozytorium „{0}” w rejestrze „{1}”. Upewnij się, że poświadczenia są poprawne oraz że masz dostęp do tego repozytorium i rejestru. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Nieznana instrukcja AppCommandInstruction „{0}”. Prawidłowe instrukcje to{1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf index 0fd4c0750417..4aabec69ccc5 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf @@ -399,6 +399,11 @@ CONTAINER1016: não é possível acessar o repositório ''{0}'' no registro ''{1}''. Confirme se suas credenciais estão corretas e se você tem acesso a este repositório e ao Registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction desconhecido '{0}'. As instruções válidas são {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf index a7e9356658d8..a35d6123d958 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf @@ -399,6 +399,11 @@ CONTAINER1016: не удается получить доступ к репозиторию "{0}" в реестре "{1}". Убедитесь, что ваши учетные данные верны и что у вас есть доступ к этому репозиторию и реестру. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: неизвестный элемент AppCommandInstruction "{0}". Допустимые инструкции: {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf index 3e80453768be..80217f6da128 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf @@ -399,6 +399,11 @@ CONTAINER1016: '{1}' kayıt defterindeki '{0}' deposuna erişilemedi. Lütfen kimlik bilgilerinizin doğru olduğunu ve bu depoya ve kayıt defterine erişiminiz olduğunu onaylayın. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction '{0}' bilinmiyor. Geçerli yönergeler {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf index 2c3f4e2171f3..3c93837b8cb4 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf @@ -399,6 +399,11 @@ CONTAINER1016: 无法访问注册表“{1}”中的存储库“{0}”。请确认你的凭据正确无误,并且你有权访问此存储库和注册表。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction“{0}”未知。有效的说明为 {1}。 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf index 5ad488338f97..991501a7099d 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf @@ -399,6 +399,11 @@ CONTAINER1016: 無法存取登錄 '{1}' 中的存放庫 '{0}'。請確認您的認證正確,且您擁有此存放庫和登錄的存取權。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 未知的 AppCommandInstruction '{0}'。有效的指示為 {1}。 From 7ca6e0ddde6bacbd86bf2c4694b9dbe418deebd0 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 26 Nov 2024 13:41:35 +0100 Subject: [PATCH 02/14] removing of stack trace, fixed mistype, added a test against the exception --- ...UnableToDownloadFromRepositoryException.cs | 4 +- .../Registry/Registry.cs | 2 +- .../EndToEndTests.cs | 49 +++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs index de69816d497f..31d4f3089db3 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -5,8 +5,8 @@ namespace Microsoft.NET.Build.Containers; internal sealed class UnableToDownloadFromRepositoryException : Exception { - public UnableToDownloadFromRepositoryException(string repository, string stackTrace) - : base($"The load of the image from registry {repository} has failed. Stack trace: {stackTrace}") + public UnableToDownloadFromRepositoryException(string repository) + : base($"The load of the image from repository { repository } has failed.") { } } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index c15e74af9976..32f5b63adb76 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -426,7 +426,7 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri } catch (Exception e) { - throw new UnableToDownloadFromRepositoryException(repository, e.ToString()); + throw new UnableToDownloadFromRepositoryException(repository); } cancellationToken.ThrowIfCancellationRequested(); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 6cbbdd87c9fc..e7743244fff9 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1371,4 +1371,53 @@ static string[] DecideEntrypoint(string rid, string appName, string workingDir) return new[] { $"{workingDir}/{binary}" }; } } + + [DockerAvailableFact] + public async Task CheckErrorMessageWhenSourceRepositoryThrows() + { + ILogger logger = _loggerFactory.CreateLogger(nameof(CheckErrorMessageWhenSourceRepositoryThrows)); + string rid = "win-x64"; + string publishDirectory = BuildLocalApp(tfm: ToolsetInfo.CurrentTargetFramework, rid: rid); + + // Build the image + Registry registry = new(DockerRegistryManager.BaseImageSource, logger, RegistryMode.Push); + ImageBuilder? imageBuilder = await registry.GetImageManifestAsync( + DockerRegistryManager.RuntimeBaseImage, + DockerRegistryManager.Net8PreviewWindowsSpecificImageTag, + rid, + ToolsetUtils.RidGraphManifestPicker, + cancellationToken: default).ConfigureAwait(false); + Assert.NotNull(imageBuilder); + + Layer l = Layer.FromDirectory(publishDirectory, "C:\\app", true, imageBuilder.ManifestMediaType); + + imageBuilder.AddLayer(l); + imageBuilder.SetWorkingDirectory("C:\\app"); + + string[] entryPoint = DecideEntrypoint(rid, "MinimalTestApp", "C:\\app"); + imageBuilder.SetEntrypointAndCmd(entryPoint, Array.Empty()); + + BuiltImage builtImage = imageBuilder.Build(); + + // Load the image into the local registry + var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9PreviewImageTag); + var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); + var sawMyException = false; + try + { + await new DockerCli(_loggerFactory).LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false); + } + catch (UnableToDownloadFromRepositoryException e) + { + sawMyException = true; + Assert.Contains("The load of the image from repository some_random_image has failed", e.ToString()); + } + Assert.True(sawMyException); + + static string[] DecideEntrypoint(string rid, string appName, string workingDir) + { + var binary = rid.StartsWith("win", StringComparison.Ordinal) ? $"{appName}.exe" : appName; + return new[] { $"{workingDir}/{binary}" }; + } + } } From 0942fbfa37cb565cf4664ea52005a9b838889f1c Mon Sep 17 00:00:00 2001 From: SimaTian Date: Mon, 27 Jan 2025 13:04:35 +0100 Subject: [PATCH 03/14] addressing review comments --- .../Exceptions/UnableToDownloadFromRepositoryException.cs | 2 +- .../EndToEndTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs index 31d4f3089db3..30718be88ed6 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -6,7 +6,7 @@ namespace Microsoft.NET.Build.Containers; internal sealed class UnableToDownloadFromRepositoryException : Exception { public UnableToDownloadFromRepositoryException(string repository) - : base($"The load of the image from repository { repository } has failed.") + : base($"The download of the image from repository { repository } has failed.") { } } diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index e7743244fff9..e11f4967a118 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1410,7 +1410,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() catch (UnableToDownloadFromRepositoryException e) { sawMyException = true; - Assert.Contains("The load of the image from repository some_random_image has failed", e.ToString()); + Assert.Contains("CONTAINER1018", e.ToString()); } Assert.True(sawMyException); From 66c17db844ce3a247849cfdfec0ee7ce81476c66 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Mon, 27 Jan 2025 14:10:38 +0100 Subject: [PATCH 04/14] fixing minor error --- .../Microsoft.NET.Build.Containers/ContainerBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs index 2013a4907990..ff496c844e70 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs @@ -238,7 +238,7 @@ private static async Task PushToRemoteRegistryAsync(ILogger logger, BuiltIm cancellationToken)).ConfigureAwait(false); logger.LogInformation(Strings.ContainerBuilder_ImageUploadedToRegistry, destinationImageReference, destinationImageReference.RemoteRegistry.RegistryName); } - catch (UnableToDownloadFromRepositoryException e) + catch (UnableToDownloadFromRepositoryException) { logger.LogError(Resource.FormatString(nameof(Strings.UnableToDownloadFromRepository)), sourceImageReference); return 1; From 9b71ed1606a5be886c52464a539e80be7cf95aba Mon Sep 17 00:00:00 2001 From: Tomas Bartonek Date: Mon, 27 Jan 2025 15:04:05 +0100 Subject: [PATCH 05/14] Remove unused exception variable in catch block --- .../Microsoft.NET.Build.Containers/Registry/Registry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index 32f5b63adb76..4b1c0ab11e45 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -424,7 +424,7 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); } } - catch (Exception e) + catch (Exception) { throw new UnableToDownloadFromRepositoryException(repository); } From cc5e418e9e533c294c587132801bf09e90b28ddd Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 28 Jan 2025 09:49:05 +0100 Subject: [PATCH 06/14] tag fix --- .../EndToEndTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index e11f4967a118..e408ed63c649 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1400,7 +1400,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9PreviewImageTag); + var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9ImageTag); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); var sawMyException = false; try From bce76bf5f3b7e79aefbfa02a86e12d9de26d8ca6 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 28 Jan 2025 12:03:15 +0100 Subject: [PATCH 07/14] adding a missing parameter --- .../EndToEndTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index e408ed63c649..3c3b2e34f71f 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1400,7 +1400,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9ImageTag); + var sourceReference = new SourceImageRegistry(registry, "some_random_image", DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); var sawMyException = false; try From fbcc64cf9b1a53933980c8d9909a8dcc72863161 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 28 Jan 2025 14:01:43 +0100 Subject: [PATCH 08/14] fix --- .../EndToEndTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 3c3b2e34f71f..8b791d776324 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1400,7 +1400,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageRegistry(registry, "some_random_image", DockerRegistryManager.Net9ImageTag, null); + var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); var sawMyException = false; try From 6eddb6682eda49d36cc9b7f1ed85d2dea74f551e Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 19 Nov 2024 16:15:46 +0100 Subject: [PATCH 09/14] upgraded logging for #595 log url when connection is closed --- .../ContainerBuilder.cs | 5 +++++ ...UnableToDownloadFromRepositoryException.cs | 12 ++++++++++++ .../Registry/Registry.cs | 19 +++++++++++++------ .../Resources/Strings.Designer.cs | 11 +++++++++++ .../Resources/Strings.resx | 4 ++++ .../Resources/xlf/Strings.cs.xlf | 5 +++++ .../Resources/xlf/Strings.de.xlf | 5 +++++ .../Resources/xlf/Strings.es.xlf | 5 +++++ .../Resources/xlf/Strings.fr.xlf | 5 +++++ .../Resources/xlf/Strings.it.xlf | 5 +++++ .../Resources/xlf/Strings.ja.xlf | 5 +++++ .../Resources/xlf/Strings.ko.xlf | 5 +++++ .../Resources/xlf/Strings.pl.xlf | 5 +++++ .../Resources/xlf/Strings.pt-BR.xlf | 5 +++++ .../Resources/xlf/Strings.ru.xlf | 5 +++++ .../Resources/xlf/Strings.tr.xlf | 5 +++++ .../Resources/xlf/Strings.zh-Hans.xlf | 5 +++++ .../Resources/xlf/Strings.zh-Hant.xlf | 5 +++++ 18 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs index a723bafe4e4b..2013a4907990 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs @@ -238,6 +238,11 @@ private static async Task PushToRemoteRegistryAsync(ILogger logger, BuiltIm cancellationToken)).ConfigureAwait(false); logger.LogInformation(Strings.ContainerBuilder_ImageUploadedToRegistry, destinationImageReference, destinationImageReference.RemoteRegistry.RegistryName); } + catch (UnableToDownloadFromRepositoryException e) + { + logger.LogError(Resource.FormatString(nameof(Strings.UnableToDownloadFromRepository)), sourceImageReference); + return 1; + } catch (UnableToAccessRepositoryException) { logger.LogError(Resource.FormatString(nameof(Strings.UnableToAccessRepository), destinationImageReference.Repository, destinationImageReference.RemoteRegistry!.RegistryName)); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs new file mode 100644 index 000000000000..de69816d497f --- /dev/null +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -0,0 +1,12 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.NET.Build.Containers; + +internal sealed class UnableToDownloadFromRepositoryException : Exception +{ + public UnableToDownloadFromRepositoryException(string repository, string stackTrace) + : base($"The load of the image from registry {repository} has failed. Stack trace: {stackTrace}") + { + } +} diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index fe43d88cc822..c15e74af9976 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -412,15 +412,22 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri return localPath; } - // No local copy, so download one - using Stream responseStream = await _registryAPI.Blob.GetStreamAsync(repository, descriptor.Digest, cancellationToken).ConfigureAwait(false); - string tempTarballPath = ContentStore.GetTempFile(); - using (FileStream fs = File.Create(tempTarballPath)) + + try { - await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); - } + // No local copy, so download one + using Stream responseStream = await _registryAPI.Blob.GetStreamAsync(repository, descriptor.Digest, cancellationToken).ConfigureAwait(false); + using (FileStream fs = File.Create(tempTarballPath)) + { + await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); + } + } + catch (Exception e) + { + throw new UnableToDownloadFromRepositoryException(repository, e.ToString()); + } cancellationToken.ThrowIfCancellationRequested(); File.Move(tempTarballPath, localPath, overwrite: true); diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs index 9cf5fb285768..6d3c3f4435cd 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs @@ -780,6 +780,17 @@ internal static string UnableToAccessRepository { } } + /// + /// Looks up a localized string similar to CONTAINER1018: Unable to download image from the repository '{0}'. Stack trace: {1}. + /// + internal static string UnableToDownloadFromRepository + { + get + { + return ResourceManager.GetString("UnableToDownloadFromRepository", resourceCulture); + } + } + /// /// Looks up a localized string similar to CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}.. /// diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx index fd26dda65b56..68462409cbd8 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx @@ -436,6 +436,10 @@ CONTAINER1015: Unable to access the repository '{0}' at tag '{1}' in the registry '{2}'. Please confirm that this name and tag are present in the registry. {StrBegins="CONTAINER1015: "} + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER1016: Unable to access the repository '{0}' in the registry '{1}'. Please confirm your credentials are correct and that you have access to this repository and registry. {StrBegins="CONTAINER1016:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf index b44981ef4270..640f03f37379 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf @@ -399,6 +399,11 @@ CONTAINER1016: Nelze získat přístup k úložišti „{0}“ v registru „{1}“. Ověřte prosím správnost vašich přihlašovacích údajů a to, že máte přístup k tomuto úložišti a registru. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Neznámé AppCommandInstruction „{0}“. Platné pokyny jsou {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf index ddb19050d638..2090b343188e 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf @@ -399,6 +399,11 @@ CONTAINER1016: Auf das Repository "{0}" in der Registrierung "{1}" kann nicht zugegriffen werden. Vergewissern Sie sich, dass Ihre Anmeldeinformationen korrekt sind und dass Sie Zugriff auf dieses Repository und die Registrierung haben. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Unbekannte AppCommandInstruction "{0}". Gültige Anweisungen sind {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf index dece60a72610..b170fd453a62 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf @@ -399,6 +399,11 @@ CONTAINER1016: no se puede acceder al repositorio ''{0}'' en el registro ''{1}''. Confirme que las credenciales son correctas y que tiene acceso a este repositorio y registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction ''{0}desconocido. Las instrucciones válidas son {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf index 251a6f066724..362107f4c5ea 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf @@ -399,6 +399,11 @@ CONTAINER1016: nous n’avons pas pu accéder au référentiel '{0}' dans le Registre '{1}'. Confirmez que vos informations d’identification sont correctes et que vous avez accès à ce référentiel et à ce Registre. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: instruction de commande d'application inconnue '{0}'. Les instructions valides sont {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf index 6650435cb2e9..03356ecf74a7 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf @@ -399,6 +399,11 @@ CONTAINER1016: impossibile accedere al repository '{0}' nel Registro di sistema '{1}'. Verificare che le credenziali siano corrette e di avere accesso a questo repository e registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: appCommandInstruction '{0}'sconosciuta. Istruzioni valide sono {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf index 9ec7f8022fe0..6e0adacb2cbf 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf @@ -399,6 +399,11 @@ CONTAINER1016: レジストリ '{1}' のリポジトリ '{0}' にアクセスできません。資格情報が正しいこと、およびこのリポジトリとレジストリへのアクセス権があることを確認してください。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 不明な AppCommandInstruction '{0}'。有効な手順は {1} です。 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf index cbf4c28633b4..7918578b6e83 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf @@ -399,6 +399,11 @@ CONTAINER1016: '{1}' 레지스트리의 '{0}' 리포지토리에 액세스할 수 없습니다. 자격 증명이 올바르고 이 리포지토리 및 레지스트리에 액세스할 수 있는지 확인하세요. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 알 수 없는 AppCommandInstruction '{0}'. 올바른 지침은 {1}입니다. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf index 7d7e97470018..56753d36db71 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf @@ -399,6 +399,11 @@ CONTAINER1016: nie można uzyskać dostępu do repozytorium „{0}” w rejestrze „{1}”. Upewnij się, że poświadczenia są poprawne oraz że masz dostęp do tego repozytorium i rejestru. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: Nieznana instrukcja AppCommandInstruction „{0}”. Prawidłowe instrukcje to{1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf index 0fd4c0750417..4aabec69ccc5 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf @@ -399,6 +399,11 @@ CONTAINER1016: não é possível acessar o repositório ''{0}'' no registro ''{1}''. Confirme se suas credenciais estão corretas e se você tem acesso a este repositório e ao Registro. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction desconhecido '{0}'. As instruções válidas são {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf index a7e9356658d8..a35d6123d958 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf @@ -399,6 +399,11 @@ CONTAINER1016: не удается получить доступ к репозиторию "{0}" в реестре "{1}". Убедитесь, что ваши учетные данные верны и что у вас есть доступ к этому репозиторию и реестру. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: неизвестный элемент AppCommandInstruction "{0}". Допустимые инструкции: {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf index 3e80453768be..80217f6da128 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf @@ -399,6 +399,11 @@ CONTAINER1016: '{1}' kayıt defterindeki '{0}' deposuna erişilemedi. Lütfen kimlik bilgilerinizin doğru olduğunu ve bu depoya ve kayıt defterine erişiminiz olduğunu onaylayın. {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction '{0}' bilinmiyor. Geçerli yönergeler {1}. diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf index 2c3f4e2171f3..3c93837b8cb4 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf @@ -399,6 +399,11 @@ CONTAINER1016: 无法访问注册表“{1}”中的存储库“{0}”。请确认你的凭据正确无误,并且你有权访问此存储库和注册表。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: AppCommandInstruction“{0}”未知。有效的说明为 {1}。 diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf index 5ad488338f97..991501a7099d 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf @@ -399,6 +399,11 @@ CONTAINER1016: 無法存取登錄 '{1}' 中的存放庫 '{0}'。請確認您的認證正確,且您擁有此存放庫和登錄的存取權。 {StrBegins="CONTAINER1016:" } + + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + {StrBegins="CONTAINER1018:" } + CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}. CONTAINER2021: 未知的 AppCommandInstruction '{0}'。有效的指示為 {1}。 From d79a6f40369713a39b4caddac969c88c611a7d80 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Tue, 26 Nov 2024 13:41:35 +0100 Subject: [PATCH 10/14] removing of stack trace, fixed mistype, added a test against the exception --- ...UnableToDownloadFromRepositoryException.cs | 4 +- .../Registry/Registry.cs | 2 +- .../EndToEndTests.cs | 49 +++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs index de69816d497f..31d4f3089db3 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -5,8 +5,8 @@ namespace Microsoft.NET.Build.Containers; internal sealed class UnableToDownloadFromRepositoryException : Exception { - public UnableToDownloadFromRepositoryException(string repository, string stackTrace) - : base($"The load of the image from registry {repository} has failed. Stack trace: {stackTrace}") + public UnableToDownloadFromRepositoryException(string repository) + : base($"The load of the image from repository { repository } has failed.") { } } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index c15e74af9976..32f5b63adb76 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -426,7 +426,7 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri } catch (Exception e) { - throw new UnableToDownloadFromRepositoryException(repository, e.ToString()); + throw new UnableToDownloadFromRepositoryException(repository); } cancellationToken.ThrowIfCancellationRequested(); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 6cbbdd87c9fc..e7743244fff9 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1371,4 +1371,53 @@ static string[] DecideEntrypoint(string rid, string appName, string workingDir) return new[] { $"{workingDir}/{binary}" }; } } + + [DockerAvailableFact] + public async Task CheckErrorMessageWhenSourceRepositoryThrows() + { + ILogger logger = _loggerFactory.CreateLogger(nameof(CheckErrorMessageWhenSourceRepositoryThrows)); + string rid = "win-x64"; + string publishDirectory = BuildLocalApp(tfm: ToolsetInfo.CurrentTargetFramework, rid: rid); + + // Build the image + Registry registry = new(DockerRegistryManager.BaseImageSource, logger, RegistryMode.Push); + ImageBuilder? imageBuilder = await registry.GetImageManifestAsync( + DockerRegistryManager.RuntimeBaseImage, + DockerRegistryManager.Net8PreviewWindowsSpecificImageTag, + rid, + ToolsetUtils.RidGraphManifestPicker, + cancellationToken: default).ConfigureAwait(false); + Assert.NotNull(imageBuilder); + + Layer l = Layer.FromDirectory(publishDirectory, "C:\\app", true, imageBuilder.ManifestMediaType); + + imageBuilder.AddLayer(l); + imageBuilder.SetWorkingDirectory("C:\\app"); + + string[] entryPoint = DecideEntrypoint(rid, "MinimalTestApp", "C:\\app"); + imageBuilder.SetEntrypointAndCmd(entryPoint, Array.Empty()); + + BuiltImage builtImage = imageBuilder.Build(); + + // Load the image into the local registry + var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9PreviewImageTag); + var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); + var sawMyException = false; + try + { + await new DockerCli(_loggerFactory).LoadAsync(builtImage, sourceReference, destinationReference, default).ConfigureAwait(false); + } + catch (UnableToDownloadFromRepositoryException e) + { + sawMyException = true; + Assert.Contains("The load of the image from repository some_random_image has failed", e.ToString()); + } + Assert.True(sawMyException); + + static string[] DecideEntrypoint(string rid, string appName, string workingDir) + { + var binary = rid.StartsWith("win", StringComparison.Ordinal) ? $"{appName}.exe" : appName; + return new[] { $"{workingDir}/{binary}" }; + } + } } From cb5528311bcf321e45b57af20e9b78f5c42b9587 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Mon, 27 Jan 2025 13:04:35 +0100 Subject: [PATCH 11/14] addressing review comments --- .../Exceptions/UnableToDownloadFromRepositoryException.cs | 2 +- .../EndToEndTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs index 31d4f3089db3..30718be88ed6 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Exceptions/UnableToDownloadFromRepositoryException.cs @@ -6,7 +6,7 @@ namespace Microsoft.NET.Build.Containers; internal sealed class UnableToDownloadFromRepositoryException : Exception { public UnableToDownloadFromRepositoryException(string repository) - : base($"The load of the image from repository { repository } has failed.") + : base($"The download of the image from repository { repository } has failed.") { } } diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index e7743244fff9..e11f4967a118 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1410,7 +1410,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() catch (UnableToDownloadFromRepositoryException e) { sawMyException = true; - Assert.Contains("The load of the image from repository some_random_image has failed", e.ToString()); + Assert.Contains("CONTAINER1018", e.ToString()); } Assert.True(sawMyException); From 2daa089493d2de09ed74f61a2e2e29226eac1b83 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Wed, 29 Jan 2025 10:17:33 +0100 Subject: [PATCH 12/14] manual squash of some commits --- .../Microsoft.NET.Build.Containers/ContainerBuilder.cs | 2 +- .../Microsoft.NET.Build.Containers/Registry/Registry.cs | 2 +- .../EndToEndTests.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs index 2013a4907990..ff496c844e70 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerBuilder.cs @@ -238,7 +238,7 @@ private static async Task PushToRemoteRegistryAsync(ILogger logger, BuiltIm cancellationToken)).ConfigureAwait(false); logger.LogInformation(Strings.ContainerBuilder_ImageUploadedToRegistry, destinationImageReference, destinationImageReference.RemoteRegistry.RegistryName); } - catch (UnableToDownloadFromRepositoryException e) + catch (UnableToDownloadFromRepositoryException) { logger.LogError(Resource.FormatString(nameof(Strings.UnableToDownloadFromRepository)), sourceImageReference); return 1; diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index 32f5b63adb76..4b1c0ab11e45 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -424,7 +424,7 @@ public async Task DownloadBlobAsync(string repository, Descriptor descri await responseStream.CopyToAsync(fs, cancellationToken).ConfigureAwait(false); } } - catch (Exception e) + catch (Exception) { throw new UnableToDownloadFromRepositoryException(repository); } diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index e11f4967a118..8b791d776324 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1400,7 +1400,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() BuiltImage builtImage = imageBuilder.Build(); // Load the image into the local registry - var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9PreviewImageTag); + var sourceReference = new SourceImageReference(registry, "some_random_image", DockerRegistryManager.Net9ImageTag, null); var destinationReference = new DestinationImageReference(registry, NewImageName(), new[] { rid }); var sawMyException = false; try From a11bb4a8ac7c6c9944647d38a97573160532776e Mon Sep 17 00:00:00 2001 From: SimaTian Date: Wed, 29 Jan 2025 11:18:43 +0100 Subject: [PATCH 13/14] fixing issue with test --- .../Resources/Strings.Designer.cs | 196 +++++++++--------- .../Resources/Strings.resx | 2 +- .../EndToEndTests.cs | 2 +- 3 files changed, 99 insertions(+), 101 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs index 6d3c3f4435cd..25a2fa3e56eb 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs @@ -10,8 +10,8 @@ namespace Microsoft.NET.Build.Containers.Resources { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -23,15 +23,15 @@ namespace Microsoft.NET.Build.Containers.Resources { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Strings { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -45,7 +45,7 @@ internal Strings() { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -59,7 +59,7 @@ internal Strings() { resourceCulture = value; } } - + /// /// Looks up a localized string similar to CONTAINER0000: Value for unit test {0}. /// @@ -68,7 +68,7 @@ internal static string _Test { return ResourceManager.GetString("_Test", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1002: Request to Amazon Elastic Container Registry failed prematurely. This is often caused when the target repository does not exist in the registry.. /// @@ -77,7 +77,7 @@ internal static string AmazonRegistryFailed { return ResourceManager.GetString("AmazonRegistryFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2008: Both {0} and {1} were provided, but only one or the other is allowed.. /// @@ -86,7 +86,7 @@ internal static string AmbiguousTags { return ResourceManager.GetString("AmbiguousTags", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2025: ContainerAppCommandArgs are provided without specifying a ContainerAppCommand.. /// @@ -95,7 +95,7 @@ internal static string AppCommandArgsSetNoAppCommand { return ResourceManager.GetString("AppCommandArgsSetNoAppCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2026: ContainerAppCommand and ContainerAppCommandArgs must be empty when ContainerAppCommandInstruction is '{0}'.. /// @@ -104,7 +104,7 @@ internal static string AppCommandSetNotUsed { return ResourceManager.GetString("AppCommandSetNotUsed", resourceCulture); } } - + /// /// Looks up a localized string similar to local archive at '{0}'. /// @@ -113,7 +113,7 @@ internal static string ArchiveRegistry_PushInfo { return ResourceManager.GetString("ArchiveRegistry_PushInfo", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2022: The base image has an entrypoint that will be overwritten to start the application. Set ContainerAppCommandInstruction to 'Entrypoint' if this is desired. To preserve the base image entrypoint, set ContainerAppCommandInstruction to 'DefaultArgs'.. /// @@ -122,7 +122,7 @@ internal static string BaseEntrypointOverwritten { return ResourceManager.GetString("BaseEntrypointOverwritten", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2009: Could not parse {0}: {1}. /// @@ -131,7 +131,7 @@ internal static string BaseImageNameParsingFailed { return ResourceManager.GetString("BaseImageNameParsingFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2020: {0} does not specify a registry and will be pulled from Docker Hub. Please prefix the name with the image registry, for example: '{1}/<image>'.. /// @@ -140,7 +140,7 @@ internal static string BaseImageNameRegistryFallback { return ResourceManager.GetString("BaseImageNameRegistryFallback", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2013: {0} had spaces in it, replacing with dashes.. /// @@ -149,7 +149,7 @@ internal static string BaseImageNameWithSpaces { return ResourceManager.GetString("BaseImageNameWithSpaces", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1011: Couldn't find matching base image for {0} that matches RuntimeIdentifier {1}.. /// @@ -158,7 +158,7 @@ internal static string BaseImageNotFound { return ResourceManager.GetString("BaseImageNotFound", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1001: Failed to upload blob using {0}; received status code '{1}'.. /// @@ -167,7 +167,7 @@ internal static string BlobUploadFailed { return ResourceManager.GetString("BlobUploadFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to Building image index '{0}' on top of manifests {1}.. /// @@ -176,7 +176,7 @@ internal static string BuildingImageIndex { return ResourceManager.GetString("BuildingImageIndex", resourceCulture); } } - + /// /// Looks up a localized string similar to Pushed image '{0}' to {1}.. /// @@ -185,7 +185,7 @@ internal static string ContainerBuilder_ImageUploadedToLocalDaemon { return ResourceManager.GetString("ContainerBuilder_ImageUploadedToLocalDaemon", resourceCulture); } } - + /// /// Looks up a localized string similar to Pushed image '{0}' to registry '{1}'.. /// @@ -194,7 +194,7 @@ internal static string ContainerBuilder_ImageUploadedToRegistry { return ResourceManager.GetString("ContainerBuilder_ImageUploadedToRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to Building image '{0}' with tags '{1}' on top of base image '{2}'.. /// @@ -203,7 +203,7 @@ internal static string ContainerBuilder_StartBuildingImage { return ResourceManager.GetString("ContainerBuilder_StartBuildingImage", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER3001: Failed creating {0} process.. /// @@ -212,7 +212,7 @@ internal static string ContainerRuntimeProcessCreationFailed { return ResourceManager.GetString("ContainerRuntimeProcessCreationFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1007: Could not deserialize token from JSON.. /// @@ -221,7 +221,7 @@ internal static string CouldntDeserializeJsonToken { return ResourceManager.GetString("CouldntDeserializeJsonToken", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2012: Could not recognize registry '{0}'.. /// @@ -230,7 +230,7 @@ internal static string CouldntRecognizeRegistry { return ResourceManager.GetString("CouldntRecognizeRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to local registry via '{0}'. /// @@ -239,7 +239,7 @@ internal static string DockerCli_PushInfo { return ResourceManager.GetString("DockerCli_PushInfo", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER3002: Failed to get docker info({0})\n{1}\n{2}. /// @@ -248,7 +248,7 @@ internal static string DockerInfoFailed { return ResourceManager.GetString("DockerInfoFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER3002: Failed to get docker info: {0}. /// @@ -257,7 +257,7 @@ internal static string DockerInfoFailed_Ex { return ResourceManager.GetString("DockerInfoFailed_Ex", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4006: Property '{0}' is empty or contains whitespace and will be ignored.. /// @@ -266,7 +266,7 @@ internal static string EmptyOrWhitespacePropertyIgnored { return ResourceManager.GetString("EmptyOrWhitespacePropertyIgnored", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4004: Items '{0}' contain empty item(s) which will be ignored.. /// @@ -275,7 +275,7 @@ internal static string EmptyValuesIgnored { return ResourceManager.GetString("EmptyValuesIgnored", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2023: A ContainerEntrypoint and ContainerAppCommandArgs are provided. ContainerAppInstruction must be set to configure how the application is started. Valid instructions are {0}.. /// @@ -284,7 +284,7 @@ internal static string EntrypointAndAppCommandArgsSetNoAppCommandInstruction { return ResourceManager.GetString("EntrypointAndAppCommandArgsSetNoAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2024: ContainerEntrypointArgs are provided without specifying a ContainerEntrypoint.. /// @@ -293,7 +293,7 @@ internal static string EntrypointArgsSetNoEntrypoint { return ResourceManager.GetString("EntrypointArgsSetNoEntrypoint", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2029: ContainerEntrypointArgsSet are provided. Change to use ContainerAppCommandArgs for arguments that must always be set, or ContainerDefaultArgs for arguments that can be overridden when the container is created.. /// @@ -302,7 +302,7 @@ internal static string EntrypointArgsSetPreferAppCommandArgs { return ResourceManager.GetString("EntrypointArgsSetPreferAppCommandArgs", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2028: ContainerEntrypoint can not be combined with ContainerAppCommandInstruction '{0}'.. /// @@ -311,7 +311,7 @@ internal static string EntrypointConflictAppCommand { return ResourceManager.GetString("EntrypointConflictAppCommand", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2027: A ContainerEntrypoint is provided. ContainerAppInstruction must be set to configure how the application is started. Valid instructions are {0}.. /// @@ -320,7 +320,7 @@ internal static string EntrypointSetNoAppCommandInstruction { return ResourceManager.GetString("EntrypointSetNoAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1008: Failed retrieving credentials for "{0}": {1}. /// @@ -329,7 +329,7 @@ internal static string FailedRetrievingCredentials { return ResourceManager.GetString("FailedRetrievingCredentials", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2030: GenerateLabels was disabled but GenerateDigestLabel was enabled - no digest label will be created.. /// @@ -338,7 +338,7 @@ internal static string GenerateDigestLabelWithoutGenerateLabels { return ResourceManager.GetString("GenerateDigestLabelWithoutGenerateLabels", resourceCulture); } } - + /// /// Looks up a localized string similar to No host object detected.. /// @@ -347,7 +347,7 @@ internal static string HostObjectNotDetected { return ResourceManager.GetString("HostObjectNotDetected", resourceCulture); } } - + /// /// Looks up a localized string similar to Pushed image index '{0}' to registry '{1}'.. /// @@ -356,7 +356,7 @@ internal static string ImageIndexUploadedToRegistry { return ResourceManager.GetString("ImageIndexUploadedToRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1009: Failed to load image from local registry. stdout: {0}. /// @@ -365,7 +365,7 @@ internal static string ImageLoadFailed { return ResourceManager.GetString("ImageLoadFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1010: Pulling images from local registry is not supported.. /// @@ -374,7 +374,7 @@ internal static string ImagePullNotSupported { return ResourceManager.GetString("ImagePullNotSupported", resourceCulture); } } - + /// /// Looks up a localized string similar to Cannot create manifest list (image index) because no images were provided.. /// @@ -383,7 +383,7 @@ internal static string ImagesEmpty { return ResourceManager.GetString("ImagesEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2031: The container image format '{0}' is not supported. Supported formats are '{1}'.. /// @@ -392,7 +392,7 @@ internal static string InvalidContainerImageFormat { return ResourceManager.GetString("InvalidContainerImageFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2015: {0}: '{1}' was not a valid Environment Variable. Ignoring.. /// @@ -401,7 +401,7 @@ internal static string InvalidEnvVar { return ResourceManager.GetString("InvalidEnvVar", resourceCulture); } } - + /// /// Looks up a localized string similar to Cannot create manifest list (image index) because provided images are invalid. Items must have 'Config', 'Manifest', 'ManifestMediaType' and 'ManifestDigest' metadata.. /// @@ -410,7 +410,7 @@ internal static string InvalidImageMetadata { return ResourceManager.GetString("InvalidImageMetadata", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2005: The inferred image name '{0}' contains entirely invalid characters. The valid characters for an image name are alphanumeric characters, -, /, or _, and the image name must start with an alphanumeric character.. /// @@ -419,7 +419,7 @@ internal static string InvalidImageName_EntireNameIsInvalidCharacters { return ResourceManager.GetString("InvalidImageName_EntireNameIsInvalidCharacters", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2005: The first character of the image name '{0}' must be a lowercase letter or a digit and all characters in the name must be an alphanumeric character, -, /, or _.. /// @@ -428,7 +428,7 @@ internal static string InvalidImageName_NonAlphanumericStartCharacter { return ResourceManager.GetString("InvalidImageName_NonAlphanumericStartCharacter", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port number '{0}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// @@ -437,7 +437,7 @@ internal static string InvalidPort_Number { return ResourceManager.GetString("InvalidPort_Number", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port number '{0}' and an invalid port type '{1}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// @@ -446,7 +446,7 @@ internal static string InvalidPort_NumberAndType { return ResourceManager.GetString("InvalidPort_NumberAndType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2017: A ContainerPort item was provided with an invalid port type '{0}'. ContainerPort items must have an Include value that is an integer, and a Type value that is either 'tcp' or 'udp'.. /// @@ -455,7 +455,7 @@ internal static string InvalidPort_Type { return ResourceManager.GetString("InvalidPort_Type", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2018: Invalid SDK prerelease version '{0}' - only 'rc' and 'preview' are supported.. /// @@ -464,7 +464,7 @@ internal static string InvalidSdkPrereleaseVersion { return ResourceManager.GetString("InvalidSdkPrereleaseVersion", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2019: Invalid SDK semantic version '{0}'.. /// @@ -473,7 +473,7 @@ internal static string InvalidSdkVersion { return ResourceManager.GetString("InvalidSdkVersion", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2007: Invalid {0} provided: {1}. Image tags must be alphanumeric, underscore, hyphen, or period.. /// @@ -482,7 +482,7 @@ internal static string InvalidTag { return ResourceManager.GetString("InvalidTag", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2010: Invalid {0} provided: {1}. {0} must be a semicolon-delimited list of valid image tags. Image tags must be alphanumeric, underscore, hyphen, or period.. /// @@ -491,7 +491,7 @@ internal static string InvalidTags { return ResourceManager.GetString("InvalidTags", resourceCulture); } } - + /// /// Looks up a localized string similar to Invalid string[] TargetRuntimeIdentifiers. Either all should be 'linux-musl' or none.. /// @@ -500,7 +500,7 @@ internal static string InvalidTargetRuntimeIdentifiers { return ResourceManager.GetString("InvalidTargetRuntimeIdentifiers", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1003: Token response had neither token nor access_token.. /// @@ -509,7 +509,7 @@ internal static string InvalidTokenResponse { return ResourceManager.GetString("InvalidTokenResponse", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4005: Item '{0}' contains items without metadata 'Value', and they will be ignored.. /// @@ -518,7 +518,7 @@ internal static string ItemsWithoutMetadata { return ResourceManager.GetString("ItemsWithoutMetadata", resourceCulture); } } - + /// /// Looks up a localized string similar to Error while reading daemon config: {0}. /// @@ -527,7 +527,7 @@ internal static string LocalDocker_FailedToGetConfig { return ResourceManager.GetString("LocalDocker_FailedToGetConfig", resourceCulture); } } - + /// /// Looks up a localized string similar to The daemon server reported errors: {0}. /// @@ -536,7 +536,7 @@ internal static string LocalDocker_LocalDaemonErrors { return ResourceManager.GetString("LocalDocker_LocalDaemonErrors", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1012: The local registry is not available, but pushing to a local registry was requested.. /// @@ -545,7 +545,7 @@ internal static string LocalRegistryNotAvailable { return ResourceManager.GetString("LocalRegistryNotAvailable", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2004: Unable to download layer with descriptor '{0}' from registry '{1}' because it does not exist.. /// @@ -554,7 +554,7 @@ internal static string MissingLinkToRegistry { return ResourceManager.GetString("MissingLinkToRegistry", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2016: ContainerPort item '{0}' does not specify the port number. Please ensure the item's Include is a port number, for example '<ContainerPort Include="80" />'. /// @@ -563,7 +563,7 @@ internal static string MissingPortNumber { return ResourceManager.GetString("MissingPortNumber", resourceCulture); } } - + /// /// Looks up a localized string similar to 'mediaType' of manifests should be the same in manifest list (image index).. /// @@ -572,7 +572,7 @@ internal static string MixedMediaTypes { return ResourceManager.GetString("MixedMediaTypes", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1004: No RequestUri specified.. /// @@ -581,7 +581,7 @@ internal static string NoRequestUriSpecified { return ResourceManager.GetString("NoRequestUriSpecified", resourceCulture); } } - + /// /// Looks up a localized string similar to '{0}' was not a valid container image name, it was normalized to '{1}'. /// @@ -590,7 +590,7 @@ internal static string NormalizedContainerName { return ResourceManager.GetString("NormalizedContainerName", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to create tarball for oci image with multiple tags.. /// @@ -599,7 +599,7 @@ internal static string OciImageMultipleTagsNotSupported { return ResourceManager.GetString("OciImageMultipleTagsNotSupported", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2011: {0} '{1}' does not exist. /// @@ -608,7 +608,7 @@ internal static string PublishDirectoryDoesntExist { return ResourceManager.GetString("PublishDirectoryDoesntExist", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded config to registry.. /// @@ -617,7 +617,7 @@ internal static string Registry_ConfigUploaded { return ResourceManager.GetString("Registry_ConfigUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading config to registry at blob '{0}',. /// @@ -626,7 +626,7 @@ internal static string Registry_ConfigUploadStarted { return ResourceManager.GetString("Registry_ConfigUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Layer '{0}' already exists.. /// @@ -635,7 +635,7 @@ internal static string Registry_LayerExists { return ResourceManager.GetString("Registry_LayerExists", resourceCulture); } } - + /// /// Looks up a localized string similar to Finished uploading layer '{0}' to '{1}'.. /// @@ -644,7 +644,7 @@ internal static string Registry_LayerUploaded { return ResourceManager.GetString("Registry_LayerUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading layer '{0}' to '{1}'.. /// @@ -653,7 +653,7 @@ internal static string Registry_LayerUploadStarted { return ResourceManager.GetString("Registry_LayerUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded manifest to '{0}'.. /// @@ -662,7 +662,7 @@ internal static string Registry_ManifestUploaded { return ResourceManager.GetString("Registry_ManifestUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading manifest to registry '{0}' as blob '{1}'.. /// @@ -671,7 +671,7 @@ internal static string Registry_ManifestUploadStarted { return ResourceManager.GetString("Registry_ManifestUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploaded tag '{0}' to '{1}'.. /// @@ -680,7 +680,7 @@ internal static string Registry_TagUploaded { return ResourceManager.GetString("Registry_TagUploaded", resourceCulture); } } - + /// /// Looks up a localized string similar to Uploading tag '{0}' to '{1}'.. /// @@ -689,7 +689,7 @@ internal static string Registry_TagUploadStarted { return ResourceManager.GetString("Registry_TagUploadStarted", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1017: Unable to communicate with the registry '{0}'.. /// @@ -698,7 +698,7 @@ internal static string RegistryOperationFailed { return ResourceManager.GetString("RegistryOperationFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1013: Failed to push to the output registry: {0}. /// @@ -707,7 +707,7 @@ internal static string RegistryOutputPushFailed { return ResourceManager.GetString("RegistryOutputPushFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1014: Manifest pull failed.. /// @@ -716,7 +716,7 @@ internal static string RegistryPullFailed { return ResourceManager.GetString("RegistryPullFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1005: Registry push failed; received status code '{0}'.. /// @@ -725,7 +725,7 @@ internal static string RegistryPushFailed { return ResourceManager.GetString("RegistryPushFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1015: Unable to access the repository '{0}' at tag '{1}' in the registry '{2}'. Please confirm that this name and tag are present in the registry.. /// @@ -734,7 +734,7 @@ internal static string RepositoryNotFound { return ResourceManager.GetString("RepositoryNotFound", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4003: Required '{0}' items contain empty items.. /// @@ -743,7 +743,7 @@ internal static string RequiredItemsContainsEmptyItems { return ResourceManager.GetString("RequiredItemsContainsEmptyItems", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4002: Required '{0}' items were not set.. /// @@ -752,7 +752,7 @@ internal static string RequiredItemsNotSet { return ResourceManager.GetString("RequiredItemsNotSet", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER4001: Required property '{0}' was not set or empty.. /// @@ -761,7 +761,7 @@ internal static string RequiredPropertyNotSetOrEmpty { return ResourceManager.GetString("RequiredPropertyNotSetOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1006: Too many retries, stopping.. /// @@ -770,7 +770,7 @@ internal static string TooManyRetries { return ResourceManager.GetString("TooManyRetries", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER1016: Unable to access the repository '{0}' in the registry '{1}'. Please confirm your credentials are correct and that you have access to this repository and registry.. /// @@ -779,18 +779,16 @@ internal static string UnableToAccessRepository { return ResourceManager.GetString("UnableToAccessRepository", resourceCulture); } } - + /// - /// Looks up a localized string similar to CONTAINER1018: Unable to download image from the repository '{0}'. Stack trace: {1}. + /// Looks up a localized string similar to CONTAINER1018: Unable to download image from the repository '{0}'.. /// - internal static string UnableToDownloadFromRepository - { - get - { + internal static string UnableToDownloadFromRepository { + get { return ResourceManager.GetString("UnableToDownloadFromRepository", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2021: Unknown AppCommandInstruction '{0}'. Valid instructions are {1}.. /// @@ -799,7 +797,7 @@ internal static string UnknownAppCommandInstruction { return ResourceManager.GetString("UnknownAppCommandInstruction", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2002: Unknown local registry type '{0}'. Valid local container registry types are {1}.. /// @@ -808,7 +806,7 @@ internal static string UnknownLocalRegistryType { return ResourceManager.GetString("UnknownLocalRegistryType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2003: The manifest for {0}:{1} from registry {2} was an unknown type: {3}. Please raise an issue at https://github.com/dotnet/sdk-container-builds/issues with this message.. /// @@ -817,7 +815,7 @@ internal static string UnknownMediaType { return ResourceManager.GetString("UnknownMediaType", resourceCulture); } } - + /// /// Looks up a localized string similar to CONTAINER2001: Unrecognized mediaType '{0}'.. /// @@ -826,7 +824,7 @@ internal static string UnrecognizedMediaType { return ResourceManager.GetString("UnrecognizedMediaType", resourceCulture); } } - + /// /// Looks up a localized string similar to Cannot create manifest list (image index) for the provided 'mediaType' = '{0}'.. /// @@ -835,7 +833,7 @@ internal static string UnsupportedMediaType { return ResourceManager.GetString("UnsupportedMediaType", resourceCulture); } } - + /// /// Looks up a localized string similar to Unable to create tarball for mediaType '{0}'.. /// diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx index 68462409cbd8..a3c82586ec26 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx @@ -437,7 +437,7 @@ {StrBegins="CONTAINER1015: "} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 8b791d776324..fd8598d226e3 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -1410,7 +1410,7 @@ public async Task CheckErrorMessageWhenSourceRepositoryThrows() catch (UnableToDownloadFromRepositoryException e) { sawMyException = true; - Assert.Contains("CONTAINER1018", e.ToString()); + Assert.Contains("The download of the image from repository some_random_image has failed", e.ToString()); } Assert.True(sawMyException); From c017951727ec146fe48d359962c5df6f826a3c36 Mon Sep 17 00:00:00 2001 From: SimaTian Date: Wed, 29 Jan 2025 13:24:49 +0100 Subject: [PATCH 14/14] update xlf files --- .../Resources/xlf/Strings.cs.xlf | 4 ++-- .../Resources/xlf/Strings.de.xlf | 4 ++-- .../Resources/xlf/Strings.es.xlf | 4 ++-- .../Resources/xlf/Strings.fr.xlf | 4 ++-- .../Resources/xlf/Strings.it.xlf | 4 ++-- .../Resources/xlf/Strings.ja.xlf | 4 ++-- .../Resources/xlf/Strings.ko.xlf | 4 ++-- .../Resources/xlf/Strings.pl.xlf | 4 ++-- .../Resources/xlf/Strings.pt-BR.xlf | 4 ++-- .../Resources/xlf/Strings.ru.xlf | 4 ++-- .../Resources/xlf/Strings.tr.xlf | 4 ++-- .../Resources/xlf/Strings.zh-Hans.xlf | 4 ++-- .../Resources/xlf/Strings.zh-Hant.xlf | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf index 640f03f37379..6f52b0e3b158 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.cs.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf index 2090b343188e..f2b97279cb6a 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.de.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf index b170fd453a62..503950d33856 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.es.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf index 362107f4c5ea..8e3140a622b5 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.fr.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf index 03356ecf74a7..a1f0c1cf21c8 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.it.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf index 6e0adacb2cbf..0f41d1ea615b 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ja.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf index 7918578b6e83..40a3d0ad4390 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ko.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf index 56753d36db71..9cdc59e5dd6d 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pl.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf index 4aabec69ccc5..0e5ae23b5ba3 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.pt-BR.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf index a35d6123d958..83200cc04801 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.ru.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf index 80217f6da128..3aef001d6803 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.tr.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf index 3c93837b8cb4..cb5545ccfd17 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hans.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf index 991501a7099d..c0dfb708ffea 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Containers/Microsoft.NET.Build.Containers/Resources/xlf/Strings.zh-Hant.xlf @@ -400,8 +400,8 @@ {StrBegins="CONTAINER1016:" } - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} - CONTAINER1018: Unable to download image from the repository '{0}''. Stack trace: {1} + CONTAINER1018: Unable to download image from the repository '{0}'. + CONTAINER1018: Unable to download image from the repository '{0}'. {StrBegins="CONTAINER1018:" }