dbt-databricks icon indicating copy to clipboard operation
dbt-databricks copied to clipboard

fix: Serverless Python model environment version configuration (#1277)

Open benc-db opened this issue 3 weeks ago • 1 comments

Resolves #1277

Description

  • Replace deprecated 'client' field with 'environment_version' in environment spec for serverless Python models
  • Add JobEnvironment SDK object conversion in api_client.py to fix 'dict object has no attribute as_dict' error
  • Enable TestServerlessClusterWithEnvironment functional test (was previously skipped as 'not available in Databricks yet')
  • Add unit tests for environment_version usage and user-provided environments override behavior
  • Users can now specify custom environment versions via python_job_config.environments

Checklist

  • [x] I have run this code in development and it appears to resolve the stated issue
  • [x] This PR includes tests, or tests are not required/relevant for this PR
  • [ ] I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

benc-db avatar Dec 18 '25 17:12 benc-db

Coverage report

Click to see where and how coverage changed
FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  dbt/adapters/databricks
  api_client.py 536
  dbt/adapters/databricks/python_models
  python_submissions.py
Project Total  

This report was generated by python-coverage-comment-action

github-actions[bot] avatar Dec 18 '25 18:12 github-actions[bot]