Skip to content

Use deployed name for synced database tables in bundle summary#5639

Open
ilyakuz-db wants to merge 1 commit into
mainfrom
fix/synced-table-summary-ref
Open

Use deployed name for synced database tables in bundle summary#5639
ilyakuz-db wants to merge 1 commit into
mainfrom
fix/synced-table-summary-ref

Conversation

@ilyakuz-db

@ilyakuz-db ilyakuz-db commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Changes

bundle summary now reports the deployed name and URL for a synced_database_tables resource whose configured name embeds another resource's name, instead of printing the raw ${resources...} reference.

For example:

resources:
  database_catalogs:
    my_catalog:
      name: my_catalog
  synced_database_tables:
    my_synced_table:
      name: ${resources.database_catalogs.my_catalog.name}.public.my_synced_table

Before (post-deploy summary):

  Synced database tables:
    my_synced_table:
      Name: ${resources.database_catalogs.my_catalog.name}.public.my_synced_table
      URL:  .../explore/data/$%7Bresources.database_catalogs.my_catalog.name%7D...

After:

  Synced database tables:
    my_synced_table:
      Name: my_catalog.public.my_synced_table
      URL:  .../explore/data/my_catalog.public.my_synced_table

The fix is in the resource itself: SyncedDatabaseTable.GetName() now prefers the post-deploy id (the deployed three-part name, which StateToBundle already loads from state) over the configured Name, and InitializeURL derives the URL from it and skips names that aren't a fully-resolved three-part identifier. This mirrors PostgresSyncedTable.GetName(), which already handles this exact case.

Why

A synced table's name embeds another resource's name via a ${resources...} reference. The resources prefix is intentionally not resolved into config during initialize (some such references are only known after deploy), so bundle summary (including the in-workspace Bundle resources view, which calls bundle summary) showed the raw reference and a broken percent-encoded URL.

The deployed name is already available — StateToBundle loads it into the resource id — so the resource just needs to prefer it for display, the same way PostgresSyncedTable does. Reading from state (rather than re-resolving against config) keeps the summary consistent with what was actually deployed.

Tests

  • Updated acceptance/bundle/resources/synced_database_tables/basic: post-deploy summary now shows the resolved name and URL (and the pre-deploy URL is omitted instead of percent-encoding an unresolved reference).
  • New unit tests TestSyncedDatabaseTableGetName / TestSyncedDatabaseTableInitializeURL cover preferring the deployed id and skipping the URL for an unresolved name.

@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 17, 2026 18:41 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 17, 2026 18:41 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db force-pushed the fix/synced-table-summary-ref branch from 63ca70e to 64ce952 Compare June 17, 2026 18:41
@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 17, 2026 18:41 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 17, 2026 18:41 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

Files: acceptance/bundle/resources/synced_database_tables/basic/out.summary.txt, acceptance/bundle/resources/synced_database_tables/basic/output.txt, acceptance/bundle/resources/synced_database_tables/basic/test.toml
Suggested: @janniklasrose
Also eligible: @denik, @pietern, @andrewnester, @anton-107, @shreyas-goenka, @lennartkats-db

/bundle/ - needs approval

Files: bundle/config/resources/synced_database_table.go, bundle/config/resources/synced_database_table_test.go
Suggested: @janniklasrose
Also eligible: @denik, @pietern, @andrewnester, @anton-107, @shreyas-goenka, @lennartkats-db

General files (require maintainer)

Files: NEXT_CHANGELOG.md
Based on git history:

  • @denik -- recent work in ./, bundle/config/resources/, acceptance/bundle/resources/synced_database_tables/basic/

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

Jobs:
foo:
Name: ${resources.jobs.变量.id}
Name: [NUMID]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add replace_ids.py to script so that instead of NUMID we have concrete replacement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new state-based approach is scoped to synced_database_tables, so it no longer changes job-name resolution — I reverted this unicode_reference change, so the replace_ids.py addition is no longer needed here.

Comment thread cmd/bundle/utils/process.go Outdated
// from the resolved names.
mutators = append(mutators,
mutator.ResolveResourceReferences(),
mutator.InitializeURLs(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach is a bit concerning because it introduces a completely different way to resolve $resources references.

One major difference is that it uses values from config not from the state. This could match but they can also be different if config is changed but not yet deployed.

There could also be other differences simply because it's a completely different approach to resolve these.

Let's explore looking up required fields from the state instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — reworked to read from state instead of resolving against config.

I dropped the config-based resolution entirely (reverted process.go and the resolve_variable_references changes). The fix is now scoped to the resource: SyncedDatabaseTable.GetName() prefers the post-deploy id over the configured Name, and InitializeURL derives the URL from it (skipping unresolved names). The id is the deployed three-part name that StateToBundle already loads from state, so summary reflects the deployed value and there is no new resolution path.

This mirrors PostgresSyncedTable.GetName(), which already handles exactly this case (its doc comment even calls out the ${resources.X.Y.Z} scenario).

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: dc900f6

Run: 27749486693

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 14 264 1010 6:59
🟨​ aws windows 7 14 266 1008 12:07
💚​ aws-ucws linux 7 14 360 924 6:42
💚​ aws-ucws windows 7 14 362 922 9:24
💚​ azure linux 1 16 267 1008 5:36
💚​ azure windows 1 16 269 1006 8:46
💚​ azure-ucws linux 1 16 365 920 7:07
💚​ azure-ucws windows 1 16 367 918 7:52
🔄​ gcp linux 1 1 16 262 1011 6:38
💚​ gcp windows 1 16 265 1009 8:45
22 interesting tests: 14 SKIP, 7 KNOWN, 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
🔄​ TestSyncEnsureRemotePathIsUsableIfRepoExists ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
Top 24 slowest tests (at least 2 minutes):
duration env testname
4:42 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:35 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:35 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:30 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:52 azure windows TestAccept
3:22 aws-ucws windows TestAccept
3:12 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:10 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08 gcp windows TestAccept
3:08 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:08 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:07 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:06 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:02 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:02 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:52 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:47 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:43 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:41 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:39 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:32 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:31 azure-ucws windows TestAccept
2:27 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:22 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

@ilyakuz-db ilyakuz-db force-pushed the fix/synced-table-summary-ref branch from 64ce952 to dc900f6 Compare June 18, 2026 09:16
@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 18, 2026 09:17 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db temporarily deployed to test-trigger-is June 18, 2026 09:17 — with GitHub Actions Inactive
@ilyakuz-db ilyakuz-db changed the title Resolve cross-resource references in bundle summary Use deployed name for synced database tables in bundle summary Jun 18, 2026
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