From 84a7cf2d86c2bd3a300af83566e418e0d8dd6bfc Mon Sep 17 00:00:00 2001 From: eeshsaxena Date: Sat, 25 Jul 2026 00:06:35 +0530 Subject: [PATCH] fix(cli): disable OTel in depot child to prevent build failures If OTEL_EXPORTER_OTLP_ENDPOINT is set in the shell (e.g. via a .env file loaded by dotenv), the depot CLI inherits it because execa merges the env object onto process.env rather than replacing it. The depot CLI then tries to initialise its own OTel exporter using that endpoint: - a valid URL causes a Schema URL conflict and the build exits with 'cannot merge resource due to conflicting Schema URL' - an invalid value (e.g. an encrypted dotenvx blob) causes 'failed to build resolver: passthrough: received empty target in Build()' Both surface as 'Error building image', which looks like a depot outage rather than a local env variable problem, and --local-build is unaffected. Set OTEL_SDK_DISABLED=1 and clear OTEL_EXPORTER_OTLP_ENDPOINT in the env block passed to the depot child so ambient OTEL config can't reach it. Fixes #4321 --- packages/cli-v3/src/deploy/buildImage.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/cli-v3/src/deploy/buildImage.ts b/packages/cli-v3/src/deploy/buildImage.ts index 8e393a70dd..c8ed683843 100644 --- a/packages/cli-v3/src/deploy/buildImage.ts +++ b/packages/cli-v3/src/deploy/buildImage.ts @@ -256,6 +256,13 @@ async function remoteBuildImage(options: DepotBuildImageOptions): Promise