cli: avoid retaining telemetry in silent sessions - #13762
Merged
sipsma merged 2 commits intoJul 29, 2026
Merged
Conversation
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
matipan
approved these changes
Jul 29, 2026
marcosnils
pushed a commit
that referenced
this pull request
Jul 29, 2026
Signed-off-by: Marcos Lilljedahl <[email protected]>
marcosnils
pushed a commit
that referenced
this pull request
Jul 29, 2026
Co-authored-by: Erik Sipsma <[email protected]> Signed-off-by: Marcos Lilljedahl <[email protected]>
This was referenced Aug 3, 2026
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
dagger 0.21.8 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## v0.21.8 - 2026-07-29 ### Changed - Changeset diffs are now computed from filesystem metadata instead of full-content comparison, significantly speeding up diff computation for large directories. by @marcosnils in dagger/dagger#13615 ### Fixed - Dockerfile build layer caching so unrelated build-context changes no longer bust the cache: `COPY`-ed directories now get a content-based cache identity, re-keying downstream steps only when copied content actually changes. by @marcosnils in dagger/dagger#13765 - The `--x-release` CLI re-exec so `_EXPERIMENTAL_DAGGER_RUNNER_HOST` is preserved (with a warning) instead of being stripped, and clarified its startup message to avoid implying it runs from any build. by @tiborvass in dagger/dagger#13752 - Silent SDK sessions no longer retain frontend telemetry in memory while Cloud and OTLP export remain enabled. `DAGGER_SILENT` is now honored as the equivalent of `--silent`. by @sipsma in dagger/dagger#13762 ### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </pre> <p>View the full release notes at <a href="https://github.com/dagger/dagger/releases/tag/v0.21.8">https://github.com/dagger/dagger/releases/tag/v0.21.8</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!15378
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DAGGER_SILENTas the environment equivalent of--silentdagger sessionprocesses before telemetry initializationMotivation
Native CI workers can run 20 concurrent Go SDK clients, each of which starts a
dagger sessionCLI child. The frontend in each child owns adagui.DBthat retains every relayed span, log, and metric for the session lifetime, even when progress output is silent and discarded.In the observed 8 GiB worker OOMs, the worker process itself held about 172 MiB RSS while almost all remaining cgroup memory was held by the session children. Removing the frontend exporters in this mode prevents the unbounded frontend ownership path instead of hiding output or dropping retained data at shutdown.
Semantics and tradeoffs
Default and non-session telemetry behavior is unchanged. Silent sessions still drain engine telemetry and export it to configured Cloud and OTLP destinations. They do not populate the local frontend database, so frontend-derived progress history is intentionally unavailable in the mode that already suppresses progress.
This change proves the ownership-path reduction but does not claim an exact RSS reduction without a representative production heap profile.
Tests
go test ./internal/cmd/dagger -run="Test(EngineTelemetryConfig|SilentFromEnv)" -count=1go test -race ./internal/cmd/dagger -run="Test(EngineTelemetryConfig|SilentFromEnv)" -count=1dagger api call engine-dev test --pkg ./core/integration --run="TestClient/TestSilentSessionExportsTelemetryToCloud"with isolated credentials and a local fake Cloud collectordagger check "golang:lint"git diff --check