Skip to content

Commit ecebde4

Browse files
authored
Skip integration tests with legacy dashboard creation as it is deprecated (#4009)
## Changes Skip integration tests with legacy dashboard creation as it is deprecated. Skipping until we can work with product team and enable it only for Labs workspaces ### Tests - [x] modify integration tests
1 parent bb89679 commit ecebde4

File tree

10 files changed

+25
-3
lines changed

10 files changed

+25
-3
lines changed

src/databricks/labs/ucx/source_code/known.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11417,6 +11417,9 @@
1141711417
"mypy-extensions": {
1141811418
"mypy_extensions": []
1141911419
},
11420+
"mypy_extensions": {
11421+
"mypy_extensions": []
11422+
},
1142011423
"namex": {
1142111424
"namex": [],
1142211425
"namex.convert": [],
@@ -33847,4 +33850,4 @@
3384733850
"zipp.glob": []
3384833851
},
3384933852
"zstd": {}
33850-
}
33853+
}

tests/integration/assessment/test_dashboards.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
)
1010

1111

12+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
1213
def test_redash_dashboard_crawler_crawls_dashboards(ws, make_dashboard, inventory_schema, sql_backend) -> None:
1314
dashboard: SdkRedashDashboard = make_dashboard()
1415
crawler = RedashDashboardCrawler(ws, sql_backend, inventory_schema)
@@ -19,6 +20,7 @@ def test_redash_dashboard_crawler_crawls_dashboards(ws, make_dashboard, inventor
1920
assert dashboard.id in {d.id for d in dashboards}, f"Missing dashboard: {dashboard.id}"
2021

2122

23+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
2224
def test_redash_dashboard_crawler_crawls_dashboard(ws, make_dashboard, inventory_schema, sql_backend) -> None:
2325
dashboard: SdkRedashDashboard = make_dashboard()
2426
assert dashboard.id
@@ -30,6 +32,7 @@ def test_redash_dashboard_crawler_crawls_dashboard(ws, make_dashboard, inventory
3032
assert dashboards == [Dashboard.from_sdk_redash_dashboard(dashboard)]
3133

3234

35+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
3336
def test_redash_dashboard_crawler_crawls_dashboards_with_debug_listing_upper_limit(
3437
ws, make_dashboard, inventory_schema, sql_backend
3538
) -> None:

tests/integration/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,9 @@ def make_linting_resources(self) -> None:
631631
self.make_job(content="spark.table('old.stuff')")
632632
self.make_job(content="spark.read.parquet('dbfs://mnt/file/')", task_type=SparkPythonTask)
633633
self.make_job(content="spark.table('some.table')", task_type=SparkPythonTask)
634-
query_1 = self.make_query(sql_query="SELECT * from parquet.`dbfs://mnt/foo2/bar2`")
635-
self.make_dashboard(query=query_1)
634+
635+
# TODO: Removed because of deprecation of Legacy Dashboard creation
636+
636637
self.make_lakeview_dashboard(query="SELECT * from my_schema.my_table")
637638

638639
def add_table(self, table: TableInfo):

tests/integration/install/test_installation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def test_repair_run_workflow_job(installation_ctx, mocker):
190190
assert installation_ctx.deployed_workflows.validate_step("failing")
191191

192192

193+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
193194
def test_installation_deletes_redash_dashboard_when_upgrading_to_lakeview(ws, installation_ctx, make_dashboard):
194195
"""The installation should handle upgrading dashboards from redash."""
195196

tests/integration/progress/test_dashboards.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
),
2323
],
2424
)
25+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
2526
def test_dashboard_progress_encoder_table_failures(runtime_ctx, az_cli_ctx, query: str, failures: list[str]) -> None:
2627
az_cli_ctx.progress_tracking_installation.run()
2728
runtime_ctx = runtime_ctx.replace(

tests/integration/progress/test_jobs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import pytest
2+
13
from databricks.labs.ucx.assessment.jobs import JobInfo
24
from databricks.labs.ucx.framework.utils import escape_sql_identifier
35
from databricks.labs.ucx.source_code.base import DirectFsAccess, LineageAtom
46
from databricks.labs.ucx.source_code.jobs import JobProblem
57

68

9+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
710
def test_job_progress_encoder_failures(runtime_ctx, az_cli_ctx) -> None:
811
az_cli_ctx.progress_tracking_installation.run()
912
runtime_ctx = runtime_ctx.replace(

tests/integration/queries/test_migration_progress.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ def dashboard_metadata(catalog_populated: str) -> DashboardMetadata:
594594
return metadata
595595

596596

597+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
597598
def test_migration_progress_dashboard(
598599
ws: WorkspaceClient,
599600
is_in_debug, # Skip test when not in debug
@@ -616,6 +617,7 @@ def test_migration_progress_dashboard(
616617
assert True, "Dashboard deployment successful"
617618

618619

620+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
619621
@pytest.mark.parametrize(
620622
"query_name, rows",
621623
[
@@ -720,6 +722,7 @@ def exclude_fields_from_rows(rows: list[Row], *fields: str) -> list[Row]:
720722
return rows_without_fields
721723

722724

725+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
723726
def test_migration_progress_query_dashboard_pending_migration_by_owner_bar_graph(
724727
dashboard_metadata: DashboardMetadata,
725728
sql_backend: SqlBackend,
@@ -734,6 +737,7 @@ def test_migration_progress_query_dashboard_pending_migration_by_owner_bar_graph
734737
assert exclude_fields_from_rows(query_results, "owner") == rows
735738

736739

740+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
737741
def test_migration_progress_query_dashboards_pending_migration_by_owner_overview(
738742
dashboard_metadata: DashboardMetadata,
739743
sql_backend: SqlBackend,
@@ -755,6 +759,7 @@ def test_migration_progress_query_dashboards_pending_migration_by_owner_overview
755759
assert exclude_fields_from_rows(query_results, "owner") == rows
756760

757761

762+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
758763
def test_migration_progress_query_dashboards_pending_migration(
759764
ws: WorkspaceClient,
760765
dashboard_metadata: DashboardMetadata,

tests/integration/source_code/test_directfs_access.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from databricks.labs.ucx.source_code.linters.jobs import WorkflowLinter
66

77

8+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
89
def test_legacy_query_dfsa_ownership(runtime_ctx) -> None:
910
"""Verify the ownership of a direct-fs record for a legacy query."""
1011
query = runtime_ctx.make_query(sql_query="SELECT * from csv.`dbfs://some_folder/some_file.csv`")

tests/integration/source_code/test_queries.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import pytest
12
from databricks.labs.lsql.backends import Row
23

34
from databricks.labs.ucx.source_code.base import DirectFsAccess, LineageAtom, UsedTable
45

56

7+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
68
def test_query_linter_lints_queries_and_stores_dfsas_and_tables(simple_ctx) -> None:
79
query_with_dfsa = simple_ctx.make_query(sql_query="SELECT * from csv.`dbfs://some_folder/some_file.csv`")
810
dashboard_with_dfsa = simple_ctx.make_dashboard(query=query_with_dfsa)

tests/integration/source_code/test_redash.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import datetime as dt
22

3+
import pytest
34
from databricks.sdk.retries import retried
45

56
from databricks.labs.ucx.source_code.linters.redash import Redash
67
from databricks.sdk.service.sql import Dashboard
78

89

10+
@pytest.mark.skip(reason="Legacy dashboard creation is no longer supported by Databricks.")
911
def test_migrate_dashboards_sets_migration_tags(installation_ctx) -> None:
1012
query_in_dashboard, query_outside_dashboard = installation_ctx.make_query(), installation_ctx.make_query()
1113
assert query_in_dashboard.id and query_outside_dashboard.id, "Query from fixture misses id"

0 commit comments

Comments
 (0)