databricks-cli/bundle/phases
shreyas-goenka f2bba632cb
Patch references to UC schemas to capture dependencies automatically (#1989)
## Changes
Fixes https://github.com/databricks/cli/issues/1977.  

This PR modifies the bundle configuration to capture the dependency that
a UC Volume or a DLT pipeline might have on a UC schema at deployment
time. It does so by replacing the schema name with a reference of the
form `${resources.schemas.foo.name}`.

For example:
The following UC Volume definition depends on the UC schema with the
name `schema_name`. This mutator converts this configuration

from:
```
resources:
  volumes:
    bar:
      catalog_name: catalog_name
      name: volume_name
      schema_name: schema_name

  schemas:
    foo:
      catalog_name: catalog_name
      name: schema_name
```

to:

```
resources:
  volumes:
    bar:
      catalog_name: catalog_name
      name: volume_name
      schema_name: ${resources.schemas.foo.name}`

  schemas:
    foo:
      catalog_name: catalog_name
      name: schema_name
```


## Tests
Unit tests and manually.
2025-01-16 13:27:00 +00:00
..
bind.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
build.go Split artifact cleanup into prepare step before build (#1618) 2024-07-24 09:13:49 +00:00
deploy.go Added output message to warn about slower deployments with apps (#2161) 2025-01-16 11:39:59 +00:00
deploy_test.go Add DABs support for Unity Catalog volumes (#1762) 2024-12-02 21:18:07 +00:00
destroy.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
initialize.go Patch references to UC schemas to capture dependencies automatically (#1989) 2025-01-16 13:27:00 +00:00
load.go Load bundle configuration from mutator (#1318) 2024-03-27 10:49:05 +00:00
phase.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00