From 1ecd563cf8e48041415eb80f74c3f4c203717d0b Mon Sep 17 00:00:00 2001 From: jev forsberg Date: Thu, 17 Jul 2025 10:30:58 -0600 Subject: [PATCH] Fix: Use conditional container base for E2E compatibility - Alpine for OSS tests (better old arch dashboardScene=false compatibility) - Ubuntu for Enterprise tests (when image renderer needed) - Restores original release-12.0.3 Alpine behavior for OSS - Should resolve old arch E2E test failures --- pkg/build/e2e/service.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/build/e2e/service.go b/pkg/build/e2e/service.go index 95de093ec18..109cb446da2 100644 --- a/pkg/build/e2e/service.go +++ b/pkg/build/e2e/service.go @@ -74,9 +74,17 @@ func GrafanaService(ctx context.Context, d *dagger.Client, opts GrafanaServiceOp WithExec([]string{"yarn", "install", "--immutable"}). WithExec([]string{"yarn", "e2e:plugin:build"}) - // _/ubuntu:latest sticks to latest LTS. - // We need ubuntu to support the image renderer plugin, which assumes glibc. - container := d.Container().From("ubuntu:latest"). + // Conditional container base: Alpine for OSS (better old arch compatibility), Ubuntu for Enterprise (image renderer support) + var container *dagger.Container + if opts.InstallImageRenderer { + // Ubuntu needed for image renderer (Enterprise workflows) + container = d.Container().From("ubuntu:latest") + } else { + // Alpine for OSS - better compatibility with original release-12.0.3 and old arch tests + container = d.Container().From("alpine").WithExec([]string{"apk", "add", "bash"}) + } + + container = container. WithMountedFile("/src/grafana.tar.gz", opts.GrafanaTarGz). WithExec([]string{"mkdir", "-p", "/src/grafana"}). WithExec([]string{"tar", "--strip-components=1", "-xzf", "/src/grafana.tar.gz", "-C", "/src/grafana"}).