From b0c1c236307b19a7fa8df472756e48c3e8f47897 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Thu, 9 Jan 2025 23:49:34 +0530 Subject: [PATCH] Add `uuid` to builtin templates (#2088) ## Changes This is useful to track telemetry associated with the templates and can later be useful for functional usecases as well. Mlops stacks does the same here: https://github.com/databricks/mlops-stacks/pull/185 ## Tests Existing tests. --- integration/bundle/testdata/default_python/bundle_summary.txt | 3 ++- .../dbt-sql/template/{{.project_name}}/databricks.yml.tmpl | 1 + .../template/{{.project_name}}/databricks.yml.tmpl | 1 + .../default-sql/template/{{.project_name}}/databricks.yml.tmpl | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/integration/bundle/testdata/default_python/bundle_summary.txt b/integration/bundle/testdata/default_python/bundle_summary.txt index 3143d729c..a0bcfdbc8 100644 --- a/integration/bundle/testdata/default_python/bundle_summary.txt +++ b/integration/bundle/testdata/default_python/bundle_summary.txt @@ -15,7 +15,8 @@ "lock": { "enabled": false } - } + }, + "uuid": "" }, "include": [ "resources/project_name_$UNIQUE_PRJ.job.yml", diff --git a/libs/template/templates/dbt-sql/template/{{.project_name}}/databricks.yml.tmpl b/libs/template/templates/dbt-sql/template/{{.project_name}}/databricks.yml.tmpl index 5594749a9..ba336f6a1 100644 --- a/libs/template/templates/dbt-sql/template/{{.project_name}}/databricks.yml.tmpl +++ b/libs/template/templates/dbt-sql/template/{{.project_name}}/databricks.yml.tmpl @@ -3,6 +3,7 @@ # See https://docs.databricks.com/dev-tools/bundles/index.html for documentation. bundle: name: {{.project_name}} + uuid: {{bundle_uuid}} include: - resources/*.yml diff --git a/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl b/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl index c42b822a8..4d052e38e 100644 --- a/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl +++ b/libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl @@ -2,6 +2,7 @@ # See https://docs.databricks.com/dev-tools/bundles/index.html for documentation. bundle: name: {{.project_name}} + uuid: {{bundle_uuid}} include: - resources/*.yml diff --git a/libs/template/templates/default-sql/template/{{.project_name}}/databricks.yml.tmpl b/libs/template/templates/default-sql/template/{{.project_name}}/databricks.yml.tmpl index 51d03e99a..84e07df17 100644 --- a/libs/template/templates/default-sql/template/{{.project_name}}/databricks.yml.tmpl +++ b/libs/template/templates/default-sql/template/{{.project_name}}/databricks.yml.tmpl @@ -2,6 +2,7 @@ # See https://docs.databricks.com/dev-tools/bundles/index.html for documentation. bundle: name: {{.project_name}} + uuid: {{bundle_uuid}} include: - resources/*.yml