Commit 194c966
authored
test: stabilize UC-cluster flake retry and ACL skip ordering (#1473)
## Summary
Two test-only fixes triggered by nightly run
[26192790727](https://github.com/databricks/dbt-databricks/actions/runs/26192790727).
Both observed failures were environmental — no dbt-databricks
regression.
- **`TestSpecifyingHttpPath`** — add `@pytest.mark.flaky(reruns=2,
reruns_delay=120)`. The test drives a python model on the shared UC
all-purpose cluster, which intermittently fails with *"Could not reach
driver of cluster"*. Same failure observed on at least 4
nightly/dispatch runs spanning 3 unrelated SHAs (2026-05-08, 2026-05-14,
2026-05-20 ×2). Real assertion failures still surface; only transient
cluster-warm issues retry.
- **`TestPythonModelNotebookACL` + `TestPythonModelAccessControlList`**
— move `ACL_TESTS_ENABLED` skip from test body to class-level
`@pytest.mark.skipif`. The `project` fixture is class-scope and ran
before the in-body skip, so a transient SQL-warehouse AADSTS blip in the
failing nightly turned a clean SKIP into ERROR at setup. `skipif` fires
before any fixture runs.
## Test plan
- [x] `hatch run pre-commit run --all-files` clean.
- [x] Skip path (ACL disabled): `1 skipped in 0.68s`, no DB hit.
- [x] Run path (`DBT_ENABLE_ACL_TESTS=1 --profile
databricks_uc_cluster`): body executes end-to-end through the ACL API
call; fails only because `DBT_TEST_USER_*` is unset (workspace user does
not exist) — equivalent to today's CI state where ACL tests are off.
- [ ] Run integration tests to verify1 parent 312563e commit 194c966
1 file changed
Lines changed: 7 additions & 6 deletions
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
283 | 287 | | |
284 | 288 | | |
285 | 289 | | |
| |||
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| |||
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| |||
0 commit comments