databricks-cli/bundle/tests
Pieter Noordhuis 33c446dadd
Refactor library to artifact matching to not use pointers ()
## Changes

The approach to do this was:
1. Iterate over all libraries in all job tasks
2. Find references to local libraries
3. Store pointer to `compute.Library` in the matching artifact file to
signal it should be uploaded

This breaks down when introducing  because we can no longer track
unexported state across mutators. The approach in this PR performs the
path matching twice; once in the matching mutator where we check if each
referenced file has an artifacts section, and once during artifact
upload to rewrite the library path from a local file reference to an
absolute Databricks path.

## Tests

Integration tests pass.
2024-02-05 15:29:45 +00:00
..
autoload_git Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
basic First look for databricks.yml before falling back to bundle.yml () 2023-07-18 12:16:34 +02:00
bundle Refactor library to artifact matching to not use pointers () 2024-02-05 15:29:45 +00:00
bundle_permissions Added support for top-level permissions () 2023-11-13 11:29:40 +00:00
conflicting_resource_ids Require include glob patterns to be explicitly defined () 2023-07-25 10:00:46 +02:00
environment_overrides Confirm that override with a zero value doesn't work () 2023-08-16 11:28:57 +00:00
environments_autoload_git Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
environments_job_and_pipeline Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
environments_override_job_cluster Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
git_branch_validation Fix bundle git branch validation () 2023-08-07 17:29:02 +00:00
include_default Require include glob patterns to be explicitly defined () 2023-07-25 10:00:46 +02:00
include_invalid First look for databricks.yml before falling back to bundle.yml () 2023-07-18 12:16:34 +02:00
include_multiple Require include glob patterns to be explicitly defined () 2023-07-25 10:00:46 +02:00
include_with_glob First look for databricks.yml before falling back to bundle.yml () 2023-07-18 12:16:34 +02:00
interpolation First look for databricks.yml before falling back to bundle.yml () 2023-07-18 12:16:34 +02:00
interpolation_target Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
job_and_pipeline Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
job_with_spark_conf Test existing behavior when loading non-string spark conf values () 2023-12-18 11:22:22 +00:00
model_serving_endpoint Support Model Serving Endpoints in bundles () 2023-09-07 21:54:31 +00:00
override_job_cluster Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
override_job_tasks Enable environment overrides for job tasks () 2023-09-18 14:13:50 +00:00
override_pipeline_cluster Enable target overrides for pipeline clusters () 2023-09-21 19:21:20 +00:00
override_sync Allow target overrides for sync section () 2023-10-10 15:18:18 +00:00
override_sync_no_root Allow target overrides for sync section () 2023-10-10 15:18:18 +00:00
registered_model Support Unity Catalog Registered Models in bundles () 2023-10-16 15:32:49 +00:00
relative_path_with_includes Make resource and artifact paths in bundle config relative to config folder () 2023-09-04 09:55:01 +00:00
run_as Added run_as section for bundle configuration () 2023-08-23 16:47:07 +00:00
target_empty Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
target_overrides Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
variables Fixed instance pool resolving by name () 2024-01-05 10:50:53 +00:00
yaml_anchors First look for databricks.yml before falling back to bundle.yml () 2023-07-18 12:16:34 +02:00
README.md Move mutator interface to top level bundle package () 2022-11-28 10:59:43 +01:00
basic_test.go Move mutator interface to top level bundle package () 2022-11-28 10:59:43 +01:00
bundle_permissions_test.go Added support for top-level permissions () 2023-11-13 11:29:40 +00:00
conflicting_resource_ids_test.go Log the bundle root configuration file if applicable () 2023-08-11 12:28:05 +00:00
environment_git_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
environment_overrides_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
environments_job_and_pipeline_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
environments_override_job_cluster_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
git_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
include_test.go Log the bundle root configuration file if applicable () 2023-08-11 12:28:05 +00:00
interpolation_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
job_and_pipeline_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
job_with_spark_conf_test.go Test existing behavior when loading non-string spark conf values () 2023-12-18 11:22:22 +00:00
loader.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
model_serving_endpoint_test.go Support Model Serving Endpoints in bundles () 2023-09-07 21:54:31 +00:00
override_job_cluster_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
override_job_tasks_test.go Enable environment overrides for job tasks () 2023-09-18 14:13:50 +00:00
override_pipeline_cluster_test.go Enable target overrides for pipeline clusters () 2023-09-21 19:21:20 +00:00
override_sync_test.go Allow target overrides for sync section () 2023-10-10 15:18:18 +00:00
registered_model_test.go Support Unity Catalog Registered Models in bundles () 2023-10-16 15:32:49 +00:00
relative_path_with_includes_test.go Make resource and artifact paths in bundle config relative to config folder () 2023-09-04 09:55:01 +00:00
run_as_test.go Added run_as section for bundle configuration () 2023-08-23 16:47:07 +00:00
suggest_target_test.go List available targets when incorrect target passed () 2023-09-08 15:37:55 +00:00
target_empty_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
target_overrides_test.go Renamed `environments` to `targets` in bundle configuration () 2023-08-17 15:22:32 +00:00
variables_test.go Fixed instance pool resolving by name () 2024-01-05 10:50:53 +00:00
yaml_anchors_test.go Revert "Rename jobs -> workflows" () 2022-12-01 22:39:15 +01:00

README.md

Bundle configuration tests

Every test here uses an example bundle configuration. Each bundle configuration is located in a dedicated subdirectory.