From aaca9e1ec5f34fa379358dada67f4cd379c62500 Mon Sep 17 00:00:00 2001 From: benbierens Date: Thu, 17 Aug 2023 11:06:45 +0200 Subject: [PATCH] Bumps to new images. --- DistTestCore/Codex/CodexContainerRecipe.cs | 2 +- DistTestCore/Configuration.cs | 2 +- .../Marketplace/CodexContractsContainerRecipe.cs | 2 +- DistTestCore/Marketplace/GethContainerRecipe.cs | 2 +- .../Metrics/PrometheusContainerRecipe.cs | 2 +- KubernetesWorkflow/PodLabels.cs | 16 ++++++++++++---- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/DistTestCore/Codex/CodexContainerRecipe.cs b/DistTestCore/Codex/CodexContainerRecipe.cs index c600c01e..2a6af3b7 100644 --- a/DistTestCore/Codex/CodexContainerRecipe.cs +++ b/DistTestCore/Codex/CodexContainerRecipe.cs @@ -5,7 +5,7 @@ namespace DistTestCore.Codex { public class CodexContainerRecipe : ContainerRecipeFactory { - private const string DefaultDockerImage = "codexstorage/nim-codex:sha-7efa917"; + private const string DefaultDockerImage = "codexstorage/nim-codex:latest-dist-tests"; public const string MetricsPortTag = "metrics_port"; public const string DiscoveryPortTag = "discovery-port"; diff --git a/DistTestCore/Configuration.cs b/DistTestCore/Configuration.cs index 84fb766f..a8170221 100644 --- a/DistTestCore/Configuration.cs +++ b/DistTestCore/Configuration.cs @@ -13,7 +13,7 @@ namespace DistTestCore private readonly string dataFilesPath; private readonly CodexLogLevel codexLogLevel; private readonly string k8sNamespacePrefix; - private RunnerLocation? runnerLocation = null; + private static RunnerLocation? runnerLocation = null; public Configuration() { diff --git a/DistTestCore/Marketplace/CodexContractsContainerRecipe.cs b/DistTestCore/Marketplace/CodexContractsContainerRecipe.cs index e382703f..b61abdde 100644 --- a/DistTestCore/Marketplace/CodexContractsContainerRecipe.cs +++ b/DistTestCore/Marketplace/CodexContractsContainerRecipe.cs @@ -8,7 +8,7 @@ namespace DistTestCore.Marketplace public const string MarketplaceArtifactFilename = "/hardhat/artifacts/contracts/Marketplace.sol/Marketplace.json"; public override string AppName => "codex-contracts"; - public override string Image => "codexstorage/dist-tests-codex-contracts-eth:sha-d6fbfdc"; + public override string Image => "codexstorage/codex-contracts-eth:latest-dist-tests"; protected override void Initialize(StartupConfig startupConfig) { diff --git a/DistTestCore/Marketplace/GethContainerRecipe.cs b/DistTestCore/Marketplace/GethContainerRecipe.cs index 4ca7895d..052e163b 100644 --- a/DistTestCore/Marketplace/GethContainerRecipe.cs +++ b/DistTestCore/Marketplace/GethContainerRecipe.cs @@ -11,7 +11,7 @@ namespace DistTestCore.Marketplace public const string AccountsFilename = "accounts.csv"; public override string AppName => "geth"; - public override string Image => "codexstorage/dist-tests-geth:sha-b788a2d"; + public override string Image => "codexstorage/dist-tests-geth:latest"; protected override void Initialize(StartupConfig startupConfig) { diff --git a/DistTestCore/Metrics/PrometheusContainerRecipe.cs b/DistTestCore/Metrics/PrometheusContainerRecipe.cs index e51fdc5d..d9f7ea8f 100644 --- a/DistTestCore/Metrics/PrometheusContainerRecipe.cs +++ b/DistTestCore/Metrics/PrometheusContainerRecipe.cs @@ -5,7 +5,7 @@ namespace DistTestCore.Metrics public class PrometheusContainerRecipe : ContainerRecipeFactory { public override string AppName => "prometheus"; - public override string Image => "codexstorage/dist-tests-prometheus:sha-f97d7fd"; + public override string Image => "codexstorage/dist-tests-prometheus:latest"; protected override void Initialize(StartupConfig startupConfig) { diff --git a/KubernetesWorkflow/PodLabels.cs b/KubernetesWorkflow/PodLabels.cs index 60fc332c..e436dcf5 100644 --- a/KubernetesWorkflow/PodLabels.cs +++ b/KubernetesWorkflow/PodLabels.cs @@ -36,12 +36,20 @@ namespace KubernetesWorkflow private void Add(string key, string value) { - labels.Add(key, - value.ToLowerInvariant() - .Replace(":","-") + labels.Add(key, Format(value)); + } + + private static string Format(string s) + { + var result = s.ToLowerInvariant() + .Replace(":", "-") .Replace("/", "-") .Replace("\\", "-") - ); + .Replace("[", "-") + .Replace("]", "-") + .Replace(",", "-"); + + return result.Trim('-'); } internal Dictionary GetLabels()