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
This commit is contained in:
jev forsberg
2025-07-17 10:30:58 -06:00
parent 17df90be49
commit 1ecd563cf8
+11 -3
View File
@@ -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"}).