Skip to content

terraform_dabs_map: fix DABsPathToTerraform to skip wrapper for TF root-level fields#5621

Open
denik wants to merge 7 commits into
mainfrom
denik/fix-dabs-to-terraform-path
Open

terraform_dabs_map: fix DABsPathToTerraform to skip wrapper for TF root-level fields#5621
denik wants to merge 7 commits into
mainfrom
denik/fix-dabs-to-terraform-path

Conversation

@denik

@denik denik commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix DABsPathToTerraform to only prepends when necessary (based on list of fields), making it the true inverse of TerraformPathToDABs

Needed for #5399.

This pull request and its description were written by Isaac.

@github-actions

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @janniklasrose -- recent work in bundle/terraform_dabs_map/
  • @pietern -- recent work in bundle/terraform_dabs_map/

Eligible reviewers: @andrewnester, @anton-107, @lennartkats-db, @shreyas-goenka

Suggestions based on git history. See OWNERS for ownership rules.

@denik denik temporarily deployed to test-trigger-is June 16, 2026 18:09 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 16, 2026 18:09 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 0fdd7cc

Run: 27720747758

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 14 264 1010 6:34
🟨​ aws windows 7 14 266 1008 11:35
💚​ aws-ucws linux 7 14 360 924 5:59
💚​ aws-ucws windows 7 14 362 922 6:44
❌​ azure linux 2 1 1 16 264 1008 6:49
💚​ azure windows 1 16 269 1006 6:14
💚​ azure-ucws linux 1 16 365 920 78:36
💚​ azure-ucws windows 1 16 367 918 70:36
💚​ gcp linux 1 16 263 1011 5:33
💚​ gcp windows 1 16 265 1009 6:50
24 interesting tests: 14 SKIP, 7 KNOWN, 2 FAIL, 1 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/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/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 ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p
❌​ TestFetchRepositoryInfoAPI_FromRepo/root ✅​p ✅​p ✅​p ✅​p ❌​F ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFetchRepositoryInfoAPI_FromRepo/subdir ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
Top 22 slowest tests (at least 2 minutes):
duration env testname
72:15 azure-ucws linux TestSQLExecScalar
67:28 azure-ucws windows TestSQLExecScalar
4:47 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:46 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:14 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:13 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:23 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:20 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:16 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:12 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:05 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:03 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:03 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:59 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:55 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:54 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:51 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:44 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:42 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:31 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

denik added 5 commits June 16, 2026 18:12
…level TF fields

For postgres groups with a spec wrapper, DABsPathToTerraform was
unconditionally prepending "spec" to all paths. Root-level TF fields
(name, status.*, create_time, project_id, etc.) live outside the wrapper
and must not receive the prefix.

Extend the codegen to emit DABsToTerraformRootFields: for each wrapper
group, the set of first-level TF field names that are at the resource
root. DABsPathToTerraform now only prepends the wrapper when the path's
first segment is absent from that set.

Remove noRoundtrip: true from the affected translate_test.go cases; add
new roundtrip cases for project_id and name.

Co-authored-by: Isaac
…st.go

All TerraformPathToDABs test cases now round-trip correctly through
DABsPathToTerraform, so the field and its guard are no longer needed.

Co-authored-by: Isaac
TerraformPathToDABs should be idempotent: a DABs-format path passed
through a second time must come back unchanged. Assert this for every
non-error test case.

Co-authored-by: Isaac
Rebase onto main picked up the new databricks_postgres_role resource;
regenerate generated.go to include it.

Co-authored-by: Isaac
@denik denik force-pushed the denik/fix-dabs-to-terraform-path branch from 4ca0527 to c64a6f3 Compare June 17, 2026 01:14
@denik denik temporarily deployed to test-trigger-is June 17, 2026 01:15 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 17, 2026 01:15 — with GitHub Actions Inactive
Replace DABsToTerraformRootFields (exception-based: fields NOT under the
wrapper) with DABsToTerraformWrapperFields (positive: fields that ARE under
the wrapper). DABsPathToTerraform now prepends the wrapper only when the
first path segment appears in this set; unknown and root-level fields pass
through unchanged without requiring explicit enumeration.

Co-authored-by: Isaac
@denik denik temporarily deployed to test-trigger-is June 17, 2026 01:24 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 17, 2026 01:24 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 17, 2026 21:24 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is June 17, 2026 21:24 — 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.

2 participants