lkml-blastradius 0.1.0__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.
- lkml_blastradius-0.1.0/.github/workflows/ci.yml +22 -0
- lkml_blastradius-0.1.0/.github/workflows/release.yml +63 -0
- lkml_blastradius-0.1.0/.gitignore +10 -0
- lkml_blastradius-0.1.0/CHANGELOG.md +15 -0
- lkml_blastradius-0.1.0/LICENSE +177 -0
- lkml_blastradius-0.1.0/PKG-INFO +146 -0
- lkml_blastradius-0.1.0/README.md +131 -0
- lkml_blastradius-0.1.0/pyproject.toml +44 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/__init__.py +3 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/ca_api.py +102 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/cli.py +147 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/collect.py +398 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/config.py +131 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/demo.py +499 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/diff.py +161 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/impact.py +229 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/looker.py +165 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/model.py +164 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/releases.py +137 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/report.py +399 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/run.py +98 -0
- lkml_blastradius-0.1.0/src/lkml_blastradius/workflow.yml +50 -0
- lkml_blastradius-0.1.0/tests/test_end_to_end.py +211 -0
- lkml_blastradius-0.1.0/tests/test_parts.py +176 -0
- lkml_blastradius-0.1.0/uv.lock +523 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python: ["3.11", "3.12", "3.13"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: astral-sh/setup-uv@v5
|
|
17
|
+
- run: uv sync --python ${{ matrix.python }}
|
|
18
|
+
- run: uv run ruff check src tests
|
|
19
|
+
- run: uv run ruff format --check src tests
|
|
20
|
+
- run: uv run mypy
|
|
21
|
+
- run: uv run pytest
|
|
22
|
+
- run: uv run lkblast demo
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Release: push a tag like v0.2.0.
|
|
2
|
+
# 1. build sdist + wheel from a clean checkout and smoke-test the wheel (offline demo);
|
|
3
|
+
# 2. create a GitHub Release with the artifacts;
|
|
4
|
+
# 3. publish to PyPI with trusted publishing (no API tokens) — only when the repository variable
|
|
5
|
+
# PYPI_PUBLISH is "true", i.e. after the PyPI trusted publisher has been configured.
|
|
6
|
+
name: release
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
tags: ["v*"]
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
- name: Check tag matches package version
|
|
19
|
+
run: |
|
|
20
|
+
v=$(grep -m1 '^version' pyproject.toml | cut -d'"' -f2)
|
|
21
|
+
[ "v$v" = "${GITHUB_REF_NAME}" ] || { echo "::error::tag ${GITHUB_REF_NAME} != version $v"; exit 1; }
|
|
22
|
+
- run: uv build
|
|
23
|
+
- name: Smoke-test the wheel in a clean environment
|
|
24
|
+
run: |
|
|
25
|
+
uv venv /tmp/smoke --python 3.12
|
|
26
|
+
uv pip install --python /tmp/smoke/bin/python dist/*.whl
|
|
27
|
+
cd /tmp && /tmp/smoke/bin/lkblast demo -o /tmp/lkblast-demo && /tmp/smoke/bin/lkblast init /tmp/init-check
|
|
28
|
+
- uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: dist
|
|
31
|
+
path: dist/
|
|
32
|
+
|
|
33
|
+
github-release:
|
|
34
|
+
needs: build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
permissions:
|
|
37
|
+
contents: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/download-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
- name: Create GitHub Release
|
|
45
|
+
env:
|
|
46
|
+
GH_TOKEN: ${{ github.token }}
|
|
47
|
+
run: |
|
|
48
|
+
gh release create "$GITHUB_REF_NAME" dist/* --title "$GITHUB_REF_NAME" \
|
|
49
|
+
--notes "See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/$GITHUB_REF_NAME/CHANGELOG.md)."
|
|
50
|
+
|
|
51
|
+
pypi:
|
|
52
|
+
needs: build
|
|
53
|
+
if: vars.PYPI_PUBLISH == 'true'
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
environment: pypi
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write # trusted publishing
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/download-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
63
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-10-03)
|
|
4
|
+
|
|
5
|
+
First release.
|
|
6
|
+
|
|
7
|
+
- `lkblast run`: daily snapshot of Looker metadata through the API (explores and fields, dashboard
|
|
8
|
+
tiles and filters, Looks, merged queries, Looker CA agents, content validator, Looker version,
|
|
9
|
+
deployed LookML commits, Google release notes), compared with the previous run.
|
|
10
|
+
- Impact per content item: breaking, numbers may change, AI agents may answer differently, cosmetic;
|
|
11
|
+
each change attributed to a LookML deploy or a Looker upgrade.
|
|
12
|
+
- Reports: `blastradius.md`, `blastradius.html`, `blastradius.json`, and a Slack summary.
|
|
13
|
+
- `lkblast init`: `blastradius.yaml` and a daily GitHub Actions workflow.
|
|
14
|
+
- `lkblast compare` for any two snapshots; `lkblast demo` offline.
|
|
15
|
+
- Optional Conversational Analytics API data agents.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: lkml-blastradius
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The blast radius of every Looker change: which dashboards, Looks, explores and Conversational Analytics agents a LookML deploy or Google release affects, reported daily.
|
|
5
|
+
Author: Venkata Sangaraju
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Database
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: httpx>=0.27
|
|
13
|
+
Requires-Dist: pyyaml>=6.0
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# lkml-blastradius
|
|
17
|
+
|
|
18
|
+
**The blast radius of every Looker change.** Every morning: what changed (LookML deploys, Looker
|
|
19
|
+
upgrades, Google releases), and which dashboards, Looks, explores and Conversational Analytics
|
|
20
|
+
agents it hits.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install lkml-blastradius
|
|
24
|
+
lkblast init # writes blastradius.yaml + a daily GitHub Actions workflow
|
|
25
|
+
lkblast run # snapshot Looker, compare with yesterday, write the report
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Each run takes a metadata snapshot through the Looker API and compares it with the previous one:
|
|
29
|
+
|
|
30
|
+
| It tracks | From |
|
|
31
|
+
|---|---|
|
|
32
|
+
| Every explore and field: SQL, type, label, description, synonyms, joins, `sql_table_name`, always filters | `lookml_models`, `lookml_model_explore` |
|
|
33
|
+
| Every dashboard tile and filter, Look, and merged query, with each field it uses (including filters, sorts, pivots, custom fields) | `dashboards`, `looks`, `queries`, `merge_queries` |
|
|
34
|
+
| Conversational Analytics agents in Looker: explores, golden queries, fields named in instructions | `agents` (beta API) |
|
|
35
|
+
| CA API data agents (optional) | `geminidataanalytics.googleapis.com` `dataAgents` |
|
|
36
|
+
| Broken content, whatever the cause | Looker content validator |
|
|
37
|
+
| Looker version and the deployed LookML commit of every project, including imported ones | `versions`, `projects/{id}/git_branch` |
|
|
38
|
+
| What Google shipped | Looker release-notes feed, CA API release notes |
|
|
39
|
+
|
|
40
|
+
Then it reports **what changed, old → new, which content it touches, how badly, and why**:
|
|
41
|
+
|
|
42
|
+
| Severity | Meaning |
|
|
43
|
+
|---|---|
|
|
44
|
+
| **Breaking** | A field, join or explore that the content uses was removed, or the content validator found a new error |
|
|
45
|
+
| **Numbers may change** | SQL, type, measure filters, joins, table or always-filters changed for a field the content uses |
|
|
46
|
+
| **AI agents may answer differently** | Descriptions, labels, synonyms, hidden flags or new fields changed in an explore an agent can use. Dashboards ignore these changes, but agents read them. |
|
|
47
|
+
| **Cosmetic** | Labels or formats on dashboards and Looks |
|
|
48
|
+
|
|
49
|
+
Every change is attributed to one of three causes: **a LookML deploy** in a named project (old → new commit),
|
|
50
|
+
**a Looker upgrade** (old → new version) with no deploy, or neither. Changes from Google come from
|
|
51
|
+
the upgrade line, the matching release notes, and the content validator.
|
|
52
|
+
|
|
53
|
+
## Try it offline
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
lkblast demo # two days on a fake Looker (fictional Harborline Supply Co.)
|
|
57
|
+
open lkblast-demo/reports/blastradius.html
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
2 breaking, 3 numbers may change, 1 cosmetic
|
|
62
|
+
2 new content error(s), 2 open
|
|
63
|
+
Looker upgraded 26.14.2 → 26.16.1
|
|
64
|
+
LookML deployed in core_project, finance_project
|
|
65
|
+
3 new Google release note(s), 2 need attention
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Content | Severity | Why | Cause |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| Executive revenue / Revenue by region (tile) | Breaking | `customers.region` removed | LookML deploy in finance_project |
|
|
71
|
+
| Executive revenue / Region (filter) | Breaking | `customers.region` removed | LookML deploy in finance_project |
|
|
72
|
+
| Executive revenue / Net revenue by month | Numbers may change | `orders.net_revenue` SQL now also subtracts discounts | LookML deploy in core_project (imported) |
|
|
73
|
+
| Collections / Amount due vs net revenue (merged query) | Numbers may change | same | same |
|
|
74
|
+
| Finance assistant (Looker CA agent) | Numbers may change | its golden query uses `orders.net_revenue` | same |
|
|
75
|
+
| Executive revenue / Order volume | Cosmetic | `orders.order_count` label | same |
|
|
76
|
+
|
|
77
|
+
The *Refund watch* Look and the *Logistics helper* agent are not listed because nothing they use changed.
|
|
78
|
+
|
|
79
|
+
## Run it daily (GitHub Actions + Slack)
|
|
80
|
+
|
|
81
|
+
1. `lkblast init` in any repo (it can be an otherwise empty repo).
|
|
82
|
+
2. Add repository secrets: `LOOKER_BASE_URL`, `LOOKER_CLIENT_ID`, `LOOKER_CLIENT_SECRET`, and
|
|
83
|
+
optionally `SLACK_WEBHOOK_URL`.
|
|
84
|
+
3. Push. The workflow runs at 06:00 UTC daily (change the cron in `.github/workflows/lkml-blastradius.yml`)
|
|
85
|
+
or on demand from the Actions tab.
|
|
86
|
+
|
|
87
|
+
Every run writes `reports/blastradius.{md,html,json}`. The Markdown goes to the job summary, the reports are
|
|
88
|
+
uploaded as an artifact, and a short summary with a link to the run is posted to Slack. Snapshot history
|
|
89
|
+
lives in the Actions cache. Each run refreshes it, so it doesn't expire while the job runs daily.
|
|
90
|
+
|
|
91
|
+
The first run saves a baseline. Impact is reported from the second run on.
|
|
92
|
+
|
|
93
|
+
**API user.** Use API credentials of a user that can see all content (an admin, or a role with
|
|
94
|
+
`see_lookml`, `see_user_dashboards`, `see_looks`, `access_data` on all models). Content the user
|
|
95
|
+
can't see is not analyzed. Reading deployed commits needs `see_lookml`/`develop`; without it, the
|
|
96
|
+
report still works but can't tell a LookML deploy from a Looker upgrade.
|
|
97
|
+
|
|
98
|
+
## Options
|
|
99
|
+
|
|
100
|
+
`blastradius.yaml` (written by `lkblast init`; every key is optional):
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
looker: {models: [], workers: 8, timeout_seconds: 120}
|
|
104
|
+
content: {dashboards: true, looks: true, looker_agents: true, content_validator: true}
|
|
105
|
+
ca_api: {enabled: false, locations: [global]} # + GOOGLE_CLOUD_PROJECT, GOOGLE_OAUTH_ACCESS_TOKEN
|
|
106
|
+
releases: {enabled: true, lookback_days: 7}
|
|
107
|
+
storage: {dir: .lkblast, keep: 30}
|
|
108
|
+
report: {dir: reports}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
lkblast run --fail-on breaking # exit 1 when something breaks (for alerting)
|
|
113
|
+
lkblast compare OLD.json.gz NEW.json.gz # report between any two saved snapshots
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To include **CA API data agents**, set `ca_api.enabled: true` and provide `GOOGLE_CLOUD_PROJECT`
|
|
117
|
+
and an access token in `GOOGLE_OAUTH_ACCESS_TOKEN`. In Actions, get one with
|
|
118
|
+
`google-github-actions/auth` (`token_format: access_token`). Agents that point at another Looker
|
|
119
|
+
instance are ignored.
|
|
120
|
+
|
|
121
|
+
## What it does not do
|
|
122
|
+
|
|
123
|
+
- It reports changes **after** they reach production (daily). It doesn't check a LookML branch
|
|
124
|
+
before merge.
|
|
125
|
+
- It never runs queries and stores no row data. It can't see a number change that comes from the
|
|
126
|
+
warehouse data itself.
|
|
127
|
+
- It can't see a Google change that alters behavior but not metadata, such as how an agent picks
|
|
128
|
+
fields. That shows up only as an upgrade line and release notes. Agent answer regression testing
|
|
129
|
+
is what [lookml-agentops](https://github.com/sangaraju1988/lookml-agentops) does.
|
|
130
|
+
|
|
131
|
+
## API sources
|
|
132
|
+
|
|
133
|
+
Every Looker endpoint and attribute used is checked against Looker's OpenAPI spec
|
|
134
|
+
(`looker-open-source/sdk-codegen`, `spec/Looker.4.0.oas.json`, 4.0.26.12). The list is in the
|
|
135
|
+
docstring of [`looker.py`](src/lkml_blastradius/looker.py). `/agents` is marked **beta** by Looker.
|
|
136
|
+
CA API fields come from the v1 REST reference. Release-note formats were checked on 2026-10-03
|
|
137
|
+
(see [`releases.py`](src/lkml_blastradius/releases.py)). If Google changes the page layout, the run
|
|
138
|
+
records a warning and continues.
|
|
139
|
+
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
uv sync && uv run pytest && uv run ruff check src tests && uv run mypy
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Apache-2.0. Not affiliated with or endorsed by Google. Looker is a trademark of Google LLC.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# lkml-blastradius
|
|
2
|
+
|
|
3
|
+
**The blast radius of every Looker change.** Every morning: what changed (LookML deploys, Looker
|
|
4
|
+
upgrades, Google releases), and which dashboards, Looks, explores and Conversational Analytics
|
|
5
|
+
agents it hits.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install lkml-blastradius
|
|
9
|
+
lkblast init # writes blastradius.yaml + a daily GitHub Actions workflow
|
|
10
|
+
lkblast run # snapshot Looker, compare with yesterday, write the report
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Each run takes a metadata snapshot through the Looker API and compares it with the previous one:
|
|
14
|
+
|
|
15
|
+
| It tracks | From |
|
|
16
|
+
|---|---|
|
|
17
|
+
| Every explore and field: SQL, type, label, description, synonyms, joins, `sql_table_name`, always filters | `lookml_models`, `lookml_model_explore` |
|
|
18
|
+
| Every dashboard tile and filter, Look, and merged query, with each field it uses (including filters, sorts, pivots, custom fields) | `dashboards`, `looks`, `queries`, `merge_queries` |
|
|
19
|
+
| Conversational Analytics agents in Looker: explores, golden queries, fields named in instructions | `agents` (beta API) |
|
|
20
|
+
| CA API data agents (optional) | `geminidataanalytics.googleapis.com` `dataAgents` |
|
|
21
|
+
| Broken content, whatever the cause | Looker content validator |
|
|
22
|
+
| Looker version and the deployed LookML commit of every project, including imported ones | `versions`, `projects/{id}/git_branch` |
|
|
23
|
+
| What Google shipped | Looker release-notes feed, CA API release notes |
|
|
24
|
+
|
|
25
|
+
Then it reports **what changed, old → new, which content it touches, how badly, and why**:
|
|
26
|
+
|
|
27
|
+
| Severity | Meaning |
|
|
28
|
+
|---|---|
|
|
29
|
+
| **Breaking** | A field, join or explore that the content uses was removed, or the content validator found a new error |
|
|
30
|
+
| **Numbers may change** | SQL, type, measure filters, joins, table or always-filters changed for a field the content uses |
|
|
31
|
+
| **AI agents may answer differently** | Descriptions, labels, synonyms, hidden flags or new fields changed in an explore an agent can use. Dashboards ignore these changes, but agents read them. |
|
|
32
|
+
| **Cosmetic** | Labels or formats on dashboards and Looks |
|
|
33
|
+
|
|
34
|
+
Every change is attributed to one of three causes: **a LookML deploy** in a named project (old → new commit),
|
|
35
|
+
**a Looker upgrade** (old → new version) with no deploy, or neither. Changes from Google come from
|
|
36
|
+
the upgrade line, the matching release notes, and the content validator.
|
|
37
|
+
|
|
38
|
+
## Try it offline
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
lkblast demo # two days on a fake Looker (fictional Harborline Supply Co.)
|
|
42
|
+
open lkblast-demo/reports/blastradius.html
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
2 breaking, 3 numbers may change, 1 cosmetic
|
|
47
|
+
2 new content error(s), 2 open
|
|
48
|
+
Looker upgraded 26.14.2 → 26.16.1
|
|
49
|
+
LookML deployed in core_project, finance_project
|
|
50
|
+
3 new Google release note(s), 2 need attention
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| Content | Severity | Why | Cause |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| Executive revenue / Revenue by region (tile) | Breaking | `customers.region` removed | LookML deploy in finance_project |
|
|
56
|
+
| Executive revenue / Region (filter) | Breaking | `customers.region` removed | LookML deploy in finance_project |
|
|
57
|
+
| Executive revenue / Net revenue by month | Numbers may change | `orders.net_revenue` SQL now also subtracts discounts | LookML deploy in core_project (imported) |
|
|
58
|
+
| Collections / Amount due vs net revenue (merged query) | Numbers may change | same | same |
|
|
59
|
+
| Finance assistant (Looker CA agent) | Numbers may change | its golden query uses `orders.net_revenue` | same |
|
|
60
|
+
| Executive revenue / Order volume | Cosmetic | `orders.order_count` label | same |
|
|
61
|
+
|
|
62
|
+
The *Refund watch* Look and the *Logistics helper* agent are not listed because nothing they use changed.
|
|
63
|
+
|
|
64
|
+
## Run it daily (GitHub Actions + Slack)
|
|
65
|
+
|
|
66
|
+
1. `lkblast init` in any repo (it can be an otherwise empty repo).
|
|
67
|
+
2. Add repository secrets: `LOOKER_BASE_URL`, `LOOKER_CLIENT_ID`, `LOOKER_CLIENT_SECRET`, and
|
|
68
|
+
optionally `SLACK_WEBHOOK_URL`.
|
|
69
|
+
3. Push. The workflow runs at 06:00 UTC daily (change the cron in `.github/workflows/lkml-blastradius.yml`)
|
|
70
|
+
or on demand from the Actions tab.
|
|
71
|
+
|
|
72
|
+
Every run writes `reports/blastradius.{md,html,json}`. The Markdown goes to the job summary, the reports are
|
|
73
|
+
uploaded as an artifact, and a short summary with a link to the run is posted to Slack. Snapshot history
|
|
74
|
+
lives in the Actions cache. Each run refreshes it, so it doesn't expire while the job runs daily.
|
|
75
|
+
|
|
76
|
+
The first run saves a baseline. Impact is reported from the second run on.
|
|
77
|
+
|
|
78
|
+
**API user.** Use API credentials of a user that can see all content (an admin, or a role with
|
|
79
|
+
`see_lookml`, `see_user_dashboards`, `see_looks`, `access_data` on all models). Content the user
|
|
80
|
+
can't see is not analyzed. Reading deployed commits needs `see_lookml`/`develop`; without it, the
|
|
81
|
+
report still works but can't tell a LookML deploy from a Looker upgrade.
|
|
82
|
+
|
|
83
|
+
## Options
|
|
84
|
+
|
|
85
|
+
`blastradius.yaml` (written by `lkblast init`; every key is optional):
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
looker: {models: [], workers: 8, timeout_seconds: 120}
|
|
89
|
+
content: {dashboards: true, looks: true, looker_agents: true, content_validator: true}
|
|
90
|
+
ca_api: {enabled: false, locations: [global]} # + GOOGLE_CLOUD_PROJECT, GOOGLE_OAUTH_ACCESS_TOKEN
|
|
91
|
+
releases: {enabled: true, lookback_days: 7}
|
|
92
|
+
storage: {dir: .lkblast, keep: 30}
|
|
93
|
+
report: {dir: reports}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
lkblast run --fail-on breaking # exit 1 when something breaks (for alerting)
|
|
98
|
+
lkblast compare OLD.json.gz NEW.json.gz # report between any two saved snapshots
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
To include **CA API data agents**, set `ca_api.enabled: true` and provide `GOOGLE_CLOUD_PROJECT`
|
|
102
|
+
and an access token in `GOOGLE_OAUTH_ACCESS_TOKEN`. In Actions, get one with
|
|
103
|
+
`google-github-actions/auth` (`token_format: access_token`). Agents that point at another Looker
|
|
104
|
+
instance are ignored.
|
|
105
|
+
|
|
106
|
+
## What it does not do
|
|
107
|
+
|
|
108
|
+
- It reports changes **after** they reach production (daily). It doesn't check a LookML branch
|
|
109
|
+
before merge.
|
|
110
|
+
- It never runs queries and stores no row data. It can't see a number change that comes from the
|
|
111
|
+
warehouse data itself.
|
|
112
|
+
- It can't see a Google change that alters behavior but not metadata, such as how an agent picks
|
|
113
|
+
fields. That shows up only as an upgrade line and release notes. Agent answer regression testing
|
|
114
|
+
is what [lookml-agentops](https://github.com/sangaraju1988/lookml-agentops) does.
|
|
115
|
+
|
|
116
|
+
## API sources
|
|
117
|
+
|
|
118
|
+
Every Looker endpoint and attribute used is checked against Looker's OpenAPI spec
|
|
119
|
+
(`looker-open-source/sdk-codegen`, `spec/Looker.4.0.oas.json`, 4.0.26.12). The list is in the
|
|
120
|
+
docstring of [`looker.py`](src/lkml_blastradius/looker.py). `/agents` is marked **beta** by Looker.
|
|
121
|
+
CA API fields come from the v1 REST reference. Release-note formats were checked on 2026-10-03
|
|
122
|
+
(see [`releases.py`](src/lkml_blastradius/releases.py)). If Google changes the page layout, the run
|
|
123
|
+
records a warning and continues.
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
uv sync && uv run pytest && uv run ruff check src tests && uv run mypy
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Apache-2.0. Not affiliated with or endorsed by Google. Looker is a trademark of Google LLC.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "lkml-blastradius"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "The blast radius of every Looker change: which dashboards, Looks, explores and Conversational Analytics agents a LookML deploy or Google release affects, reported daily."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [{ name = "Venkata Sangaraju" }]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Programming Language :: Python :: 3",
|
|
11
|
+
"License :: OSI Approved :: Apache Software License",
|
|
12
|
+
"Topic :: Database",
|
|
13
|
+
]
|
|
14
|
+
dependencies = ["httpx>=0.27", "pyyaml>=6.0"]
|
|
15
|
+
|
|
16
|
+
[project.scripts]
|
|
17
|
+
lkblast = "lkml_blastradius.cli:main"
|
|
18
|
+
|
|
19
|
+
[dependency-groups]
|
|
20
|
+
dev = ["pytest>=8", "ruff>=0.5", "mypy>=1.10", "types-PyYAML>=6.0"]
|
|
21
|
+
|
|
22
|
+
[build-system]
|
|
23
|
+
requires = ["hatchling"]
|
|
24
|
+
build-backend = "hatchling.build"
|
|
25
|
+
|
|
26
|
+
[tool.hatch.build.targets.wheel]
|
|
27
|
+
packages = ["src/lkml_blastradius"]
|
|
28
|
+
|
|
29
|
+
[tool.ruff]
|
|
30
|
+
line-length = 100
|
|
31
|
+
target-version = "py311"
|
|
32
|
+
src = ["src", "tests"]
|
|
33
|
+
|
|
34
|
+
[tool.ruff.lint]
|
|
35
|
+
select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF"]
|
|
36
|
+
ignore = ["E501"]
|
|
37
|
+
|
|
38
|
+
[tool.mypy]
|
|
39
|
+
strict = true
|
|
40
|
+
files = ["src/lkml_blastradius"]
|
|
41
|
+
|
|
42
|
+
[tool.pytest.ini_options]
|
|
43
|
+
testpaths = ["tests"]
|
|
44
|
+
addopts = "-q"
|