You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Address.container resolves a dag:// module setting once per call, so every check re-resolves it #14926
When a workspace wires one module's setting to another module's function with a DAG address, the setting is re-resolved for every artifact evaluation. On a large workspace, that alone takes most of a check run.
[modules.go-tests.settings]
base = "dag://toolchain/go-runtime"
Address.container is registered with WithInput(dagql.PerCallInput) (core/schema/address.go), so each resolution gets a random call ID and dagql never reuses it. resolveModuleRef then runs Workspace.artifacts(include: [path]).filterUri(uri).one() again, which globs the address against every artifact of the target module before evaluating it. The plain progress shows this as "<artifact>".Glob("toolchain/go-runtime") -> no match, once for every artifact on every resolution.
Each check rebuilds the module object, so each check re-resolves base. The random input also gives every downstream call ID a new value, so method calls on the module object never dedupe within the session.
Measured
Dagger main 8afd98b, one m6id.16xlarge engine, warm cache, a commit that changes only README.md:
One dagger check of a 364-check Go module does 999 Address.container resolutions of its dag:// base: median 14.2 s each, 14,708 s summed. Its first check starts 40-46 s into the run.
During that window the engine is at about 3% CPU, and raising -j from 48 to unlimited gains 12%.
Proposed fix
Resolve Address.container once per session with dagql.PerSessionInput. An address binds to the session's workspace, which does not change within the session, so a per-session result cannot go stale.
With that one-line change, on the same engine and workspace (every module checked, fresh content each run, two runs per arm):
Activity