Open tommi1hirvonen opened 2 weeks ago
I've looked at the source code and compared the combination of PipelinesApiClient
and PipelinesList
to JobsApiClient
and JobList
. This issue is not present with jobs, i.e. fetching an empty list of jobs works as expected.
To me, a consistent solution would be to initialize PipelinesList.Pipelines
as an empty list in the constructor, same as in JobList
.
Would you be open to a community contribution/PR? 🙂
When fetching pipelines from a Databricks workspace that doesn't contain any pipelines,
PipelinesApiClient.ListPageable()
throwsArgumentNullException
because thePipelines
property inPipelinesList
is null.This can also be a source of surprise when using
PipelinesApiClient.List()
, since the propertyIEnumerable<Pipeline> Pipelines
in the returnedPipelinesList
is null rather than an empty sequence.I think
ListPageable()
should definitely not throw when there are no pipelines, and I also think most people would expectList()
to return an empty sequence inPipelinesList
rather than null.