GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — fix: builtin dang dependency module loading by eunomie · Pull Request #13007 · dagger/dagger Conversation
|
|
@vito looks good to you? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR dagger#13007 made nested clients fall back to parent sessions when their own session caller was not yet available. That solved the synthetic builtin Dang case, where the nested runtime does not open its own attachables but still needs host-backed services such as git config. The fallback was too broad though: normal nested clients also briefly have no registered session caller while their upgraded session connection is still being handed to BuildKit. During that window, exact session operations could accidentally use a parent caller or later fail with missing requester sessions. Split exact client caller lookup from host-service caller lookup. Exact session operations now keep using the requested client ID and wait for that session. Host-backed service operations get a separate lookup path that may proxy to an explicitly configured ancestor, and only synthetic clients opt into that behavior through the nested-client server path. Builtin Dang now passes an explicit host-service proxy opt-in when it creates its synthetic nested client. The server maps that to a concrete HostServiceProxyClientID on client initialization, validates that reused clients do not change proxy target, and resolves host-service callers through that explicit ancestor chain. Normal container-exec nested clients pass no proxy opt-in, so their exact session operations remain tied to their own session attachables. Normal clients also wait for their own caller before executing GraphQL queries, which closes the race where workspace loading or return-value export could start before the session attachables were registered. The old sleep-based repro hook has been removed. Focused session, engineutil, core, schema, and sdk checks pass with the new exact-vs-host-service split. Signed-off-by: Erik Sipsma <[email protected]>
* Fix nested client session caller resolution PR #13007 made nested clients fall back to parent sessions when their own session caller was not yet available. That solved the synthetic builtin Dang case, where the nested runtime does not open its own attachables but still needs host-backed services such as git config. The fallback was too broad though: normal nested clients also briefly have no registered session caller while their upgraded session connection is still being handed to BuildKit. During that window, exact session operations could accidentally use a parent caller or later fail with missing requester sessions. Split exact client caller lookup from host-service caller lookup. Exact session operations now keep using the requested client ID and wait for that session. Host-backed service operations get a separate lookup path that may proxy to an explicitly configured ancestor, and only synthetic clients opt into that behavior through the nested-client server path. Builtin Dang now passes an explicit host-service proxy opt-in when it creates its synthetic nested client. The server maps that to a concrete HostServiceProxyClientID on client initialization, validates that reused clients do not change proxy target, and resolves host-service callers through that explicit ancestor chain. Normal container-exec nested clients pass no proxy opt-in, so their exact session operations remain tied to their own session attachables. Normal clients also wait for their own caller before executing GraphQL queries, which closes the race where workspace loading or return-value export could start before the session attachables were registered. The old sleep-based repro hook has been removed. Focused session, engineutil, core, schema, and sdk checks pass with the new exact-vs-host-service split. Signed-off-by: Erik Sipsma <[email protected]> * migrate + cleanup session manager code The engine still routed client attachable connections through the root internal/buildkit/session package. That kept real engine code tied to BuildKit's Manager, Caller, and Attachable abstractions even though the runtime session model is now Dagger-owned: clients connect to a Dagger session, publish a set of attachable gRPC services, and engine code needs to find the active caller for a client ID. Replace that root BuildKit session dependency with a Dagger-owned session attachables manager in engine/server. The manager tracks active callers by client ID, records supported method URLs, wakes waiters when a caller arrives or leaves, and closes callers from the actual attachable connection lifecycle. The engine utility layer now depends on a small SessionCaller interface with Conn and Supports methods instead of buildkit/session.Caller, and server/client plumbing passes context-aware lookup functions directly. Update the client-side attachable server naming to match the new model, including ConnectSessionAttachables and SessionAttachablesServer. Keep the existing auth, filesync, secrets, and sshforward protocols, but stop using the root BuildKit session package for registration, caller lookup, or manager state. Move filesync sender construction into engineutil with platform-specific helpers so callers no longer need the old session caller type just to send a filesystem diff. The Unix implementation forwards the socket path through the existing DiffCopy options and Windows keeps an explicit unsupported stub. Refresh session tests around the new manager behavior, including waiter wakeups, context cancellation, reconnect replacement, and support lookups. Remove obsolete cache test coverage that asserted BuildKit session-manager wiring rather than current Dagger behavior. Verification: - dagger --progress=plain call engine-dev test --pkg ./core/integration --run='TestModule' passed. - dagger --progress=plain call engine-dev test --pkg ./core/integration --run='TestContainer|TestDockerfile' was attempted and then stopped after known local Docker/kernel network failures dominated the run; no session-not-found, missing-shared-result, panic, or fatal signatures appeared in the log. Signed-off-by: Erik Sipsma <[email protected]> * remove grpcerrors session plumbing The session attachables refactor still left a small amount of BuildKit-era gRPC plumbing in the production Dagger code. The attachables server and client were still installing the internal BuildKit grpcerrors interceptors, and a few session proxy implementations still used grpcerrors.Code when checking for canceled streams. This removes those interceptors entirely and switches the remaining cancellation checks to the standard gRPC status.Code helper. Session attachables now use ordinary gRPC client/server setup without the custom error wrapper layer. While touching this area, keep the earlier cleanup direction consistent by using engine/slog in the updated session and engineutil code, and keep the attachables client on grpc.NewClient instead of the deprecated grpc.DialContext path. This leaves real Dagger code detached from internal/buildkit/util/grpcerrors while preserving the observed cancellation behavior. Verification: - go test ./engine/client ./engine/server ./engine/engineutil ./engine/session/... - dagger --progress=plain call engine-dev test --pkg ./core/integration --run='TestModule' Signed-off-by: Erik Sipsma <[email protected]> * gofmt session lint suppression The gocyclo nolint added for getOrInitClient needed the formatting shape expected by gofmt around the preceding function comment. Running gofmt inserts the blank comment line between the function documentation block and the lint directive. This is a formatting-only follow-up for the session race branch and does not change behavior. Signed-off-by: Erik Sipsma <[email protected]> --------- Signed-off-by: Erik Sipsma <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.