databricks-cli/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
..
artifacts Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
config Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
deploy Add "bundle summary" command (#1123) 2024-01-25 11:32:47 +00:00
deployer Fix locker unlock for destroy (#492) 2023-06-19 15:57:25 +02:00
env Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
internal Upgrade golang.org/x/crypto to v0.17.0 in internal module (#1110) 2024-01-10 13:53:01 +00:00
libraries Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
metadata Make `file_path` and `artifact_path` fields consistent with json tag (#987) 2023-11-15 13:37:26 +00:00
permissions Use MockWorkspaceClient from SDK instead of WithImpl mocking (#1134) 2024-01-19 14:12:58 +00:00
phases Set run_as permissions after variable interpolation (#1141) 2024-01-24 12:22:04 +00:00
python Use MockWorkspaceClient from SDK instead of WithImpl mocking (#1134) 2024-01-19 14:12:58 +00:00
run Support passing job parameters to bundle run (#1115) 2024-01-15 07:42:36 +00:00
schema Do not require positional arguments if they should be provided in JSON (#1125) 2024-01-17 10:53:50 +00:00
scripts Added exec.NewCommandExecutor to execute commands with correct interpreter (#1075) 2023-12-21 15:45:23 +00:00
tests Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
bundle.go Use MockWorkspaceClient from SDK instead of WithImpl mocking (#1134) 2024-01-19 14:12:58 +00:00
bundle_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
context.go Rename variable `bundle -> b` (#989) 2023-11-15 14:03:36 +00:00
context_test.go Add command that writes the materialized bundle configuration to stdout (#95) 2022-11-21 15:39:53 +01:00
deferred.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
deferred_test.go Rename variable `bundle -> b` (#989) 2023-11-15 14:03:36 +00:00
log_string.go Tune output of bundle deploy command (#1047) 2023-12-21 08:00:37 +00:00
mutator.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
mutator_test.go Rename variable `bundle -> b` (#989) 2023-11-15 14:03:36 +00:00
root.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
root_test.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
seq.go Added support for bundle.Seq, simplified Mutator.Apply interface (#403) 2023-05-24 14:45:19 +02:00
seq_test.go Rename variable `bundle -> b` (#989) 2023-11-15 14:03:36 +00:00