databricks-cli/bundle/config/mutator
Pieter Noordhuis 9061635789
Default to forward slash-separated paths for path translation (#2145)
## Changes

This came up in #2122 where relative library paths showed up with
backslashes on Windows. It's hard to run acceptance tests where paths
may be in either form. This change updates path translation logic to
always use forward slash-separated paths, including for absolute paths.

## Tests

* Unit tests pass.
* Confirmed that code where library paths are used uses the `filepath`
package for path manipulation. The functions in this package always
normalize their inputs to be platform-native paths.
* Confirmed that code that uses absolute paths works with forward
slash-separated paths on Windows.
2025-01-17 09:38:01 +00:00
..
paths Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
python Add 'experimental/python' support (#2052) 2025-01-08 09:29:45 +00:00
apply_presets.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
apply_presets_test.go Handle `${workspace.file_path}` references in source-linked deployments (#2046) 2025-01-08 12:43:56 +00:00
apply_source_linked_deployment_preset.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
apply_source_linked_deployment_preset_test.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
capture_schema_dependency.go Patch references to UC schemas to capture dependencies automatically (#1989) 2025-01-16 13:27:00 +00:00
capture_schema_dependency_test.go Patch references to UC schemas to capture dependencies automatically (#1989) 2025-01-16 13:27:00 +00:00
compute_id_compat.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
compute_id_compate_test.go Added support for creating all-purpose clusters (#1698) 2024-09-23 10:42:34 +00:00
configure_dashboard_defaults.go Add support for AI/BI dashboards (#1743) 2024-10-29 09:11:08 +00:00
configure_dashboard_defaults_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
configure_volume_defaults.go Add default value for `volume_type` for DABs (#1952) 2024-12-04 11:05:54 +00:00
configure_volume_defaults_test.go Add default value for `volume_type` for DABs (#1952) 2024-12-04 11:05:54 +00:00
configure_wsfs.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00
configure_wsfs_test.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00
default_queueing.go Enable job queueing by default (#1385) 2024-04-22 10:36:39 +00:00
default_queueing_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
default_target.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
default_target_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
default_workspace_paths.go Add resource path field to bundle workspace configuration (#1800) 2024-10-02 13:55:40 +00:00
default_workspace_paths_test.go Add resource path field to bundle workspace configuration (#1800) 2024-10-02 13:55:40 +00:00
default_workspace_root.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
default_workspace_root_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
environments_compat.go Compare `.Kind()` instead of direct equality checks on a `dyn.Value` (#1520) 2024-06-27 13:28:19 +00:00
environments_compat_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
expand_pipeline_glob_paths.go Track multiple locations associated with a `dyn.Value` (#1510) 2024-07-16 11:27:27 +00:00
expand_pipeline_glob_paths_test.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
expand_workspace_root.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
expand_workspace_root_test.go Always prepend bundle remote paths with /Workspace (#1724) 2024-10-02 15:34:00 +00:00
initialize_urls.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
initialize_urls_test.go Add error checking in tests and enable errcheck there (#1980) 2024-12-09 13:56:41 +01:00
initialize_variables.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
initialize_variables_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
initialize_workspace_client.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
load_git_details.go Switch to `folders.FindDirWithLeaf` (#1963) 2024-12-11 09:44:22 +01:00
merge_apps.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
merge_apps_test.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
merge_job_clusters.go Compare `.Kind()` instead of direct equality checks on a `dyn.Value` (#1520) 2024-06-27 13:28:19 +00:00
merge_job_clusters_test.go Bump github.com/databricks/databricks-sdk-go from 0.36.0 to 0.37.0 (#1326) 2024-04-03 10:39:53 +00:00
merge_job_parameters.go Merge job parameters based on their name (#1659) 2024-08-06 16:12:18 +00:00
merge_job_parameters_test.go Merge job parameters based on their name (#1659) 2024-08-06 16:12:18 +00:00
merge_job_tasks.go Compare `.Kind()` instead of direct equality checks on a `dyn.Value` (#1520) 2024-06-27 13:28:19 +00:00
merge_job_tasks_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
merge_pipeline_clusters.go Compare `.Kind()` instead of direct equality checks on a `dyn.Value` (#1520) 2024-06-27 13:28:19 +00:00
merge_pipeline_clusters_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
mutator.go Move loadGitDetails mutator to Initialize phase (#1944) 2024-12-02 09:49:32 +00:00
noop.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
override_compute.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
override_compute_test.go Show an error when using a cluster override with 'mode: production' (#1994) 2024-12-11 14:57:31 +00:00
populate_current_user.go Move utility functions dealing with IAM to libs/iamutil (#1820) 2024-10-10 13:02:25 +00:00
populate_current_user_test.go Add short_name helper function to bundle init templates (#1167) 2024-02-01 16:46:07 +00:00
prepend_workspace_prefix.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
prepend_workspace_prefix_test.go Do not prepend paths starting with ~ or variable reference (#1905) 2024-11-15 15:03:59 +00:00
process_target_mode.go Encourage the use of root_path in production to ensure single deployment (#1712) 2025-01-13 12:19:12 +00:00
process_target_mode_test.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
resolve_resource_references.go Fix lost diags across different mutators (#2057) 2024-12-31 14:01:45 +00:00
resolve_resource_references_test.go Add error checking in tests and enable errcheck there (#1980) 2024-12-09 13:56:41 +01:00
resolve_variable_references.go Resolve variables in a loop (#2164) 2025-01-16 14:39:54 +00:00
resolve_variable_references_test.go Migrate TestResolveComplexVariableWithVarReference (#2156) 2025-01-15 17:52:17 +01:00
rewrite_sync_paths.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
rewrite_sync_paths_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
rewrite_workspace_prefix.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
rewrite_workspace_prefix_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
run_as.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
run_as_test.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
select_default_target.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
select_default_target_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
select_target.go Encourage the use of root_path in production to ensure single deployment (#1712) 2025-01-13 12:19:12 +00:00
select_target_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
set_variables.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
set_variables_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
sync_default_path.go Add paths field to bundle sync configuration (#1694) 2024-08-21 15:33:25 +00:00
sync_default_path_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
sync_infer_root.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
sync_infer_root_internal_test.go Add paths field to bundle sync configuration (#1694) 2024-08-21 15:33:25 +00:00
sync_infer_root_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
translate_paths.go Default to forward slash-separated paths for path translation (#2145) 2025-01-17 09:38:01 +00:00
translate_paths_apps.go Allow artifact path to be located outside the sync root (#2128) 2025-01-14 08:34:55 +00:00
translate_paths_apps_test.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
translate_paths_artifacts.go Allow artifact path to be located outside the sync root (#2128) 2025-01-14 08:34:55 +00:00
translate_paths_artifacts_test.go Default to forward slash-separated paths for path translation (#2145) 2025-01-17 09:38:01 +00:00
translate_paths_dashboards.go Allow artifact path to be located outside the sync root (#2128) 2025-01-14 08:34:55 +00:00
translate_paths_dashboards_test.go Default to forward slash-separated paths for path translation (#2145) 2025-01-17 09:38:01 +00:00
translate_paths_jobs.go Allow artifact path to be located outside the sync root (#2128) 2025-01-14 08:34:55 +00:00
translate_paths_pipelines.go Allow artifact path to be located outside the sync root (#2128) 2025-01-14 08:34:55 +00:00
translate_paths_test.go Default to forward slash-separated paths for path translation (#2145) 2025-01-17 09:38:01 +00:00
validate_git_details.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
validate_git_details_test.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00
verify_cli_version.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
verify_cli_version_test.go Ignore CLI version check on development builds of the CLI (#1714) 2024-08-23 10:13:21 +00:00