Skip to content

core: pass the call digest to a Dang entrypoint - #14491

Merged
eunomie merged 1 commit into
eunomie/module-clients-2-own-treefrom
eunomie/module-clients-3-entrypoint-call-digest
Oct 6, 2026
Merged

eunomie merged 1 commit into
eunomie/module-clients-2-own-treefrom
eunomie/module-clients-3-entrypoint-call-digest

Conversation

@eunomie

@eunomie eunomie commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

A Dang entrypoint runs a module's code in an exec it starts. That exec is cached by its own recipe, which misses the call's implicit inputs — such as the declared clients added by #14489. A call whose implicit inputs changed could therefore reuse a cached exec and return a stale result.

Change

The engine now passes the call digest to the entrypoint's call when the entrypoint declares a nullable callDigest argument, so the entrypoint can key the exec it starts on the call. An entrypoint that does not declare callDigest never receives it and is unchanged; the ModuleEntrypoint interface does not change. The code change is small (a handful of lines in core/sdk/dang/v2/entrypoint.go).

Test

Two subtests added to #14489's TestServeModuleDeclaredClientCache: an unchanged target hits the cache from an entrypoint, and a changed target misses the cache from an entrypoint. Their entrypoint declares callDigest and sends it into its exec.

Depends on

#14489 and #14490 (stack positions 1 and 2).

@eunomie
eunomie added this pull request to stack #14495 October 5, 2026 16:00
@eunomie eunomie changed the title eunomie/module clients 3 entrypoint call digest core: pass the call digest to a Dang entrypoint Oct 5, 2026
@eunomie
eunomie force-pushed the eunomie/module-clients-3-entrypoint-call-digest branch from fad903b to 27e87d2 Compare October 5, 2026 16:10
@eunomie
eunomie marked this pull request as ready for review October 5, 2026 16:31
@eunomie
eunomie force-pushed the eunomie/module-clients-3-entrypoint-call-digest branch from 27e87d2 to d5eb124 Compare October 6, 2026 11:05
An entrypoint's module exec is cached by its own recipe, which misses
the call's declared clients, so a changed client target was served stale.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie force-pushed the eunomie/module-clients-3-entrypoint-call-digest branch from d5eb124 to 2fc8594 Compare October 6, 2026 12:26
@eunomie
eunomie merged commit 938597d into main Oct 6, 2026
90 checks passed
@eunomie
eunomie deleted the eunomie/module-clients-3-entrypoint-call-digest branch October 6, 2026 13:02
eunomie added a commit to dagger/python-sdk that referenced this pull request Oct 7, 2026
A generated entrypoint refused `cache=` and the shared one declared it
without effect: the exec both start is cached on its own recipe, which the
engine's call digest now joins (dagger/dagger#14491).

Signed-off-by: Yves Brissaud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants