Skip to content

Update the Python SDK scope interface - #26

Merged
eunomie merged 8 commits into
mainfrom
sdk-module-interface-catchup
Sep 7, 2026
Merged

eunomie merged 8 commits into
mainfrom
sdk-module-interface-catchup

Conversation

@shykes

@shykes shykes commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Fix the Python SDK to incorporate the last changes to dagger/dagger#13992 + follow best practices from other SDK PRs:

  • Implement new findClientRoot()
  • Use new github.com/dagger/sdk-helpers module
  • Remove dead code and settings ("generation skip markers")
  • Add e2e checks

Rename detectScope to findClientRoot. Use the final legacy runtime dependency methods when the SDK writes a complete scope manifest.

Write dagger-module.toml for each managed module and remove a migrated dagger.json. Remove the generate skip marker because the engine now controls scope generation.

Expand the engine check to test the interface, manifest migration, clients, settings, and a generated module call.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Change findClientRoot to return an optional string. Return null when the workspace does not contain a Python client root.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Update the engine check to use the commit that makes findClientRoot optional.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Add dagger/sdk-helpers as a pinned module dependency. Use its constructor argument names for TOML and JSON input.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Call moduleManifest through the sdk-helpers root module. Pin the published helper and the latest module-max engine commit.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
Use Path.relativeTo for local dependency paths. Store the sdk-helpers pin in dagger.lock and test manifest preservation directly.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes
shykes marked this pull request as ready for review September 6, 2026 18:11
Remove the e2e module from system-engine check discovery. Run its complete suite inside the engine built from the latest dagger/dagger#13992 commit.

Signed-off-by: Solomon Hykes <solomon@dagger.io>
@shykes
shykes requested review from TomChv and eunomie September 6, 2026 18:23
eunomie added a commit to eunomie/java-sdk that referenced this pull request Sep 7, 2026
The branch moved again, 7e6fc93c to 8fd9b22b, and took the module
manifest builder out of the engine with it. `moduleManifest` is no
longer a builtin: it lives in github.com/dagger/sdk-helpers, a Dang
module this SDK now depends on and reaches as
`sdkHelpers.moduleManifest(loadToml:)` / `(loadJson:)`. That module
declares engineVersion v0.21.9, so depending on it does not stop this
one loading on a released engine.

Three behaviours change with it, following dagger/python-sdk#26.

The generate skip marker is gone entirely — the setting, Mod.skipGenerate,
the marker files and the fixtures that relied on them. generateScope
always generates.

generateScope always writes dagger-module.toml from the builder, and
migrates a pre-1.0 module: the contents of its dagger.json move into the
new manifest and the dagger.json is removed, so the two cannot disagree.
The runtime the module already named is preserved, so a module on the
engine's builtin java runtime stays there rather than being moved onto
this repository's.

Path.relativeTo replaces the hand-rolled relative-path arithmetic. It is
on the released engine too, so it costs nothing to adopt.

The e2e module is no longer installed in dagger.toml. An uninstalled
module is never reached by a released-engine `dagger check`, which is a
stronger gate than the check.skip list it replaces, and
sdk-contract-check now runs `dagger -m .dagger/modules/e2e check` inside
the playground rather than naming each check.

Because generation is unconditional, a scope a check drives has to be a
module Maven can build. The config-only stub fixtures go, along with the
scope registrations that named them; the checks build their scopes from
the template instead and share one module name where they only need a
module, since the SDK installs its jars under a per-module Maven version.
generate-scope-migrate-check is new and covers the migration above.

sdk-helpers is pinned and locked. An unpinned dependency of this kind
already cost this branch a red CI run once: the resolution is cached
locally, so it keeps passing here long after it has moved upstream.

Signed-off-by: Yves Brissaud <yves@dagger.io>
Signed-off-by: Yves Brissaud <yves@dagger.io>
@eunomie
eunomie merged commit 874445d into main Sep 7, 2026
2 checks passed
@eunomie
eunomie deleted the sdk-module-interface-catchup branch September 7, 2026 16:01
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