databricks / cli

Databricks CLI
Other
148 stars 56 forks source link

Make fileset take optional list of paths to list #1684

Closed pietern closed 3 months ago

pietern commented 3 months ago

Changes

Before this change, the fileset library would take a single root path and list all files in it. To support an allowlist of paths to list (much like a Git pathspec without patterns; see pathspec), this change introduces an optional argument to fileset.New where the caller can specify paths to list. If not specified, this argument defaults to list . (i.e. list all files in the root).

The motivation for this change is that we wish to expose this pattern in bundles. Users should be able to specify which paths to synchronize instead of always only synchronizing the bundle root directory.

Tests

New and existing unit tests.