Skip to content

Commit e54dfe5

Browse files
Update templates to use serverless environment version 4 and matching Python version (#3897)
## Changes This updates templates to serverless environment version 4 and associated Python versions Some considerations: * Client version 4, client version 5 (upcoming), DBR 16, DBR 17 all use Python 3.12 * DB Connect 15 supports all DBR versions above and supports Python 3.12 * DB Connect 15 also supports DBR 15, which uses Python 3.11 at runtime, but that discrepancy already exists and seems okay * Pinning Python to a very narrow range in pyproject.toml means users always need to use uv to install the right version, which may not be great for usability. so I haven't change that approach either ## Why * Environment version 4 provides better startup performance and new features ## Tests * Standard acceptance testing --------- Co-authored-by: Claude <[email protected]>
1 parent eb2a2f7 commit e54dfe5

File tree

19 files changed

+55
-23
lines changed

19 files changed

+55
-23
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Dependency updates
1010

1111
### Bundles
12+
* Update templates to use serverless environment version 4 and matching Python version ([#3897](https://github.com/databricks/cli/pull/3897))
1213
* Add a language prompt to the `default-minimal` template ([#3918](https://github.com/databricks/cli/pull/3918))
1314
* Add `default-scala` template for Scala projects with SBT build configuration and example code ([#3906](https://github.com/databricks/cli/pull/3906))
1415

acceptance/bundle/templates/dbt-sql/output/my_dbt_sql/resources/my_dbt_sql.job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ resources:
2929
environments:
3030
- environment_key: default
3131
spec:
32-
environment_version: "2"
32+
environment_version: "4"
3333
dependencies:
3434
- dbt-databricks>=1.8.0,<2.0.0

acceptance/bundle/templates/default-python/classic/out.compare-vs-serverless.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
- environments:
5252
- - environment_key: default
5353
- spec:
54-
- environment_version: "2"
54+
- environment_version: "4"
5555
- dependencies:
5656
- # By default we just include the .whl file generated for the my_default_python package.
5757
- # See https://docs.databricks.com/dev-tools/bundles/library-dependencies.html

acceptance/bundle/templates/default-python/classic/output/my_default_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "my_default_python"
33
version = "0.0.1"
44
authors = [{ name = "[USERNAME]" }]
5-
requires-python = ">=3.10,<=3.13"
5+
requires-python = ">=3.10,<3.13"
66
dependencies = [
77
# Any dependencies for jobs and pipelines in this project can be added here
88
# See also https://docs.databricks.com/dev-tools/bundles/library-dependencies

acceptance/bundle/templates/default-python/classic/output/my_default_python/src/sample_notebook.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"dependencies": [
7373
"--editable .."
7474
],
75-
"environment_version": "2"
75+
"environment_version": "4"
7676
},
7777
"language": "python",
7878
"notebookMetadata": {
@@ -141,7 +141,7 @@
141141
},
142142
"language_info": {
143143
"name": "python",
144-
"version": "3.11.4"
144+
"version": "3.12"
145145
}
146146
},
147147
"nbformat": 4,

acceptance/bundle/templates/default-python/serverless/output/my_default_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "my_default_python"
33
version = "0.0.1"
44
authors = [{ name = "[USERNAME]" }]
5-
requires-python = ">=3.10,<=3.13"
5+
requires-python = ">=3.10,<3.13"
66
dependencies = [
77
# Any dependencies for jobs and pipelines in this project can be added here
88
# See also https://docs.databricks.com/dev-tools/bundles/library-dependencies

acceptance/bundle/templates/default-python/serverless/output/my_default_python/resources/sample_job.job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ resources:
4646
environments:
4747
- environment_key: default
4848
spec:
49-
environment_version: "2"
49+
environment_version: "4"
5050
dependencies:
5151
# By default we just include the .whl file generated for the my_default_python package.
5252
# See https://docs.databricks.com/dev-tools/bundles/library-dependencies.html

acceptance/bundle/templates/default-python/serverless/output/my_default_python/src/sample_notebook.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"dependencies": [
7373
"--editable .."
7474
],
75-
"environment_version": "2"
75+
"environment_version": "4"
7676
},
7777
"language": "python",
7878
"notebookMetadata": {
@@ -141,7 +141,7 @@
141141
},
142142
"language_info": {
143143
"name": "python",
144-
"version": "3.11.4"
144+
"version": "3.12"
145145
}
146146
},
147147
"nbformat": 4,

acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "my_lakeflow_pipelines"
33
version = "0.0.1"
44
authors = [{ name = "[USERNAME]" }]
5-
requires-python = ">=3.10,<=3.13"
5+
requires-python = ">=3.10,<3.13"
66
dependencies = [
77
# Any dependencies for jobs and pipelines in this project can be added here
88
# See also https://docs.databricks.com/dev-tools/bundles/library-dependencies

acceptance/bundle/templates/lakeflow-pipelines/python/output/my_lakeflow_pipelines/resources/sample_job.job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ resources:
2929
environments:
3030
- environment_key: default
3131
spec:
32-
environment_version: "2"
32+
environment_version: "4"

0 commit comments

Comments
 (0)