Repository navigation
core: add WorkspaceSDK.scopeSetting - #15084
Merged
Merged
Conversation
1 task
eunomie
force-pushed
the
workspace-sdk-scope-setting
branch
2 times, most recently
from
November 6, 2026 10:26
4e324ef to
e8c0055
Compare
eunomie
added a commit
to eunomie/python-sdk
that referenced
this pull request
Nov 6, 2026
The SDK's copy of the engine's config rules had drifted: it missed upper-case tables and scope keys above the workspace root. Needs WorkspaceSDK.scopeSetting from dagger/dagger#15084, not yet released. Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
A null object field raised BadMapError instead of returning {:ok, nil}.
A response with several errors now returns them all, so that nil cannot
hide them.
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
eunomie
force-pushed
the
workspace-sdk-scope-setting
branch
from
November 6, 2026 16:25
e8c0055 to
73dc100
Compare
eunomie
marked this pull request as ready for review
November 6, 2026 16:38
vito
approved these changes
Nov 6, 2026
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
An SDK called directly, as in
dagger call python-sdk mod --path app generate, is built before it knows which scope it serves, so it cannot see the scope settings thatdagger generatepasses it. This adds a field so it can read them:[sdks.<name>.scopes."<scope>".settings]from the workspace'sdagger.toml, in the scope whose key resolves topath.pathis relative to the workspace cwd, or absolute from the workspace root.keyis matched without regard to case.pathor the scope records no such setting.pathescapes the workspace root, the scope records two settings whose names differ only in case, the value cannot be represented as JSON, or the SDK is no longer installed in the workspace config.v1.0.0-beta.26.Fixes
dagger generateand case variants. Constructor defaults match settings without regard to case. A scope setting now replaces a provider module setting whose name differs from it only in case. Before, the SDK received one of the two at random. A scope that records two settings whose names differ only in case is now rejected with the same error bydagger generateand byscopeSetting, whichever key is requested.scope_setting/3returns{:ok, nil}for a null value, but the client raisedBadMapErrorwhen a selected object field was null. It now returnsnilfor any null object field. A response with several errors now returns{:error, response}with all of them. Before, it was read as data.Release notes:
.changes/unreleased/Added-20261103-172910.yaml,.changes/unreleased/Fixed-20261103-172911.yamlandsdk/elixir/.changes/unreleased/Fixed-20261105-145038.yaml.Tests in this PR
TestSDKScopeSettingMatchesGenerateincore/schema. It checks thatdagger generateandscopeSettingagree on a case variant, an empty value and a missing key, and that both reject a scope with case-variant duplicates, whichever key is requested.TestWorkspaceAPI/TestWorkspaceSDKScopeSetting. It reads a recorded value through the API, then shows that aWorkspaceSDKloaded by ID fails once its SDK is removed fromdagger.toml.nullable object and several errorsinsdk/elixir/test/dagger/client_test.exs. The null object case runs against an engine. The several-errors case runs against a local HTTP stub that returns two errors.Status
TestSDKScopeSettingMatchesGeneratepassed on this head.*/stalechecks passed. They rerun on this head.TestWorkspaceAPI/TestWorkspaceSDKScopeSettingpassed on this head, against a development engine built from it (1 test).nullable object and several errors(client_test.exs:209) passed on this head: 1 test, 0 failures.