From fae1b6742dfc173ac27847e99e40e7f7171eb8be Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 27 Nov 2024 12:51:08 +0100 Subject: [PATCH] Update target references to use `${bundle.target}` (#1935) ## Changes The built-in template contains a reference to `${bundle.environment}`. This property has been deprecated in favor of `${bundle.target}` a long time ago (#670), so we should no longer emit it. The environment field will continue to be usable until we cut a new major version in some far away future. ## Tests * Unit tests * The test `TestInterpolationWithTarget` still covers correct interpolation of `${bundle.environment}` --- bundle/tests/python_wheel/python_wheel/bundle.yml | 2 +- bundle/tests/python_wheel/python_wheel_dbfs_lib/bundle.yml | 2 +- bundle/tests/python_wheel/python_wheel_multiple/bundle.yml | 2 +- bundle/tests/python_wheel/python_wheel_no_artifact/bundle.yml | 2 +- .../python_wheel/python_wheel_no_artifact_no_setup/bundle.yml | 2 +- .../python_wheel/python_wheel_no_artifact_notebook/bundle.yml | 2 +- bundle/tests/python_wheel/python_wheel_no_build/bundle.yml | 2 +- .../resources/{{.project_name}}.pipeline.yml.tmpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bundle/tests/python_wheel/python_wheel/bundle.yml b/bundle/tests/python_wheel/python_wheel/bundle.yml index c82ff83f..017fe1c4 100644 --- a/bundle/tests/python_wheel/python_wheel/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel/bundle.yml @@ -10,7 +10,7 @@ artifacts: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-132531-5opeqon1" diff --git a/bundle/tests/python_wheel/python_wheel_dbfs_lib/bundle.yml b/bundle/tests/python_wheel/python_wheel_dbfs_lib/bundle.yml index 07f4957b..fe2723aa 100644 --- a/bundle/tests/python_wheel/python_wheel_dbfs_lib/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_dbfs_lib/bundle.yml @@ -4,7 +4,7 @@ bundle: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-132531-5opeqon1" diff --git a/bundle/tests/python_wheel/python_wheel_multiple/bundle.yml b/bundle/tests/python_wheel/python_wheel_multiple/bundle.yml index 6964c58a..77011041 100644 --- a/bundle/tests/python_wheel/python_wheel_multiple/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_multiple/bundle.yml @@ -14,7 +14,7 @@ artifacts: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-132531-5opeqon1" diff --git a/bundle/tests/python_wheel/python_wheel_no_artifact/bundle.yml b/bundle/tests/python_wheel/python_wheel_no_artifact/bundle.yml index 88cb47be..d1d0a4db 100644 --- a/bundle/tests/python_wheel/python_wheel_no_artifact/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_no_artifact/bundle.yml @@ -4,7 +4,7 @@ bundle: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-aaaaa-bbbbbb" diff --git a/bundle/tests/python_wheel/python_wheel_no_artifact_no_setup/bundle.yml b/bundle/tests/python_wheel/python_wheel_no_artifact_no_setup/bundle.yml index d0308430..948bf155 100644 --- a/bundle/tests/python_wheel/python_wheel_no_artifact_no_setup/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_no_artifact_no_setup/bundle.yml @@ -7,7 +7,7 @@ workspace: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-aaaaa-bbbbbb" diff --git a/bundle/tests/python_wheel/python_wheel_no_artifact_notebook/bundle.yml b/bundle/tests/python_wheel/python_wheel_no_artifact_notebook/bundle.yml index 93e4e691..77fd6ad9 100644 --- a/bundle/tests/python_wheel/python_wheel_no_artifact_notebook/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_no_artifact_notebook/bundle.yml @@ -4,7 +4,7 @@ bundle: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-aaaaa-bbbbbb" diff --git a/bundle/tests/python_wheel/python_wheel_no_build/bundle.yml b/bundle/tests/python_wheel/python_wheel_no_build/bundle.yml index 91b8b155..e10e3993 100644 --- a/bundle/tests/python_wheel/python_wheel_no_build/bundle.yml +++ b/bundle/tests/python_wheel/python_wheel_no_build/bundle.yml @@ -4,7 +4,7 @@ bundle: resources: jobs: test_job: - name: "[${bundle.environment}] My Wheel Job" + name: "[${bundle.target}] My Wheel Job" tasks: - task_key: TestTask existing_cluster_id: "0717-132531-5opeqon1" diff --git a/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}.pipeline.yml.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}.pipeline.yml.tmpl index 1c6b8607..50f11fe2 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}.pipeline.yml.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/resources/{{.project_name}}.pipeline.yml.tmpl @@ -9,7 +9,7 @@ resources: {{- else}} catalog: {{default_catalog}} {{- end}} - target: {{.project_name}}_${bundle.environment} + target: {{.project_name}}_${bundle.target} libraries: - notebook: path: ../src/dlt_pipeline.ipynb