Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAB cannot create mlflow model: Missing required field: tag value when targets is development mode #922

Closed
Hydrugion opened this issue Oct 26, 2023 · 4 comments · Fixed by #1230
Assignees
Labels
Bug Something isn't working DABs DABs related issues

Comments

@Hydrugion
Copy link

Hydrugion commented Oct 26, 2023

Databricks CLI version

$ databricks -v                    
Databricks CLI v0.208.2

Bug reproduction

When deploying a model resource to a target with development mode, the automatic tagging mechanism added a tag that does not comply to Databricks create model API and caused the following error

$ databricks bundle deploy

Starting upload of bundle files
Uploaded bundle files at /Users/<redacted>/.bundle/test-dab/dev/files!

Starting resource deployment
Error: terraform apply: exit status 1                                       
                                                                            
Error: cannot create mlflow model: Missing required field: tag value        
                                                                            
  with databricks_mlflow_model.test_model,                                  
  on bundle.tf.json line 22, in resource.databricks_mlflow_model.test_model:
  22:       } 

File databricks.yml

bundle:
  name: test-dab

targets:
  dev:
    mode: development
    default: true

resources:
  models:
    test_model:
      name: test-model

File bundle.tf.json output from databricks bundle validate

{
  "terraform": {
    "required_providers": {
      "databricks": {
        "source": "databricks/databricks",
        "version": "1.28.0"
      }
    }
  },
  "provider": {
    "databricks": {}
  },
  "resource": {
    "databricks_mlflow_model": {
      "test_model": {
        "name": "[dev <redacted>] test-model",
        "tags": [
          {
            "key": "dev"
          }
        ]
      }
    }
  }
}

From the file we can observe that the tags "key": "dev" does not have a value that caused the error. For production mode there is no automatic tag added so no error is raised.

@andrewnester andrewnester added Bug Something isn't working DABs DABs related issues labels Oct 26, 2023
@mabreuortega
Copy link

Seeing this error too

@Hydrugion
Copy link
Author

is this being updated?

@andrewnester andrewnester self-assigned this Nov 17, 2023
@andrewnester
Copy link
Contributor

The team is looking at the fix for the issue, we will update the ticket with any new information / fixes as we go

github-merge-queue bot pushed a commit that referenced this issue Feb 22, 2024
## Changes
Fixes #922

## Tests
Added regression test case
@andrewnester
Copy link
Contributor

The fix is merged and will be released in the next CLI release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working DABs DABs related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants