diff --git a/python_modules/dagster-graphql/dagster_graphql/test/utils.py b/python_modules/dagster-graphql/dagster_graphql/test/utils.py index 9b74d12500b69..874ae986fe271 100644 --- a/python_modules/dagster-graphql/dagster_graphql/test/utils.py +++ b/python_modules/dagster-graphql/dagster_graphql/test/utils.py @@ -201,6 +201,8 @@ def infer_pipeline_selector( { "pipelineName": pipeline_name, "solidSelection": op_selection, + "assetSelection": [], + "assetCheckSelection": [], } ) return selector diff --git a/python_modules/dagster/dagster/_core/instance/__init__.py b/python_modules/dagster/dagster/_core/instance/__init__.py index 8fec0e07392e1..73162ca0ac344 100644 --- a/python_modules/dagster/dagster/_core/instance/__init__.py +++ b/python_modules/dagster/dagster/_core/instance/__init__.py @@ -1461,7 +1461,9 @@ def create_run( check.opt_set_param(asset_selection, "asset_selection", of_type=AssetKey) check.opt_set_param(asset_check_selection, "asset_check_selection", of_type=AssetCheckKey) - if asset_selection is not None or asset_check_selection is not None: + # asset_selection gets coerced from [] to None, but asset_check_selection doesn't. We + # allow asset_check_selection to be [] when op_selection is set. + if asset_selection is not None or asset_check_selection: check.invariant( op_selection is None, "Cannot pass op_selection with either of asset_selection or asset_check_selection",