Skip to content

acc: Fix mlops-stacks deploy test for upstream stacks_version 0.5#5929

Merged
shreyas-goenka merged 1 commit into
mainfrom
fix-mlops-stacks-test
Jul 15, 2026
Merged

acc: Fix mlops-stacks deploy test for upstream stacks_version 0.5#5929
shreyas-goenka merged 1 commit into
mainfrom
fix-mlops-stacks-test

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Why

The bundle/deploy/mlops-stacks acceptance test deploys the upstream MLOps Stacks template end-to-end, so upstream template changes can break it. Upstream bumped to stacks_version 0.5, which reworked the scaffold:

  • The input_include_models_in_unity_catalog toggle was removed — the model is now always registered in Unity Catalog (resources.registered_models instead of the legacy resources.models).
  • Jobs now run on serverless compute by default.

The old test failed in every nightly env: the golden still expected the legacy models resource (and stale warning line numbers), and bundle deploy could no longer create the UC model or serverless jobs on the test workspaces.

What

Fix the test forward to match the new template:

  • Drop the removed input_include_models_in_unity_catalog option from the init config.
  • The template hard-codes the model's schema name to the project name, so the schema must exist before deploy. Create it in the shared main catalog and deploy with --var catalog_name=main — mirroring the main-catalog + schema-$UNIQUE_NAME convention already used by other cloud UC acceptance tests. Drop the schema in cleanup.
  • Read the model id from resources.registered_models.model in the summary assertion.
  • Gate the test with RequiresUnityCatalog = true so it skips on the non-UC cloud envs (which have no metastore) instead of failing with METASTORE_DOES_NOT_EXIST.

Tests

Verified end-to-end on the real nightly UC + serverless env aws-prod-ucws — both engine variants pass and produce identical output:

--- PASS: TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct (28.93s)
--- PASS: TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform (41.75s)

The full deploy → assert batch-inference job → destroy → drop-schema cycle completes cleanly with no leaked resources. Test-only change, so no changelog fragment (per pr-checklist).

This pull request and its description were written by Isaac.

The upstream MLOps Stacks template bumped to stacks_version 0.5, which
dropped the non-UC path: the model is now always registered in Unity
Catalog (resources.registered_models instead of resources.models) and
jobs run on serverless compute by default. The old test failed in every
nightly env — the golden still expected the legacy models resource, and
`bundle deploy` could not create the UC model or serverless jobs.

Fix the test forward to match the new template:

- Drop the removed input_include_models_in_unity_catalog option from the
  init config.
- Create the model's schema (hard-coded to the project name by the
  template) in the shared "main" catalog before deploy and drop it in
  cleanup, then deploy with --var catalog_name=main. This mirrors the
  main-catalog + schema-$UNIQUE_NAME convention used by other cloud UC
  acceptance tests.
- Read the model id from resources.registered_models.model in the summary
  assertion.
- Gate the test with RequiresUnityCatalog=true so it skips on the non-UC
  cloud envs (which have no metastore) instead of failing.

Verified end-to-end on a UC + serverless workspace: both the terraform
and direct engine variants deploy, assert the batch inference job, and
destroy cleanly, producing the regenerated golden output.

Co-authored-by: Isaac
@shreyas-goenka shreyas-goenka force-pushed the fix-mlops-stacks-test branch from 9f61e16 to 604bb45 Compare July 15, 2026 10:20
@shreyas-goenka shreyas-goenka changed the title acc: Snooze mlops-stacks deploy test after upstream stacks_version 0.5 acc: Fix mlops-stacks deploy test for upstream stacks_version 0.5 Jul 15, 2026
@shreyas-goenka shreyas-goenka marked this pull request as ready for review July 15, 2026 10:36
Comment on lines +37 to +39
trace $CLI bundle summary --var catalog_name=main
trace $CLI bundle validate --var catalog_name=main
trace $CLI bundle deploy --var catalog_name=main

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.

nit: consider test.toml with env BUNDLE_VAR_catalog_name="main" to avoid all the --var in various places in this script

@shreyas-goenka shreyas-goenka merged commit 006392e into main Jul 15, 2026
29 checks passed
@shreyas-goenka shreyas-goenka deleted the fix-mlops-stacks-test branch July 15, 2026 10:59
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