bricksentry 0.1.12__tar.gz → 0.1.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bricksentry-0.1.12 → bricksentry-0.1.13}/CHANGELOG.md +6 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/PKG-INFO +3 -3
- {bricksentry-0.1.12 → bricksentry-0.1.13}/README.md +2 -2
- {bricksentry-0.1.12 → bricksentry-0.1.13}/pyproject.toml +1 -1
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/__init__.py +1 -1
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/lineage.py +10 -1
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_0112.py +15 -2
- {bricksentry-0.1.12 → bricksentry-0.1.13}/.gitignore +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/CONTRIBUTING.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/LICENSE +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/SECURITY.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/action.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/deploy/databricks-app/README.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry_check_my_table.ipynb +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry_check_my_table.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry_quickstart.ipynb +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry_quickstart.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/github-workflow.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/policy.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/examples/demo/agent_loop_demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/packages/bricksentry-mcp/LICENSE +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/packages/bricksentry-mcp/README.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/packages/bricksentry-mcp/src/bricksentry_mcp/__init__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/scripts/build_notebook.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/__main__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/agent_tools.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/assess.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/backends/__init__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/backends/base.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/backends/databricks_backend.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/backends/duckdb_backend.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/changes.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/cli.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/config.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/diff.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/explain.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/github.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/mcp_server.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/measures.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/models.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/notify.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/policy.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/policy_templates.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/preview.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/py.typed +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/src/bricksentry/report.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/conftest.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_0110.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_018.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_019.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_assess_policy.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_check_notebook.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_databricks_and_uc.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_diff.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_notebook.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_notify_templates.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_preview_agents.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.13}/tests/test_sample_guard_and_store.py +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.13 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
From the first live test of column lineage on Databricks (the 0.1.12 column features were verified against real `system.access.column_lineage` and column tags):
|
|
6
|
+
|
|
7
|
+
- Fix: column-level results listed columns of tables that had since been dropped, because lineage history keeps them. They are now left out, the same way the table-level blast radius does it. When existence can't be checked (no access to `information_schema`), they are kept, so missing privileges never hide anything.
|
|
8
|
+
|
|
3
9
|
## 0.1.12 (2026-11-11)
|
|
4
10
|
|
|
5
11
|
- **Column-level signals.** After the diff, bricksentry knows which columns a change touched (changed values, new NULLs, dropped or retyped). It reads their Unity Catalog tags from `information_schema.column_tags`, and follows `system.access.column_lineage` from those columns only, up to `lineage.column_depth` hops (default 2), to the downstream columns they feed. Assessments, summaries and the pull-request report show the changed columns, their tags and the column impact.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bricksentry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Change-safety for Databricks pipelines and the AI agents that edit them: data diffs, Unity Catalog blast radius, policy verdicts and rollback plans.
|
|
5
5
|
Project-URL: Homepage, https://bricksentry.org
|
|
6
6
|
Project-URL: Documentation, https://bricksentry.org/docs
|
|
@@ -216,7 +216,7 @@ Check out with `fetch-depth: 0` and give the job `pull-requests: write` permissi
|
|
|
216
216
|
Or use the bundled GitHub Action, which also writes the report to the job summary:
|
|
217
217
|
|
|
218
218
|
```yaml
|
|
219
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
219
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
220
220
|
with:
|
|
221
221
|
config: bricksentry.yml
|
|
222
222
|
fail-on: needs_human
|
|
@@ -241,7 +241,7 @@ jobs:
|
|
|
241
241
|
fetch-depth: 0
|
|
242
242
|
# Build this PR's version of your pipeline into a per-PR schema first,
|
|
243
243
|
# for example: databricks bundle deploy -t ci && databricks bundle run -t ci
|
|
244
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
244
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
245
245
|
with:
|
|
246
246
|
config: bricksentry.yml
|
|
247
247
|
fail-on: needs_human
|
|
@@ -169,7 +169,7 @@ Check out with `fetch-depth: 0` and give the job `pull-requests: write` permissi
|
|
|
169
169
|
Or use the bundled GitHub Action, which also writes the report to the job summary:
|
|
170
170
|
|
|
171
171
|
```yaml
|
|
172
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
172
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
173
173
|
with:
|
|
174
174
|
config: bricksentry.yml
|
|
175
175
|
fail-on: needs_human
|
|
@@ -194,7 +194,7 @@ jobs:
|
|
|
194
194
|
fetch-depth: 0
|
|
195
195
|
# Build this PR's version of your pipeline into a per-PR schema first,
|
|
196
196
|
# for example: databricks bundle deploy -t ci && databricks bundle run -t ci
|
|
197
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
197
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
198
198
|
with:
|
|
199
199
|
config: bricksentry.yml
|
|
200
200
|
fail-on: needs_human
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bricksentry"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.13"
|
|
8
8
|
description = "Change-safety for Databricks pipelines and the AI agents that edit them: data diffs, Unity Catalog blast radius, policy verdicts and rollback plans."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -293,7 +293,9 @@ class UnityCatalogLineage(LineageProvider):
|
|
|
293
293
|
|
|
294
294
|
def column_downstream(self, table: str, columns: list[str], depth: int = 2) -> list[ColumnImpact]:
|
|
295
295
|
"""Breadth-first over ``system.access.column_lineage``, starting from the changed
|
|
296
|
-
columns only, one query per level.
|
|
296
|
+
columns only, one query per level. Preview clones and (when ``exclude_dropped``)
|
|
297
|
+
dropped tables are left out, as in ``downstream``. Raises if the lineage table
|
|
298
|
+
can't be read."""
|
|
297
299
|
out: list[ColumnImpact] = []
|
|
298
300
|
origin: dict[str, str] = {f"{table}.{c}".lower(): c for c in columns}
|
|
299
301
|
seen = set(origin)
|
|
@@ -321,6 +323,13 @@ class UnityCatalogLineage(LineageProvider):
|
|
|
321
323
|
nxt.append(key)
|
|
322
324
|
frontier = nxt
|
|
323
325
|
out = out[: self.max_nodes]
|
|
326
|
+
if self.exclude_dropped and out:
|
|
327
|
+
# Same rule as the table-level blast radius: lineage history keeps tables that
|
|
328
|
+
# were dropped since. Leave those out, but only when information_schema answered.
|
|
329
|
+
missing = sorted({c.table for c in out if c.table.lower() not in self._meta_cache})
|
|
330
|
+
if missing:
|
|
331
|
+
self._load_meta(missing)
|
|
332
|
+
out = [c for c in out if self._exists.get(c.table.lower()) is not False]
|
|
324
333
|
tables = sorted({c.table for c in out})
|
|
325
334
|
if tables:
|
|
326
335
|
try:
|
|
@@ -202,6 +202,7 @@ def uc(backend):
|
|
|
202
202
|
('main.crm.contacts', 'email', 'main.sandbox.contacts__preview_ab12', 'email', current_date),
|
|
203
203
|
('main.crm.contacts', 'name', 'main.mart.customers', 'name', current_date),
|
|
204
204
|
('main.mart.customers', 'email_hash', 'main.gold.kpis', 'reachable', current_date),
|
|
205
|
+
('main.mart.customers', 'email_hash', 'main.tmp.bs_test_candidate', 'avg', current_date),
|
|
205
206
|
('main.crm.contacts', 'email', 'main.old.thing', 'e', current_date - INTERVAL 400 DAY),
|
|
206
207
|
('main.crm.contacts', 'email', NULL, NULL, current_date)
|
|
207
208
|
) t(source_table_full_name, source_column_name, target_table_full_name, target_column_name, event_date)""")
|
|
@@ -209,8 +210,14 @@ def uc(backend):
|
|
|
209
210
|
('main', 'crm', 'contacts', 'email', 'pii', NULL),
|
|
210
211
|
('main', 'gold', 'kpis', 'reachable', 'certified', 'true')
|
|
211
212
|
) t(catalog_name, schema_name, table_name, column_name, tag_name, tag_value)""")
|
|
213
|
+
backend.execute("""CREATE TABLE sysc.tables AS SELECT * FROM (VALUES
|
|
214
|
+
('main', 'mart', 'customers', 'data-eng'), ('main', 'gold', 'kpis', 'bi-team')
|
|
215
|
+
) t(table_catalog, table_schema, table_name, table_owner)""") # bs_test_candidate was dropped
|
|
216
|
+
backend.execute("CREATE TABLE sysc.table_tags (catalog_name VARCHAR, schema_name VARCHAR, table_name VARCHAR, "
|
|
217
|
+
"tag_name VARCHAR, tag_value VARCHAR)")
|
|
212
218
|
return UnityCatalogLineage(backend, lookback_days=90, column_lineage_table="sysc.column_lineage",
|
|
213
|
-
column_tags_table="sysc.column_tags"
|
|
219
|
+
column_tags_table="sysc.column_tags", tables_table="sysc.tables",
|
|
220
|
+
tags_table="sysc.table_tags")
|
|
214
221
|
|
|
215
222
|
|
|
216
223
|
def test_uc_column_lineage_walk(uc):
|
|
@@ -218,7 +225,7 @@ def test_uc_column_lineage_walk(uc):
|
|
|
218
225
|
assert [(c.source_column, c.table, c.column, c.depth) for c in out] == [
|
|
219
226
|
("email", "main.mart.customers", "email_hash", 1),
|
|
220
227
|
("email", "main.gold.kpis", "reachable", 2),
|
|
221
|
-
] # duplicates, preview clones, old events and NULL targets left out; 'name' not followed
|
|
228
|
+
] # duplicates, preview clones, dropped tables, old events and NULL targets left out; 'name' not followed
|
|
222
229
|
assert out[1].tags == {"certified": "true"}
|
|
223
230
|
assert uc.column_tags("main.crm.contacts") == {"email": {"pii": ""}}
|
|
224
231
|
|
|
@@ -242,3 +249,9 @@ def test_uc_refuses_suspicious_column_names(uc):
|
|
|
242
249
|
def test_python_dash_m_runs_the_cli():
|
|
243
250
|
r = subprocess.run([sys.executable, "-m", "bricksentry", "--version"], capture_output=True, text=True, timeout=60)
|
|
244
251
|
assert r.returncode == 0 and "bricksentry, version" in r.stdout
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def test_uc_column_lineage_keeps_tables_when_existence_is_unknown(uc):
|
|
255
|
+
uc.tables_table = "nope.tables" # information_schema not readable: never hide anything
|
|
256
|
+
out = uc.column_downstream("main.crm.contacts", ["email"], depth=2)
|
|
257
|
+
assert ("main.tmp.bs_test_candidate", "avg") in [(c.table, c.column) for c in out]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bricksentry-0.1.12 → bricksentry-0.1.13}/examples/databricks/bricksentry_check_my_table.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bricksentry-0.1.12 → bricksentry-0.1.13}/packages/bricksentry-mcp/src/bricksentry_mcp/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|