feat: Add instrumentation for recording add_query, get_relation_config, is_uniform, has_dbr_capability, and is_cluster methods#1508
Conversation
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
…tion Annotate the new record dataclass methods (_to_dict, __init__, _from_dict) to satisfy mypy no-untyped-def, and apply ruff import ordering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
1d3c89c to
1528a6a
Compare
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
add_query, get_relation_config, is_uniform, has_dbr_capability, and is_cluster methodsadd_query, get_relation_config, is_uniform, has_dbr_capability, and is_cluster methods
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
|
@sd-db @jprakash-db let's get review on this -- @ajhlee-dbt touched up the PR to address the small failing stylistic checks |
|
|
||
|
|
||
| @Recorder.register_record_type | ||
| class DatabricksAdapterAddQueryRecord(Record): |
There was a problem hiding this comment.
The intended record/replay feature for the classes (DatabricksAdapterAddQueryRecord/DatabricksAdapterGetRelationConfigParams/DatabricksAdapterGetRelationConfigRecord). Is there some way we can add tests to check on the roundtrip behaviour.
Mostly I am interested in how serde works here and if the sterialisation logic is correct. Overall would recommend to add unit tests for all the classes to be sure
|
As discussed - @ajhlee-dbt is spiking on adding unit tests by end of day 7/7/2026 otherwise we'll pull in for the next release. :D |
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
Signed-off-by: Anna Lee <anna.lee@dbtlabs.com>
1f661b1 to
8c0f0bb
Compare
|
/integration-test min-deps |
|
Min-deps integration tests dispatched for PR #1508 by @sd-db. Track progress in the Actions tab. |
|
Min-deps integration results for PR #1508 — UC cluster ✅ success · SQL warehouse ❌ failure · All-purpose cluster ✅ success · Shard coverage ✅ success |
|
/integration-test |
|
Integration tests dispatched for PR #1508 by @sd-db. Track progress in the Actions tab. |
|
|
|
Integration results for PR #1508 — UC cluster ❌ failure · SQL warehouse ✅ success · All-purpose cluster ❌ failure · Shard coverage ✅ success |
|
Integration results for PR #1508 — UC cluster ✅ success · SQL warehouse ✅ success · All-purpose cluster ✅ success · Shard coverage ✅ success |
sd-db
left a comment
There was a problem hiding this comment.
Changes look good, thx for the PR !!
## Summary Release prep for **dbt-databricks 1.12.2**. Touches only the two release files: - `CHANGELOG.md` — set the `1.12.2` heading date to `Jul 9, 2026` and finalize the section (conformance cleanup + newly-added entries; see below). - `dbt/adapters/databricks/__version__.py` — bump `1.12.1` → `1.12.2`. ## CHANGELOG changes in this PR - **Add `#1508`** (Under the Hood): record/replay instrumentation for `add_query`, `get_relation_config`, `is_uniform`, `has_dbr_capability`, `is_cluster` (test-only, no runtime impact). - **Consolidate the coverage-run test work** into a single Under-the-Hood entry spanning the release's ~38 test/CI PRs, replacing the several partial test lines that were scattered across the section. The `#1576` kernel integration-test workflow line is kept separate (tied to the kernel feature). - **Conformance pass** per `AGENTS.md`: fix bare PR links (`[1440]`/`[1467]`/`[1539]` → `[#…]`), normalize `partially solves` → `partially resolves` and `closes` → `resolves` on the touched entries. ## Test plan - [x] `hatch run code-quality` — ruff / ruff format / mypy pass. (`uv-lock --check` is a known local-config false-negative; this PR does not touch `pyproject.toml` / `uv.lock`.) - [x] `hatch run unit` — 1258 passed, 6 skipped, 0 failures. - [x] `hatch run pre-commit run --files CHANGELOG.md dbt/adapters/databricks/__version__.py` — pass. - [x] CI (code quality, unit 3.10–3.13, build) to run on this PR.
Resolves #N/A.
Description
Instruments the following adapter functions for recording:
has_dbr_capabilityandis_cluster(via the auto record decorator)add_queryget_relation_configis_uniformChecklist
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.