From b93d1ef6bd4bdaa9d3534228c59d5cc8933164ca Mon Sep 17 00:00:00 2001 From: pat-s Date: Tue, 30 Jun 2026 12:41:32 +0000 Subject: [PATCH] chore: silence otelsdk warnings across build paths (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Silences the recurring `OpenTelemetry error: there is no package called 'otelsdk'` warnings during builds. ## Root cause The `build-env-*` images configure an OTel exporter (traces/logs/metrics), but `otelsdk` (the R OTel SDK backend) isn't installed. pak's `otel` instrumentation therefore tries to load `otelsdk` on every run and logs the error, falling back to a no-op. `OTEL_SDK_DISABLED=true` (already set in `build-one.Dockerfile`) does **not** help — the R `otel` package ignores it and gates purely on `OTEL_R__EXPORTER` (then the standard `OTEL__EXPORTER`). When that resolves to a real exporter (`otlp`/`http`/…) with no SDK present, you get the error. ## Fix Set `OTEL_R_TRACES_EXPORTER`, `OTEL_R_LOGS_EXPORTER`, and `OTEL_R_METRICS_EXPORTER` to `none` so the R otel providers are clean no-ops: - `docker/build-one.Dockerfile` — exported alongside the existing OTel var. - `.crow/process-updates.yaml`, `weekly-rebuild-missing.yaml`, `build-all-versions.yaml`, `build-all-versions-install-deps.yaml` — added to each step's `environment` block. Using the R-specific variables (not the standard `OTEL_*_EXPORTER`) keeps OTel intact for any non-R tooling in the images. Reviewed-on: https://git.devxy.io/devxy/build-cran-binaries/pulls/105 --- .crow/build-all-versions-install-deps.yaml | 3 +++ .crow/build-all-versions.yaml | 6 ++++++ .crow/process-updates.yaml | 6 ++++++ .crow/weekly-rebuild-missing.yaml | 3 +++ docker/build-one.Dockerfile | 3 +++ 5 files changed, 21 insertions(+) diff --git a/.crow/build-all-versions-install-deps.yaml b/.crow/build-all-versions-install-deps.yaml index 886bfc6..68d9569 100644 --- a/.crow/build-all-versions-install-deps.yaml +++ b/.crow/build-all-versions-install-deps.yaml @@ -53,6 +53,9 @@ steps: image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}' pull: true environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none REPO_RO_TOKEN: from_secret: REPO_RO_TOKEN GITHUB_PAT: diff --git a/.crow/build-all-versions.yaml b/.crow/build-all-versions.yaml index 3de6fa1..9364b4e 100644 --- a/.crow/build-all-versions.yaml +++ b/.crow/build-all-versions.yaml @@ -90,6 +90,9 @@ steps: image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}' pull: true environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none RED_HAT_DEV_PW: from_secret: RED_HAT_DEV_PW B2_S3_ACCESS_KEY: @@ -152,6 +155,9 @@ steps: image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}' pull: true environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none B2_S3_ACCESS_KEY: from_secret: B2_S3_ACCESS_KEY B2_S3_SECRET_KEY: diff --git a/.crow/process-updates.yaml b/.crow/process-updates.yaml index 24b3fd3..5e4eccc 100644 --- a/.crow/process-updates.yaml +++ b/.crow/process-updates.yaml @@ -158,6 +158,9 @@ steps: image: reg.devxy.io/rpkgs/build-env-${IMG} pull: true environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none RED_HAT_DEV_PW: from_secret: RED_HAT_DEV_PW B2_S3_ACCESS_KEY: @@ -230,6 +233,9 @@ steps: - name: Purge CDN cache image: reg.devxy.io/docker.io/library/alpine:3.24 environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none BUNNYNET_API_KEY: from_secret: BUNNYNET_API_KEY SUBDOMAIN1: 'cran.devxy.io' diff --git a/.crow/weekly-rebuild-missing.yaml b/.crow/weekly-rebuild-missing.yaml index 8f7a263..8877c45 100644 --- a/.crow/weekly-rebuild-missing.yaml +++ b/.crow/weekly-rebuild-missing.yaml @@ -103,6 +103,9 @@ steps: image: reg.devxy.io/rpkgs/build-env-${IMG} pull: true environment: + OTEL_R_TRACES_EXPORTER: none + OTEL_R_LOGS_EXPORTER: none + OTEL_R_METRICS_EXPORTER: none RED_HAT_DEV_PW: from_secret: RED_HAT_DEV_PW B2_S3_ACCESS_KEY: diff --git a/docker/build-one.Dockerfile b/docker/build-one.Dockerfile index 2c1af97..a99db07 100644 --- a/docker/build-one.Dockerfile +++ b/docker/build-one.Dockerfile @@ -30,6 +30,9 @@ RUN --mount=type=secret,id=b2_access,required=true \ export GITHUB_PAT="$(cat /run/secrets/github_pat 2>/dev/null || true)" && \ export GIT_TERMINAL_PROMPT=0 && \ export OTEL_SDK_DISABLED=true && \ + export OTEL_R_TRACES_EXPORTER=none && \ + export OTEL_R_LOGS_EXPORTER=none && \ + export OTEL_R_METRICS_EXPORTER=none && \ XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run || true); \ XVFB_ARGS=""; \ if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi; \