databricks-cli/internal/bundle
Pieter Noordhuis 33c446dadd
Refactor library to artifact matching to not use pointers (#1172)
## 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 #1098 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
..
bundles Added `databricks bundle generate job` command (#1043) 2024-01-17 14:26:33 +00:00
artifacts_test.go Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
deploy_then_remove_resources_test.go Make bundle deploy work if no resources are defined (#767) 2023-09-13 22:50:37 +00:00
empty_bundle_test.go Make bundle deploy work if no resources are defined (#767) 2023-09-13 22:50:37 +00:00
generate_job_test.go Add `--key` flag for generate commands to specify resource key (#1165) 2024-01-31 10:23:35 +00:00
generate_pipeline_test.go Add `--key` flag for generate commands to specify resource key (#1165) 2024-01-31 10:23:35 +00:00
helpers.go Pass parameters to task when run with `--python-params` and `python_wheel_wrapper` is true (#1037) 2023-12-01 10:35:20 +00:00
job_metadata_test.go Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
local_state_staleness_test.go Correctly overwrite local state if remote state is newer (#1008) 2023-11-24 11:15:46 +00:00
python_wheel_test.go Pass parameters to task when run with `--python-params` and `python_wheel_wrapper` is true (#1037) 2023-12-01 10:35:20 +00:00