Skip to content

Conversation

@benc-db
Copy link
Collaborator

@benc-db benc-db commented Dec 18, 2025

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

  • I have run this code in development and it appears to resolve the stated issue
  • 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.

- 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
@benc-db benc-db requested a review from ericj-db as a code owner December 18, 2025 17:51
@benc-db benc-db changed the title Fix serverless Python model environment version configuration (#1277) fix: Serverless Python model environment version configuration (#1277) Dec 18, 2025
@benc-db benc-db requested a review from sd-db December 18, 2025 17:51
@github-actions
Copy link

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

@benc-db benc-db deployed to azure-prod January 8, 2026 21:48 — with GitHub Actions Active
@benc-db benc-db merged commit 4878f56 into main Jan 9, 2026
10 checks passed
@benc-db benc-db deleted the environment_investigation branch January 9, 2026 17:11
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.

Defining Serverless version for notebook jobs

3 participants