Skip to content

Comments

Add support for models in direct deployment#3625

Merged
shreyas-goenka merged 10 commits intomainfrom
direct-model
Sep 29, 2025
Merged

Add support for models in direct deployment#3625
shreyas-goenka merged 10 commits intomainfrom
direct-model

Conversation

@shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Sep 18, 2025

Changes

This PR adds support for direct deployment for MLflow models, matching the existing Terraform behaviour today.

Why

To make direct deployments possible.

Tests

Test asserting that TF and direct behaviour match for all relevent fields.

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Sep 28, 2025

Run: 18083105839

Env ✅​pass 🔄​flaky 🙈​skip
🔄​ aws linux 313 2 531
✅​ aws windows 316 530
🔄​ aws-ucws linux 421 7 428
🔄​ aws-ucws windows 426 3 427
🔄​ azure linux 312 3 530
✅​ azure windows 316 529
✅​ azure-ucws linux 428 427
🔄​ azure-ucws windows 427 2 426
✅​ gcp linux 314 532
✅​ gcp windows 315 531
14 failing tests:
Test Name aws linux aws-ucws linux aws-ucws windows azure linux azure-ucws windows
TestAccept ✅​pass ✅​pass ✅​pass 🔄​flaky ✅​pass
TestAccept/bundle/deploy/files/no-snapshot-sync ✅​pass ✅​pass ✅​pass 🔄​flaky ✅​pass
TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=direct-exp ✅​pass ✅​pass ✅​pass 🔄​flaky ✅​pass
TestAccept/bundle/deploy/pipeline/auto-approve/DATABRICKS_BUNDLE_ENGINE=direct-exp ✅​pass ✅​pass ✅​pass ✅​pass 🔄​flaky
TestAccept/bundle/deploy/pipeline/auto-approve/DATABRICKS_BUNDLE_ENGINE=terraform ✅​pass ✅​pass ✅​pass ✅​pass 🔄​flaky
TestAccept/bundle/deployment/bind/job/job-spark-python-task ✅​pass 🔄​flaky ✅​pass ✅​pass ✅​pass
TestAccept/bundle/deployment/bind/model-serving-endpoint ✅​pass 🔄​flaky 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/deployment/bind/registered-model 🙈​skip 🔄​flaky 🔄​flaky 🙈​skip ✅​pass
TestAccept/bundle/deployment/bind/schema 🙈​skip 🔄​flaky 🔄​flaky 🙈​skip ✅​pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=no/PY=no 🔄​flaky ✅​pass ✅​pass ✅​pass ✅​pass
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=yes/PY=yes 🔄​flaky ✅​pass ✅​pass ✅​pass ✅​pass
TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_13.3_LTS 🙈​skip 🔄​flaky ✅​pass 🙈​skip ✅​pass
TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_14.3_LTS 🙈​skip 🔄​flaky ✅​pass 🙈​skip ✅​pass
TestSparkJarTaskDeployAndRunOnVolumes/Databricks_Runtime_15.4_LTS 🙈​skip 🔄​flaky ✅​pass 🙈​skip ✅​pass

@shreyas-goenka shreyas-goenka changed the title [wip] add support for models in direct deployment Add support for models in direct deployment Sep 29, 2025
Copy link
Contributor

@denik denik left a comment

Choose a reason for hiding this comment

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

Looks good, minor suggestion in testserver.


return Response{
Body: ml.GetModelResponse{
RegisteredModelDatabricks: &ml.ModelDatabricks{
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to store ml.ModelDatabricks in the state directly and then use MapGet() instead of custom method with remapping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but the benefit is marginal, so I'll skip it for now.

@shreyas-goenka shreyas-goenka added this pull request to the merge queue Sep 29, 2025
Merged via the queue into main with commit 4475762 Sep 29, 2025
13 checks passed
@shreyas-goenka shreyas-goenka deleted the direct-model branch September 29, 2025 13:06
>>> [CLI] bundle plan
update models.my_model

Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
Copy link
Contributor

Choose a reason for hiding this comment

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

the comments says "this should be a no-op" but the plan shows an update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We show a change even though field is annotated as skip right? I observed the same behaviour in models.

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed offline - TF does make a call but the call does not have "tags" in the request, so the request is essentially noop.

Direct should not make a request at all since the field is marked as 'skip', it's a bug that it does. Fixed in #3636

Copy link
Contributor

Choose a reason for hiding this comment

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

The json plan makes it more clear -- the field shows up but it's marked as skip and the whole resource is marked as skip.

{
  "plan": {
    "resources.models.my_model": {
      "action": "skip",
      "changes": {
        "local": {
          "tags": {
            "action": "skip"
          }
        }
      }
    }
  }
}

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