databricks-cli/libs/filer
Pieter Noordhuis 75b09ff230
Use `filer.Filer` to write template instantiation (#1911)
## Changes

Prior to this change, the output directory was part of the `renderer`
type and passed down to every `file` it produced. Every file knew its
absolute destination path. This is incompatible with the use of a filer,
where all operations are automatically anchored to some base path.

To make this compatible, this change updates:
* the `file` type to only know its own path relative to the instantiation root,
* the `renderer` type to no longer require or pass along the output directory,
* the `persistToDisk` function to take a context and filer argument,
* the `filer.WriteMode` to represent permission bits

## Tests

* Existing tests pass.
* Manually confirmed template initialization works as expected.
2024-11-20 11:11:31 +01:00
..
completer Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
dbfs_client.go Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
fake_filer.go Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
fake_filer_test.go Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
filer.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
filer_test.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
files_client.go [Fix] Do not buffer files in memory when downloading (#1599) 2024-07-17 07:14:02 +00:00
fs.go Add fs.FS adapter for the filer interface (#422) 2023-06-02 12:49:59 +00:00
fs_test.go Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
local_client.go Use `filer.Filer` to write template instantiation (#1911) 2024-11-20 11:11:31 +01:00
local_root_path.go Remove unnecessary `filepath.FromSlash` calls (#1458) 2024-05-29 15:30:26 +00:00
local_root_path_test.go Make local files default for fs commands (#506) 2023-06-23 16:07:09 +02:00
slice.go Upgraded Go version to 1.21 (#664) 2023-08-15 13:50:40 +00:00
slice_test.go Abstract over file handling with WSFS or DBFS through filer interface (#135) 2022-12-14 15:37:14 +01:00
workspace_files_cache.go Implement readahead cache for Workspace API calls (#1582) 2024-07-18 09:45:10 +00:00
workspace_files_cache_test.go Add tests for the Workspace API readahead cache (#1605) 2024-07-19 07:03:25 +00:00
workspace_files_client.go Show actionable errors for collaborative deployment scenarios (#1386) 2024-10-10 11:18:23 +00:00
workspace_files_client_test.go Move bespoke status call to main workspace files filer (#1570) 2024-07-05 11:32:29 +00:00
workspace_files_extensions_client.go Fix workspace extensions filer accidentally reading notebooks (#1891) 2024-11-18 17:25:24 +00:00
workspace_files_extensions_client_test.go Add support for non-Python ipynb notebooks to DABs (#1827) 2024-11-13 21:39:51 +00:00
workspace_root_path.go Make local files default for fs commands (#506) 2023-06-23 16:07:09 +02:00
workspace_root_path_test.go Make local files default for fs commands (#506) 2023-06-23 16:07:09 +02:00