Skip to content

Commit

Permalink
Fix merging partition config into existing launchpad config (#17688)
Browse files Browse the repository at this point in the history
## Summary & Motivation
Fixes #17522

## How I Tested These Changes

created a job in the toys repository to test this
  • Loading branch information
salazarm authored Nov 6, 2023
1 parent be528ec commit bef1219
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ const LaunchpadSession: React.FC<LaunchpadSessionProps> = (props) => {
} else {
runConfigYaml = yaml.stringify(
merge(
yaml.parse(sanitizeConfigYamlString(partition.runConfigOrError.yaml)),
yaml.parse(sanitizeConfigYamlString(currentSession.runConfigYaml)),
yaml.parse(sanitizeConfigYamlString(partition.runConfigOrError.yaml)),
),
);
}
Expand Down
16 changes: 16 additions & 0 deletions python_modules/dagster-test/dagster_test/toys/partition_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from dagster import job, op, static_partitioned_config


@static_partitioned_config(["a", "b", "c"])
def partconf(partition):
return {"ops": {"op1": {"letter": partition}}}


@op(config_schema={"letter": str})
def op1():
...


@job(config=partconf)
def job_with_partition_config():
op1()
24 changes: 20 additions & 4 deletions python_modules/dagster-test/dagster_test/toys/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
warnings.filterwarnings("ignore", category=ExperimentalWarning)

import pendulum
from dagster import AssetMaterialization, Output, graph, load_assets_from_modules, op, repository
from dagster import (
AssetMaterialization,
Output,
graph,
load_assets_from_modules,
op,
repository,
)

from dagster_test.toys import big_honkin_asset_graph as big_honkin_asset_graph_module
from dagster_test.toys.asset_sensors import get_asset_sensors_repo
Expand All @@ -18,7 +25,10 @@
upstream_repo_assets,
)
from dagster_test.toys.dynamic import dynamic_job
from dagster_test.toys.error_monster import error_monster_failing_job, error_monster_passing_job
from dagster_test.toys.error_monster import (
error_monster_failing_job,
error_monster_passing_job,
)
from dagster_test.toys.graph_backed_assets import graph_backed_asset
from dagster_test.toys.hammer import hammer_default_executor_job
from dagster_test.toys.input_managers import df_stats_job
Expand All @@ -32,6 +42,7 @@
from dagster_test.toys.multi_inputs_outputs import multi_inputs_outputs_job
from dagster_test.toys.notebooks import hello_world_notebook_pipeline
from dagster_test.toys.nothing_input import nothing_job
from dagster_test.toys.partition_config import job_with_partition_config
from dagster_test.toys.retries import retry_job
from dagster_test.toys.run_status_sensors import (
cross_repo_job_sensor,
Expand All @@ -57,8 +68,12 @@
auto_materialize_large_static_graph as auto_materialize_large_static_graph,
auto_materialize_large_time_graph as auto_materialize_large_time_graph,
)
from .auto_materializing.repo_1 import auto_materialize_repo_1 as auto_materialize_repo_1
from .auto_materializing.repo_2 import auto_materialize_repo_2 as auto_materialize_repo_2
from .auto_materializing.repo_1 import (
auto_materialize_repo_1 as auto_materialize_repo_1,
)
from .auto_materializing.repo_2 import (
auto_materialize_repo_2 as auto_materialize_repo_2,
)
from .schedules import get_toys_schedules
from .sensors import get_toys_sensors

Expand Down Expand Up @@ -101,6 +116,7 @@ def toys_repository():
unreliable_job,
dynamic_job,
model_job,
job_with_partition_config,
multi_inputs_outputs_job,
hello_world_notebook_pipeline,
*software_defined_assets,
Expand Down

1 comment on commit bef1219

@github-actions
Copy link

Choose a reason for hiding this comment

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

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-5562cijtj-elementl.vercel.app

Built with commit bef1219.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.