Skip to content

Expose computed volume_path during initialize#5550

Open
radakam wants to merge 18 commits into
mainfrom
volume-path-support
Open

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

Conversation

@radakam

@radakam radakam commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Changes

Adds a computed, read-only volume_path to resources.volumes.* so configs can use ${resources.volumes.<key>.volume_path} instead of hardcoding /Volumes/<catalog>/<schema>/<name> (#4233).

  • Volume.VolumePath (bundle:"readonly") + ComputeVolumePath().
  • InitializeVolumePaths mutator: computes the path, rejects a user-set value.
  • ResolveVolumePathReferencesOnlyResources mutator: resolves ${...volume_path} referrers.
  • extractReferences now gates references on the resource's state type (ripples through ExtractReferences, migrate/build_state.go).
  • Terraform: drop volume_path in convert_volume.go, remove from terraform_dabs_map.

Why

The path is fully determined by catalog_name/schema_name/name, so deriving it removes duplication and makes a reference depend on those components, not the volume itself. It's computed at initialize and never persisted (not sent to the API, dropped before Terraform apply), after PythonMutator since the PyDABs model doesn't declare it. Unresolved components are embedded and resolved later; a reference in a readonly field can't resolve against state, hence the extractReferences gating.

Tests

Unit: ComputeVolumePath, the two mutators, and extractReferences dropping the readonly field.
Acceptance: computed_volume_path and volume_path_contains_id (resolution at validate/deploy, both engines); volume_path_job_ref (job-parameter case, direct-only since the embedded creator_user_name is only known after deploy); set-volume-path (user-set value rejected).

@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: e552008

Run: 28191468169

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 13 240 1035 6:37
🟨​ aws windows 7 1 13 242 1033 8:43
💚​ aws-ucws linux 8 13 327 952 5:35
💚​ aws-ucws windows 8 13 329 950 5:41
💚​ azure linux 2 15 240 1034 4:35
💚​ azure windows 2 15 242 1032 5:01
💚​ azure-ucws linux 2 15 329 949 5:52
💚​ azure-ucws windows 2 15 331 947 4:49
💚​ gcp linux 2 15 239 1036 4:22
💚​ gcp windows 2 15 241 1034 4:50
21 interesting tests: 13 SKIP, 7 KNOWN, 1 RECOVERED
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/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_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/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:40 aws-ucws windows TestAccept
3:31 azure windows TestAccept
3:15 gcp windows TestAccept
3:11 azure-ucws windows TestAccept

@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 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
@radakam radakam marked this pull request as ready for review June 13, 2026 09:21
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

53 files changed
Suggested: @denik
Also eligible: @pietern, @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

/bundle/ - needs approval

14 files changed
Suggested: @denik
Also eligible: @pietern, @janniklasrose, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

Files: NEXT_CHANGELOG.md
Based on git history:

  • @denik -- recent work in bundle/direct/, bundle/config/mutator/, ./

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

radakam added 4 commits June 18, 2026 08:51
A volume component (catalog_name, schema_name, name) that cannot be
resolved locally is now embedded verbatim into volume_path as a ${...}
reference instead of suppressing the path. The embedded reference is
carried through ${resources.volumes.<key>.volume_path} interpolation and
resolved later by the engine during plan or deploy, like any other
resource reference.

Because volume_path is a readonly field that is dropped from state before
deploy, makePlan no longer treats a reference carried by such a field as a
dependency (the reference is still made available to readers during
initialize).
Rewrite unresolved_volume_path so an embedded ${...} reference in
volume_path is resolved at deploy rather than treated as an error: bar.name
comes from baz.id and foo.comment reads bar.volume_path, and the recorded
deploy requests confirm the path is fully interpolated. Update
non_existent_field output for the embedded-reference volume_path.
… trim comment

Rename the volume_path acceptance fixture to better reflect what it
covers, and shorten the explanatory comment in unresolved_volume_path.
The deploy order is deterministic via the dependency chain
(schema -> bar -> foo, since foo.comment references bar.storage_location),
so sorting only hid the ordering signal the test exists to verify.
@radakam radakam force-pushed the volume-path-support branch from 8918aa0 to d44f9f5 Compare June 18, 2026 08:58
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 08:58 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 18, 2026 08:58 — with GitHub Actions Inactive
# Conflicts:
#	NEXT_CHANGELOG.md
#	bundle/terraform_dabs_map/generated.go
@radakam radakam temporarily deployed to test-trigger-is June 22, 2026 12:41 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 22, 2026 12:41 — with GitHub Actions Inactive
Comment thread acceptance/bundle/resource_deps/volume_path_contains_id/script
Comment thread bundle/direct/bundle_plan.go Outdated
radakam added 3 commits June 25, 2026 08:09
Pass the resource's state type into extractReferences and drop references to
fields absent from state (e.g. volumes' computed volume_path) during the walk,
instead of post-filtering the combined refs map. Validating the structpath we
already build also avoids a string round-trip via structpath.ParsePath.

Also rename the acceptance test unresolved_volume_path -> volume_path_contains_id
and fix its script to invoke "$CLI bundle plan -o json".
Extend volume_path_job_ref so the volume's schema_name/name reference another
job's remote creator_user_name, so volume_path embeds an unresolved reference at
initialize that resolves at deploy. Add the same scenario as a no_drift
invariant config.
# Conflicts:
#	NEXT_CHANGELOG.md
#	bundle/direct/bundle_plan.go
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 08:52 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 08:52 — with GitHub Actions Inactive
Rewrite the state-type filter in extractReferences as a positive check to
satisfy the nilerr linter. Exclude the volume_path_job_ref invariant config
from the migrate and continue_293 suites: volume_path is unsupported by the
v0.293.0 seed CLI, and its embedded creator_user_name reference is not a
terraform-exported attribute. It remains covered by no_drift on direct.
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 11:04 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 11:04 — with GitHub Actions Inactive
…nt semantics

InitializeVolumePaths now rejects a user-provided volume_path instead of
silently overwriting the computed value, and ResolveVolumePathReferencesOnlyResources
errors when a referenced volume_path could not be computed rather than injecting
an empty string. Add a set-volume-path acceptance test for the rejection and
expand the changelog to document the deploy-ordering and Terraform-engine
caveats.
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 12:09 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 12:09 — with GitHub Actions Inactive
Update ExtractReferences doc to reflect state-type filtering of references,
correct the InitializeVolumePaths interpolation comment to point at the
resolver mutator, and note the run-exactly-once requirement.
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 12:43 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 12:43 — with GitHub Actions Inactive
radakam added 3 commits June 25, 2026 17:16
The remote-field embedding scenario (volume_path carrying an after-deploy
${...creator_user_name}) is only supported on the direct engine, which is
the default. Recording Terraform's provider-level failure as expected output
was brittle, so run this case on direct only and drop the stale Terraform
artifacts. Correct the changelog: ${...volume_path} references resolve on both
engines when components are known at initialize; only after-deploy components
are direct-only.
Resolve conflicts:
- resolve_variable_references.go: keep both allowPathFn (volume_path) and
  excludePaths (snapshot workspace paths) skip checks.
- invariant out.test.toml: regenerate; drops stale volume_path_job_ref and
  volume_uppercase_name entries that the single-condition excludes remove.
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 18:22 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is June 25, 2026 18:22 — 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.

3 participants