Skip to content

Expose computed volume_path during initialize#5550

Draft
radakam wants to merge 3 commits into
mainfrom
volume-path-support
Draft

Expose computed volume_path during initialize#5550
radakam wants to merge 3 commits into
mainfrom
volume-path-support

Conversation

@radakam

@radakam radakam commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Changes

Expose a computed, read-only volume_path on resources.volumes.* so configs can reference a volume's UC path (/Volumes/{catalog}/{schema}/{name}) via ${resources.volumes.<key>.volume_path} instead of hardcoding it.

  • Add Volume.VolumePath (bundle:"readonly") + ComputeVolumePath(), which only builds the path when catalog_name, schema_name, and name are fully resolved.
  • New InitializeVolumePaths mutator: computes volume_path, resolving ${resources.catalogs/schemas...name} locally for the computation only — the original references are preserved in config so validate/plan are unchanged.
  • New ResolveVolumePathReferencesOnlyResources mutator: resolves only resources.volumes.*.volume_path references and skips everything else.
  • Wire both into Initialize after PythonMutator (computed/read-only field not exposed to PyDABs, like the deployment metadata).
  • Drop volume_path before Terraform conversion (API-computed) and mark it alwaysSkip in config sync.

Why

Addresses DECO-26236 and fixes #4233.

Users had to hardcode /Volumes/<catalog>/<schema>/<name> wherever they referenced a bundle-managed volume, duplicating config and breaking when the catalog/schema/name changes. A symbolic volume_path keeps references consistent with the definition.

Tests

  • Unit: ComputeVolumePath (resolved vs. unresolved/malformed ${...}), InitializeVolumePaths, volume-path-only resolution, and the Terraform drop.
  • Acceptance:
    • resource_deps/remote_field_volume_pathcomment: ${resources.volumes.bar.volume_path} resolves to the computed path while the original schema_name reference is preserved.
    • resource_deps/volume_path_job_ref — a job referencing volume_path.
    • resource_deps/unresolved_volume_pathvolume_path is not set when components stay unresolved.
    • Updated volume edge cases (volumes/change-comment, change-name, change-schema-name) and bad_syntax/non_existent_field reference outputs.

@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:16 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:16 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:32 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:32 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:54 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 12:54 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 13:00 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 13:00 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 7eba8b8

Run: 27414617814

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 15 264 976 8:23
🟨​ aws windows 7 2 15 264 974 27:13
💚​ aws-ucws linux 7 15 360 890 14:23
💚​ aws-ucws windows 7 15 362 888 15:12
💚​ azure linux 1 17 267 974 6:50
💚​ azure windows 1 17 269 972 12:35
💚​ azure-ucws linux 1 17 365 886 8:35
💚​ azure-ucws windows 1 17 367 884 11:35
💚​ gcp linux 1 17 263 977 6:55
💚​ gcp windows 1 17 265 975 13:51
24 interesting tests: 15 SKIP, 7 KNOWN, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/apps/inline_config ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 33 slowest tests (at least 2 minutes):
duration env testname
6:33 gcp windows TestAccept
6:24 azure windows TestAccept
6:23 aws-ucws windows TestAccept
5:10 azure-ucws windows TestAccept
4:55 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:44 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:01 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:00 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:50 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:31 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:24 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:01 aws-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=terraform
2:59 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:57 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:56 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:55 azure linux TestAccept
2:51 gcp linux TestAccept
2:51 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:49 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:48 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:47 aws-ucws linux TestAccept
2:47 azure-ucws linux TestAccept
2:42 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:36 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:35 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:34 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:32 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:32 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:31 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:25 aws-ucws linux TestAccept/bundle/resources/jobs/shared-root-path/DATABRICKS_BUNDLE_ENGINE=direct
2:20 aws-ucws linux TestAccept/bundle/generate/auto-bind/DATABRICKS_BUNDLE_ENGINE=terraform
2:19 aws-ucws linux TestAccept/bundle/run_as/job_default/DATABRICKS_BUNDLE_ENGINE=direct
2:17 aws-ucws linux TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=direct

@radakam radakam force-pushed the volume-path-support branch from 6211576 to 0399701 Compare June 11, 2026 14:34
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 14:35 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 14:35 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 20:00 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 11, 2026 20:00 — with GitHub Actions Inactive
@radakam radakam changed the title [Bundle] Expose computed volume_path during initialize Expose computed volume_path during initialize Jun 11, 2026
@radakam radakam force-pushed the volume-path-support branch from 3aa9504 to b30a845 Compare June 12, 2026 08:44
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 08:45 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 08:45 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 08:53 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 08:53 — with GitHub Actions Inactive
@radakam radakam force-pushed the volume-path-support branch from 2827a4e to a240d86 Compare June 12, 2026 11:05
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 11:06 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 11:06 — with GitHub Actions Inactive
radakam added 2 commits June 12, 2026 11:31
Add a computed, read-only volume_path field to volume resources, set to
the Unity Catalog path /Volumes/{catalog}/{schema}/{name} during the
initialize phase. This enables other resources to reference
${resources.volumes.<key>.volume_path}.

- InitializeVolumePaths resolves catalog_name/schema_name/name references
  locally to compute the path without mutating the original references, so
  validate and plan keep showing the references.
- volume_path is only set when catalog, schema, and name resolve to
  concrete values; unresolved or malformed references leave it empty.
- Computation runs after PythonMutator: volume_path is a computed field the
  PyDABs Volume model does not declare, so it must not be exposed to Python.
Cover behaviors the initial volume_path change did not exercise:

- unresolved_volume_path: a volume whose name is only known at deploy
  cannot have volume_path computed at plan time, so a reference to it
  resolves to an empty string (no error). Documented as known badness.
- volume_path_job_ref: the motivating use case from #4233, a job
  parameter referencing ${resources.volumes.<key>.volume_path}.
- Unit test for resolving a reference to an unset volume_path on an
  existing volume (resolves to empty rather than erroring).
@radakam radakam force-pushed the volume-path-support branch from a240d86 to 3334a23 Compare June 12, 2026 11:52
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 11:52 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 11:52 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 12:06 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 12, 2026 12:06 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

volumes: volume_path field is not available

2 participants