cli icon indicating copy to clipboard operation
cli copied to clipboard

The CLI crashes when I include the `model_serving_endpoints` resource

Open danielsteman opened this issue 1 year ago • 2 comments
trafficstars

Describe the issue

When I try to validate a bundle that deploys a model serving endpoint the CLI has a runtime error

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Paste this in the databricks.yml of an asset bundle:
bundle:
  name: my_project

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: ***

    resources:
      model_serving_endpoints:
        name: pd-model
        config:
          auto_capture_config:
            enabled: true
            catalog_name: "team_data"
            schema_name: "development"
            table_name_prefix: "inference_table_pd_model"

  prod:
    mode: production
    workspace:
      host: ***

      root_path: /Users/...
    run_as:
      user_name: ***
  1. Run databricks bundle validate
  2. See runtime error

Expected Behavior

I would expect the CLI to return warnings, errors or nothing. But not a runtime error without clear cause.

Actual Behavior

❯ databricks bundle validate
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x50 pc=0x104d289c8]

OS and CLI version

Please include the version of the CLI (eg: v0.1.2) and the operating system (eg: windows). You can run databricks --version to get the version of your Databricks CLI

❯ d -v Databricks CLI v0.221.1

MacOS 14.5

Is this a regression?

This is the first time I'm trying to deploy a model serving endpoint with an asset bundle

Debug Logs

Output logs if you run the command with debug logs enabled. Example: databricks clusters list --log-level=debug. Redact if needed

danielsteman avatar Jun 13 '24 12:06 danielsteman

The crash shouldn't happen, of course, but you're missing a level of indentation.

The endpoint needs a logical name, like this:

    resources:
      model_serving_endpoints:
        my_serving_endpoint:
          name: pd-model
          config:
            auto_capture_config:
              enabled: true
              catalog_name: "team_data"
              schema_name: "development"
              table_name_prefix: "inference_table_pd_model"

pietern avatar Jun 13 '24 12:06 pietern

Thanks that helps! I wasn't super confident that my yml spec was correct, hence the expected behavior I described.

danielsteman avatar Jun 13 '24 14:06 danielsteman

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Feb 04 '25 00:02 github-actions[bot]

Reopening - we should fix the crash or verify that it does not happe.

denik avatar Mar 06 '25 13:03 denik

@denik is it reproducible still? There was a fix related to this but for all resources https://github.com/databricks/cli/issues/1685

andrewnester avatar Mar 06 '25 15:03 andrewnester

I checked this config, there is no crash anymore.

~/work/cli/acceptance/bundle/issue1491 % cat databricks.yml
bundle:
  name: my_project

targets:
  dev:
    mode: development
    default: true

    resources:
      model_serving_endpoints:
        name: pd-model
        config:
          auto_capture_config:
            enabled: true
            catalog_name: "team_data"
            schema_name: "development"
            table_name_prefix: "inference_table_pd_model"

denik avatar Mar 06 '25 16:03 denik