diff --git a/python_modules/dagster-graphql/dagster_graphql_tests/client_tests/test_mutations.py b/python_modules/dagster-graphql/dagster_graphql_tests/client_tests/test_mutations.py --- a/python_modules/dagster-graphql/dagster_graphql_tests/client_tests/test_mutations.py +++ b/python_modules/dagster-graphql/dagster_graphql_tests/client_tests/test_mutations.py @@ -13,7 +13,10 @@ ReconstructablePipeline, get_ephemeral_repository_name, ) -from dagster.core.host_representation.handle import IN_PROCESS_NAME +from dagster.core.host_representation.handle import ( + IN_PROCESS_NAME, + get_default_repository_location_name, +) from dagster.core.instance import DagsterInstance from dagster.utils.hosted_user_process import create_in_process_ephemeral_workspace @@ -77,7 +80,9 @@ "runConfigData": {}, "mode": "default", "selector": { - "repositoryLocationName": get_ephemeral_repository_name(pipeline_name), + "repositoryLocationName": get_default_repository_location_name( + get_ephemeral_repository_name(pipeline_name) + ), "repositoryName": get_ephemeral_repository_name(pipeline_name), "pipelineName": pipeline_name, }, diff --git a/python_modules/dagster/dagster/core/host_representation/handle.py b/python_modules/dagster/dagster/core/host_representation/handle.py --- a/python_modules/dagster/dagster/core/host_representation/handle.py +++ b/python_modules/dagster/dagster/core/host_representation/handle.py @@ -35,6 +35,11 @@ ) +def get_default_repository_location_name(repo_name): + check.str_param(repo_name, "repo_name") + return repo_name + "_location" + + def _assign_python_env_location_name(repository_code_pointer_dict): check.dict_param( repository_code_pointer_dict, @@ -47,7 +52,7 @@ "If there is one than more repository you must provide a location name" ) - return next(iter(repository_code_pointer_dict.keys())) + return get_default_repository_location_name(next(iter(repository_code_pointer_dict.keys()))) # Which API the host process should use to communicate with the process diff --git a/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/hello_world_in_file/test_hello_world_in_file_workspace.py b/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/hello_world_in_file/test_hello_world_in_file_workspace.py --- a/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/hello_world_in_file/test_hello_world_in_file_workspace.py +++ b/python_modules/dagster/dagster_tests/cli_tests/workspace_tests/hello_world_in_file/test_hello_world_in_file_workspace.py @@ -22,7 +22,10 @@ ) as workspace: assert isinstance(workspace, Workspace) assert len(workspace.repository_location_handles) == 1 - assert workspace.repository_location_handles[0].location_name == "hello_world_repository" + assert ( + workspace.repository_location_handles[0].location_name + == "hello_world_repository_location" + ) @pytest.mark.parametrize( @@ -35,7 +38,10 @@ ) as workspace: assert isinstance(workspace, Workspace) assert len(workspace.repository_location_handles) == 1 - assert workspace.repository_location_handles[0].location_name == "hello_world_repository" + assert ( + workspace.repository_location_handles[0].location_name + == "hello_world_repository_location" + ) @pytest.mark.parametrize( @@ -47,7 +53,10 @@ ) as workspace: assert isinstance(workspace, Workspace) assert len(workspace.repository_location_handles) == 1 - assert workspace.repository_location_handles[0].location_name == "hello_world_repository" + assert ( + workspace.repository_location_handles[0].location_name + == "hello_world_repository_location" + ) @pytest.mark.parametrize(