예제 #1
0
def test_external_partitions_config_error_grpc():
    with get_bar_repo_handle() as repository_handle:
        with pytest.raises(DagsterUserCodeProcessError):
            sync_get_external_partition_config_grpc(
                repository_handle.repository_location.client,
                repository_handle,
                "error_partition_config",
                "c",
            )
def test_external_partitions_config_error_grpc(instance):
    with get_bar_repo_repository_location(instance) as repository_location:
        repository_handle = repository_location.get_repository(
            "bar_repo").handle

        with pytest.raises(DagsterUserCodeProcessError):
            sync_get_external_partition_config_grpc(
                repository_location.client,
                repository_handle,
                "error_partition_config",
                "c",
            )
def test_external_partitions_config_grpc():
    repository_handle = get_bar_repo_handle()
    data = sync_get_external_partition_config_grpc(repository_handle,
                                                   'baz_partitions', 'c')
    assert isinstance(data, ExternalPartitionConfigData)
    assert data.run_config
    assert data.run_config['solids']['do_input']['inputs']['x']['value'] == 'c'
예제 #4
0
    def get_external_partition_config(self, repository_handle, partition_set_name, partition_name):
        check.inst_param(repository_handle, "repository_handle", RepositoryHandle)
        check.str_param(partition_set_name, "partition_set_name")
        check.str_param(partition_name, "partition_name")

        return sync_get_external_partition_config_grpc(
            self._handle.client, repository_handle, partition_set_name, partition_name
        )
def test_external_partitions_config_error_grpc():
    repository_handle = get_bar_grpc_repo_handle()
    error = sync_get_external_partition_config_grpc(
        repository_handle.repository_location_handle.client,
        repository_handle,
        'error_partition_config',
        'c',
    )
    assert isinstance(error, ExternalPartitionExecutionErrorData)
예제 #6
0
def test_external_partitions_config_error_grpc():
    with get_bar_grpc_repo_handle() as repository_handle:
        error = sync_get_external_partition_config_grpc(
            repository_handle.repository_location_handle.client,
            repository_handle,
            "error_partition_config",
            "c",
        )
        assert isinstance(error, ExternalPartitionExecutionErrorData)
예제 #7
0
    def get_external_partition_config(
        self, repository_handle: RepositoryHandle, partition_set_name: str, partition_name: str
    ) -> "ExternalPartitionConfigData":
        check.inst_param(repository_handle, "repository_handle", RepositoryHandle)
        check.str_param(partition_set_name, "partition_set_name")
        check.str_param(partition_name, "partition_name")

        return sync_get_external_partition_config_grpc(
            self.client, repository_handle, partition_set_name, partition_name
        )
예제 #8
0
def test_external_partitions_config_grpc():
    with get_bar_repo_handle() as repository_handle:
        data = sync_get_external_partition_config_grpc(
            repository_handle.repository_location.client,
            repository_handle,
            "baz_partitions",
            "c",
        )
        assert isinstance(data, ExternalPartitionConfigData)
        assert data.run_config
        assert data.run_config["solids"]["do_input"]["inputs"]["x"]["value"] == "c"