Skip to content

Commit aebb9e4

Browse files
authored
[Python] Show experimental-jobs-as-code template (#2729)
## Changes Show `experimental-jobs-as-code` template in `bundle init` list ## Tests Existing acceptance tests
1 parent 6f0c079 commit aebb9e4

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

acceptance/bundle/help/bundle-init/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ TEMPLATE_PATH optionally specifies which template to use. It can be one of the f
77
- default-sql: The default SQL template for .sql files that run with Databricks SQL
88
- dbt-sql: The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)
99
- mlops-stacks: The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)
10+
- experimental-jobs-as-code: Jobs as code template (experimental)
1011
- a local file system path with a template directory
1112
- a Git repository URL, e.g. https://github.com/my/repository
1213

acceptance/bundle/templates/experimental-jobs-as-code/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please refer to the README.md file for "getting started" instructions.
1010
See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
1111

1212
>>> [CLI] bundle validate -t dev --output json
13-
Warning: Ignoring Databricks CLI version constraint for development build. Required: >= 0.238.0, current: [DEV_VERSION]
13+
Warning: Ignoring Databricks CLI version constraint for development build. Required: >= 0.248.0, current: [DEV_VERSION]
1414

1515
{
1616
"jobs": {

acceptance/bundle/templates/experimental-jobs-as-code/output/my_jobs_as_code/databricks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bundle:
44
name: my_jobs_as_code
55
uuid: [UUID]
6-
databricks_cli_version: ">= 0.238.0"
6+
databricks_cli_version: ">= 0.248.0"
77

88
experimental:
99
python:

libs/template/template.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ var databricksTemplates = []Template{
6868
},
6969
{
7070
name: ExperimentalJobsAsCode,
71-
hidden: true,
7271
description: "Jobs as code template (experimental)",
7372
Reader: &builtinReader{name: string(ExperimentalJobsAsCode)},
7473
Writer: &writerWithFullTelemetry{defaultWriter: defaultWriter{name: ExperimentalJobsAsCode}},

libs/template/template_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ func TestTemplateHelpDescriptions(t *testing.T) {
1111
expected := `- default-python: The default Python template for Notebooks / Delta Live Tables / Workflows
1212
- default-sql: The default SQL template for .sql files that run with Databricks SQL
1313
- dbt-sql: The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)
14-
- mlops-stacks: The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)`
14+
- mlops-stacks: The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)
15+
- experimental-jobs-as-code: Jobs as code template (experimental)`
1516
assert.Equal(t, expected, HelpDescriptions())
1617
}
1718

@@ -21,6 +22,7 @@ func TestTemplateOptions(t *testing.T) {
2122
{Name: "default-sql", Id: "The default SQL template for .sql files that run with Databricks SQL"},
2223
{Name: "dbt-sql", Id: "The dbt SQL template (databricks.com/blog/delivering-cost-effective-data-real-time-dbt-and-databricks)"},
2324
{Name: "mlops-stacks", Id: "The Databricks MLOps Stacks template (github.com/databricks/mlops-stacks)"},
25+
{Name: "experimental-jobs-as-code", Id: "Jobs as code template (experimental)"},
2426
{Name: "custom...", Id: "Bring your own template"},
2527
}
2628
assert.Equal(t, expected, options())

libs/template/templates/experimental-jobs-as-code/template/{{.project_name}}/databricks.yml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bundle:
44
name: {{.project_name}}
55
uuid: {{bundle_uuid}}
6-
databricks_cli_version: ">= 0.238.0"
6+
databricks_cli_version: ">= 0.248.0"
77

88
experimental:
99
python:

0 commit comments

Comments
 (0)