Skip to content

Extend implicit dependency detection to all UC resources#4854

Open
shreyas-goenka wants to merge 9 commits intomainfrom
fix-implicit-dependency-check
Open

Extend implicit dependency detection to all UC resources#4854
shreyas-goenka wants to merge 9 commits intomainfrom
fix-implicit-dependency-check

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

@shreyas-goenka shreyas-goenka commented Mar 26, 2026

Summary

  • Add implicit dependency detection for registered models (schema_name and catalog_name resolved to ${resources.schemas/catalogs.<key>.name})
  • Add implicit catalog dependency detection for volumes (previously only schema was resolved)
  • Add implicit dependency detection for quality monitors (output_schema_name compound field resolved)
  • Add implicit dependency detection for model serving endpoints (both ai_gateway.inference_table_config and config.auto_capture_config)
  • Fix ordering bug in CaptureSchemaDependency.Apply(): schemas are now resolved last so that findSchema can still match against original schema.CatalogName values before resolveSchema mutates them

Test plan

  • 10 unit tests (4 existing + 6 new) covering all resource types
  • 4 new acceptance tests (implicit_deps_volume, implicit_deps_registered_model, implicit_deps_quality_monitor, implicit_deps_model_serving_endpoint) passing with both terraform and direct engines
  • Existing tests unaffected

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented Mar 26, 2026

Commit: 2988339

Run: 23610057960

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 7 10 270 809 6:12
💚​ aws windows 7 10 272 807 4:45
💚​ aws-ucws linux 7 10 366 725 11:43
💚​ aws-ucws windows 7 10 368 723 10:32
💚​ azure linux 1 12 273 807 6:59
💚​ azure windows 1 12 275 805 5:40
💚​ azure-ucws linux 1 12 371 721 11:02
💚​ azure-ucws windows 1 12 373 719 10:37
💚​ gcp linux 1 12 269 810 6:36
💚​ gcp windows 1 12 271 808 7:36
17 interesting tests: 10 SKIP, 7 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 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​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/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/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
Top 20 slowest tests (at least 2 minutes):
duration env testname
5:23 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
5:07 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:52 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:15 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:04 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:38 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:28 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:20 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:20 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:59 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:46 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:46 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:43 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:43 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:40 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:33 azure-ucws 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:17 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform

@shreyas-goenka shreyas-goenka changed the title Extend implicit dependency detection to registered models and volume catalogs Extend implicit dependency detection to all UC resources Mar 26, 2026
@shreyas-goenka shreyas-goenka force-pushed the fix-implicit-dependency-check branch from 31bdd4b to fe0119c Compare March 26, 2026 17:22
@shreyas-goenka shreyas-goenka marked this pull request as ready for review March 26, 2026 17:35
@github-actions
Copy link
Copy Markdown

Suggested reviewers

Based on git history of the changed files, these people are best suited to review:

  • @denik -- recent work in bundle/config/mutator/resourcemutator/, acceptance/bundle/resources/grants/registered_models/

Confidence: high

Eligible reviewers

Based on CODEOWNERS, these people or teams could also review:

@andrewnester, @anton-107, @pietern, @simonfaltum

Suggestions based on git history of 26 changed files (4 scored). See CODEOWNERS for path-specific ownership rules.

…catalogs

The CaptureSchemaDependency mutator now captures implicit dependencies for:
- Registered models: both schema_name and catalog_name are resolved
- Volumes: catalog_name is now also resolved (schema_name was already handled)

Also fixes an ordering bug where resolveSchema modified schema.CatalogName
before volumes/pipelines could use it for findSchema lookups. Schemas are
now resolved last in Apply().

Co-authored-by: Isaac
…ing endpoints

Extends CaptureSchemaDependency to also resolve:
- Quality monitors: OutputSchemaName (compound "catalog.schema" format)
- Model serving endpoints: AiGateway.InferenceTableConfig and
  Config.AutoCaptureConfig catalog/schema references

Co-authored-by: Isaac
The old name was too narrow — the mutator now resolves both schema and
catalog references across all UC resource types, not just schema
dependencies.

Co-authored-by: Isaac
- Extract resolveSchema() and resolveCatalog() helpers that return the
  resolved value (or the original if no match), eliminating duplicated
  find-then-set logic across every resource type.
- Inline nil checks and field assignments directly in Apply() instead of
  separate per-resource functions, reducing indirection.
- Group findSchema/findCatalog together with resolveSchema/resolveCatalog
  for better locality.

Co-authored-by: Isaac
Pipelines have a Catalog field that was used to look up schemas but was
never itself resolved to an explicit ${resources.catalogs.<key>.name}
reference.

Co-authored-by: Isaac
@shreyas-goenka shreyas-goenka force-pushed the fix-implicit-dependency-check branch from b41583e to 90ec9c5 Compare March 26, 2026 17:37
@shreyas-goenka shreyas-goenka force-pushed the fix-implicit-dependency-check branch from 90ec9c5 to 4ad29e3 Compare March 26, 2026 17:41
The CaptureUCDependencies mutator correctly resolves volume catalog
and schema references, fixing the previously tracked Badness.

Co-authored-by: Isaac
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