Skip to content

test: fix failing TestStreamingTableLiquidClusteringChanges - #1436

Merged
sd-db merged 2 commits into
mainfrom
sd-db/fix/st-liquid-clustering-changes-skip
May 2, 2026
Merged

test: fix failing TestStreamingTableLiquidClusteringChanges#1436
sd-db merged 2 commits into
mainfrom
sd-db/fix/st-liquid-clustering-changes-skip

Conversation

@sd-db

@sd-db sd-db commented May 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

See cluster/uc-cluster integration test runs failing with the same error

_ ERROR at setup of TestStreamingTableLiquidClusteringChanges.test_liquid_clustering_change_is_applied _
[gw7] linux -- Python 3.10.20 /home/runner/.local/share/hatch/env/virtual/dbt-databricks/x3VOX0GX/dbt-databricks/bin/python3

self = <test_st_basic.TestStreamingTableLiquidClusteringChanges object at 0x7fef1c646830>
project = <dbt.tests.fixtures.project.TestProjInfo object at 0x7fef04b32ad0>
liquid_clustered_st = <DatabricksRelation `hive_metastore`.`test17775258095118707534_test_st_basic`.`liquid_clustered_st`>

    @pytest.fixture(scope="class", autouse=True)
    def setup(self, project, liquid_clustered_st):
        util.run_dbt(["seed"])
>       util.run_dbt(["run", "--models", liquid_clustered_st.identifier, "--full-refresh"])

/home/runner/work/dbt-databricks/dbt-databricks/tests/functional/adapter/streaming_tables/test_st_basic.py:337: 

While the test is gated behind a profile check and runs only on sqlwarehouse, the underlying setup is not gated which is what leads to the error here. The fix is simple to remove the common setup utility and move this inside the function which has the proper gating.

Test plan

  • hatch run pytest tests/functional/adapter/streaming_tables/test_st_basic.py::TestStreamingTableLiquidClusteringChanges -v --profile databricks_uc_sql_endpoint1 passed in 76s
  • hatch run pytest tests/functional/adapter/streaming_tables/test_st_basic.py::TestStreamingTableLiquidClusteringChanges -v --profile databricks_uc_cluster1 skipped (no dbt-run output emitted)
  • run full suite of integration tests against the PR

…e alone

The class-level @skip_profile marker is enforced by a function-scope autouse
fixture in tests/conftest.py, so any class-scope autouse setup runs before the
skip can fire. On Assigned / No-isolation clusters, the dbt run in the old
setup fixture errored with REQUIRES_SHARED_COMPUTE before the skip took effect,
turning the marker into a flake (whether it skipped or errored depended on the
active cluster type).

Match the sibling TestStreamingTableLiquidClustering pattern: drop the
class-scope autouse setup and inline `seed` + initial `--full-refresh` into
the only test method. The function-scope skip then fires correctly.
@sd-db sd-db changed the title test: gate TestStreamingTableLiquidClusteringChanges via @skip_profile alone test: failing TestStreamingTableLiquidClusteringChanges May 2, 2026
@sd-db

sd-db commented May 2, 2026

Copy link
Copy Markdown
Collaborator Author

/integration-test

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Integration tests dispatched for PR #1436 by @sd-db. Track progress in the Actions tab.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.


yield

project.run_sql(f"drop schema if exists {project.test_schema} cascade")

@sd-db sd-db May 2, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: skipped the cleanup as this is already handed by the parent class (dbt-core/core/dbt/tests/fixtures/project.py)

@sd-db sd-db changed the title test: failing TestStreamingTableLiquidClusteringChanges test: fix failing TestStreamingTableLiquidClusteringChanges May 2, 2026
@sd-db sd-db self-assigned this May 2, 2026
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Integration results for PR #1436 — UC cluster ✅ success · SQL warehouse ✅ success · All-purpose cluster ✅ success

Run details.

@sd-db
sd-db merged commit 97a7519 into main May 2, 2026
8 checks passed
@sd-db
sd-db deleted the sd-db/fix/st-liquid-clustering-changes-skip branch May 2, 2026 14:53
@sd-db sd-db mentioned this pull request May 4, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant