databricks-cli/internal
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
..
acc Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
build Make default dev semver a const (#891) 2023-10-19 18:56:54 +00:00
bundle Refactor library to artifact matching to not use pointers (#1172) 2024-02-05 15:29:45 +00:00
mocks Correctly overwrite local state if remote state is newer (#1008) 2023-11-24 11:15:46 +00:00
python Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
testdata Fix integration test asserting errors on unknown template parameters (#977) 2023-11-10 11:05:32 +00:00
testjsons Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
testutil Run tests to verify backend tag validation behavior (#814) 2023-09-29 08:38:06 +00:00
alerts_test.go Update alerts command integration test (#512) 2023-06-22 10:30:52 +02:00
api_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
clusters_test.go Do not generate prompts for certain commands (#438) 2023-06-05 19:38:45 +02:00
filer_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_cat_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_cp_test.go Fix windows style file paths in fs cp command (#1118) 2024-01-11 18:49:42 +00:00
fs_ls_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_mkdir_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_rm_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
git_clone_test.go Remove resolution of repo names against the Databricks Github account (#940) 2023-11-01 13:02:06 +00:00
helpers.go Make Cobra runner compatible with testing interactive flows (#957) 2023-11-07 19:06:27 +00:00
init_test.go Add short_name helper function to bundle init templates (#1167) 2024-02-01 16:46:07 +00:00
jobs_test.go Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
locker_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
repos_test.go Add provider detection to the repos create command (#528) 2023-06-27 14:17:13 +02:00
secrets_test.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
storage_credentials_test.go Fixed storage-credentials list command in text output (#1094) 2024-01-02 07:24:51 +00:00
sync_test.go Refactor change computation for sync (#785) 2023-10-03 13:47:46 +00:00
tags_test.go Run tests to verify backend tag validation behavior (#814) 2023-09-29 08:38:06 +00:00
version_test.go Use cmdio in version command for `--output` flag (#419) 2023-06-01 12:03:22 +02:00
workspace_test.go Add short_name helper function to bundle init templates (#1167) 2024-02-01 16:46:07 +00:00