Repository navigation
Use .workspace.URL for the host in built-in templates - #7350
pavloKozlov wants to merge 4 commits into
Conversation
abf32b2 to
d6dcf5e
Compare
|
Commit: Regression test reportSelected 20 changed tests (limit=20, 8 not selected) 24 tests: regression=22 unreleased=0 coverage=2 failing=0
TestAccept/bundle/templates-machinery/workspace_variable/input/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates-machinery/workspace_variable/input/DMS=true: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates-machinery/workspace_variable/runtime/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates-machinery/workspace_variable/runtime/DMS=true: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/dbt-sql-classic/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/dbt-sql/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-minimal/extra-workspace-input/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-minimal/profiles/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-minimal/python/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-minimal/skip/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-minimal/sql/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-python/classic/DMS=/READPLAN=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-python/classic/DMS=/READPLAN=1: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): TestAccept/bundle/templates/default-python/serverless-customcatalog/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-python/serverless/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-scala-classic/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) TestAccept/bundle/templates/default-scala/DMS=: branch ✅ | main (c0e1859) ❌ | latest (v1.24.0) ❌main (c0e1859): latest (v1.24.0): same output as main (c0e1859) 5 more failure details omitted, see the full report in the run. |
b931f85 to
5f2f6db
Compare
d6dcf5e to
e702534
Compare
Integration test reportCommit: c6c9291
Top 3 slowest tests (at least 2 minutes):
|
e64ff0e to
825b44d
Compare
Built-in templates, except dbt-sql, write the workspace URL to workspace.host. It has ?w=<id> when the profile or an environment variable sets the workspace ID. Other profiles keep the same host as before. The value is quoted so the YAML stays valid for any URL. Template schemas keep workspace_host. Co-authored-by: Isaac <no-reply@databricks.com>
The welcome messages showed workspace_host, which has no workspace ID. They now show the URL that the bundle uses, so they match workspace.host in the generated databricks.yml. Messages that printed "workspace_host:" now print "workspace_url:". Co-authored-by: Isaac <no-reply@databricks.com>
The bundle host now comes from .workspace.URL like in the other built-in templates. dbt jobs get their host from Databricks, so they are not affected. The dbt profile default uses .workspace.Hostname, which gives the same value as stripping the scheme from workspace_host. No built-in template uses workspace_host now. Co-authored-by: Isaac <no-reply@databricks.com>
The dbt profile default no longer has the port of the test server. Databricks hosts don't have an explicit port, so for them the default is the same as before. Co-authored-by: Isaac <no-reply@databricks.com>
825b44d to
c6c9291
Compare
Stacked on #7349.
Changes
Built-in templates write
host: "{{.workspace.URL}}"instead of{{workspace_host}}, and their welcome messages show the same URL. With a profile that setsworkspace_id, the host gets?w=<id>. Other profiles keep the same host as before, now quoted so the YAML stays valid for any URL. Indbt-sql, the dbt profile default uses.workspace.Hostname. It has no port, which is the same as before for Databricks hosts. No built-in template usesworkspace_hostnow.Why
On a host shared by several workspaces, the bundle needs the workspace ID in the host to deploy to the right workspace. dbt jobs get their host from Databricks, so the new bundle host doesn't reach dbt.
Tests
A new acceptance test creates a bundle with a profile without
workspace_idand with one that has it, then validates it with strict profile matching and deploys it. Another one checks that a config file with an extraworkspacekey still works. The other template outputs change only by the added quotes and the welcome message label.This pull request and its description were written by Isaac.