Skip to content

Commit 1dd6ea6

Browse files
authored
acc: Fixed test output for dashboard and jobs URLs (#3144)
## Changes Fixed test output for dashboard and jobs URLs ## Why Integration tests are failing with ``` - "url": "[DATABRICKS_URL]/dashboardsv3/[ALPHANUMID]/published?o=[NUMID]", + "url": "[DATABRICKS_URL]/dashboardsv3/[ALPHANUMID]/published", ``` and ``` - "url": "[DATABRICKS_URL]/jobs/[NUMID]?o=[NUMID]" + "url": "[DATABRICKS_URL]/jobs/[NUMID]" ``` We only started to track this output on Cloud runs in this PR https://github.com/databricks/cli/pull/3130/files and it was failing from the start. So it's not a change in our code or backend which lead to the diff. Likely `?o=` is omitted on the cloud runs because orgId is already included in workspace URL and hence `?o=` not added https://github.com/databricks/cli/blob/cf1495663458afc1b12649505ffb00e62f794974/bundle/config/mutator/initialize_urls.go#L47-L58 ## Tests Covered with existing tests <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent eb098d5 commit 1dd6ea6

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

acceptance/bundle/deploy/dashboard/detect-change/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Deployment complete!
3535
"id": "[ALPHANUMID]",
3636
"parent_path": "/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/resources",
3737
"permissions": [],
38-
"url": "[DATABRICKS_URL]/dashboardsv3/[ALPHANUMID]/published?o=[NUMID]",
38+
"url": "[DATABRICKS_URL]/dashboardsv3/[ALPHANUMID]/published",
3939
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]"
4040
}
4141

acceptance/bundle/deploy/dashboard/detect-change/test.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ MSYS_NO_PATHCONV = "1"
1414
[[Repls]]
1515
Old = "[0-9a-z]{16,}"
1616
New = "[ALPHANUMID]"
17+
18+
[[Repls]]
19+
# clean up ?o=<num> suffix after URL since not all workspaces have that
20+
Old = '\?o=\[(NUMBER|NUMID)\]'
21+
New = ''
22+
Order = 1000

acceptance/bundle/deploy/jobs/check-metadata/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Deployment complete!
6767
"task_key": "my_notebook_task"
6868
}
6969
],
70-
"url": "[DATABRICKS_URL]/jobs/[NUMID]?o=[NUMID]"
70+
"url": "[DATABRICKS_URL]/jobs/[NUMID]"
7171
}
7272

7373
=== Assert job 1 is created

acceptance/bundle/deploy/jobs/check-metadata/test.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ Ignore = [
1414
# C:/Program Files/Git/Users/$username/UNIQUE_NAME before passing it to the CLI
1515
# Setting this environment variable prevents that conversion on windows.
1616
MSYS_NO_PATHCONV = "1"
17+
18+
[[Repls]]
19+
# clean up ?o=<num> suffix after URL since not all workspaces have that
20+
Old = '\?o=\[(NUMBER|NUMID)\]'
21+
New = ''
22+
Order = 1000

0 commit comments

Comments
 (0)