Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions js_modules/ui-core/src/launchpad/LaunchpadRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,14 @@ export const BackfillLaunchpad = ({
);
}

// Use the saved config's runConfigYaml as rootDefaultYaml if available
const rootDefaultYaml = savedConfig?.runConfigYaml;
// Use the saved config's runConfigYaml as rootDefaultYaml if available,
// otherwise fall back to the schema's defaults so that "Scaffold all default
// config" / "Expand defaults" work in the backfill config editor.
const rootDefaultYaml =
savedConfig?.runConfigYaml ??
(result.data?.runConfigSchemaOrError.__typename === 'RunConfigSchema'
? result.data.runConfigSchemaOrError.rootDefaultYaml
: undefined);
Comment on lines +121 to +125

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing filterDefaultYamlForSubselection on the schema fallback

LaunchpadAllowedRoot always passes rootDefaultYaml through filterDefaultYamlForSubselection before handing it to LaunchpadTransientSessionContainer. That filter removes op-level config keys whose names are not in pipelineOrError.nodeNames, preventing config from unselected ops from appearing in the scaffolded output. The new fallback path here skips that step entirely.

In the common case where the backend's runConfigSchemaOrError query already scopes rootDefaultYaml to the assetSelection this is harmless, but if the backend returns defaults for the full asset job (all ops), "Scaffold all default config" will include configs for ops that are not part of the current backfill selection. Worth verifying which behaviour the backend exhibits, or applying the same filter here for consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on extended

"""Minimal repro for testing Backfill Config "Scaffold all default config" button.

Usage:
    dagster-webserver -p 3333 -f /tmp/dagster_test_backfill_config/test_backfill.py

Then in another terminal:
    cd $DAGSTER_GIT_REPO_DIR/js_modules
    PATH="$HOME/.nvm/versions/node/v20.20.2/bin:$PATH" make dev_webapp

Test scenarios:
1. Backfill BOTH assets → "Scaffold all default config" includes configs for both
   `greeter_asset` and `farewell_asset`.
2. Backfill only ONE asset → scaffolded config contains ONLY that asset's
   config block (verifies filterDefaultYamlForSubselection).
"""

from dagster import (
    Config,
    DailyPartitionsDefinition,
    Definitions,
    asset,
)

PARTITIONS = DailyPartitionsDefinition(start_date="2024-01-01")


class GreeterConfig(Config):
    greeting: str = "Hello"
    name: str = "World"
    suffix: str = "!"


class FarewellConfig(Config):
    farewell: str = "Goodbye"
    closer: str = "cheers"


@asset(group_name="greetings", partitions_def=PARTITIONS)
def greeter_asset(config: GreeterConfig) -> str:
    return f"{config.greeting}, {config.name}{config.suffix}"


@asset(group_name="greetings", partitions_def=PARTITIONS)
def farewell_asset(config: FarewellConfig) -> str:
    return f"{config.farewell}{config.closer}"


defs = Definitions(assets=[greeter_asset, farewell_asset])

Works as expected.
[

Screen.Recording.2026-06-14.at.23.27.03.mov

](url)


return (
<Dialog
Expand Down