From 2e4cd5858d29010fb18cd18962fd05d8d7869a90 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Fri, 4 Oct 2024 15:02:37 -0400 Subject: [PATCH] Fix container image builds for http fault injector and otel collector (#9096) * Fix container image builds for http fault injector and otel collector * Got it working with the latest, and specifying a specific version of the envprovider since, apparently, it versions separately from everything else. --------- Co-authored-by: Richard Park --- .../Azure.Sdk.Tools.HttpFaultInjector.csproj | 2 +- tools/http-fault-injector/Dockerfile | 4 ++-- .../services/otelcollector/Dockerfile | 4 ++-- .../services/otelcollector/otel-builder.yml | 16 ++++++++++------ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/tools/http-fault-injector/Azure.Sdk.Tools.HttpFaultInjector/Azure.Sdk.Tools.HttpFaultInjector.csproj b/tools/http-fault-injector/Azure.Sdk.Tools.HttpFaultInjector/Azure.Sdk.Tools.HttpFaultInjector.csproj index b0b53f29ff9..ff647ca4693 100644 --- a/tools/http-fault-injector/Azure.Sdk.Tools.HttpFaultInjector/Azure.Sdk.Tools.HttpFaultInjector.csproj +++ b/tools/http-fault-injector/Azure.Sdk.Tools.HttpFaultInjector/Azure.Sdk.Tools.HttpFaultInjector.csproj @@ -1,4 +1,4 @@ - + 0.2.0 diff --git a/tools/http-fault-injector/Dockerfile b/tools/http-fault-injector/Dockerfile index 80451e0a294..dca9197ce01 100644 --- a/tools/http-fault-injector/Dockerfile +++ b/tools/http-fault-injector/Dockerfile @@ -1,5 +1,5 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 -# fault injector requires .NET 6 +FROM mcr.microsoft.com/dotnet/sdk:8.0 +# fault injector requires .NET 8 ARG FAULT_INJECTOR_VERSION="" ARG NUGET_SOURCE="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" diff --git a/tools/stress-cluster/services/otelcollector/Dockerfile b/tools/stress-cluster/services/otelcollector/Dockerfile index 05b03602dd9..bdc4248ab7a 100644 --- a/tools/stress-cluster/services/otelcollector/Dockerfile +++ b/tools/stress-cluster/services/otelcollector/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build +FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build RUN apt update -y && apt upgrade -y && apt install -y build-essential git # this lets us build a custom otel-collector image, with a minimal set of # adapters, etc... -RUN go install go.opentelemetry.io/collector/cmd/builder@latest +RUN go install go.opentelemetry.io/collector/cmd/builder@v0.110.0 COPY ./otel-builder.yml /otel-builder.yml # builds to /tmp/dist RUN builder --config=/otel-builder.yml diff --git a/tools/stress-cluster/services/otelcollector/otel-builder.yml b/tools/stress-cluster/services/otelcollector/otel-builder.yml index 55b016b4006..d621f239656 100644 --- a/tools/stress-cluster/services/otelcollector/otel-builder.yml +++ b/tools/stress-cluster/services/otelcollector/otel-builder.yml @@ -1,16 +1,20 @@ -# This is used as an input to the `ocb` app that lets you build a customized OpenTelemetry collector, +# This is used as an input to the `ocb` app that lets you build a customized OpenTelemetry collector, # as described here: https://opentelemetry.io/docs/collector/custom-collector/ dist: name: otelcol-custom description: Local OpenTelemetry Collector binary output_path: /tmp/dist - otelcol_version: 0.96.0 + otelcol_version: 0.110.0 +providers: + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 + exporters: - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.96.0 - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.110.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.110.0