Commit 3e9c682
feat(nimbus): Use metric-config-parser for feature monitoring configs (#9229)
* feat(nimbus): Use metric-config-parser for feature monitoring configs
- Replace yaml + tomllib with NimbusFeatureMonitoringSpec from metric-config-parser
- Change is_events_stream bool to type string (event_stream / metrics / clients_daily)
- Add --config-path CLI option to point generator at metric-hub checkout
- Configs now live in metric-hub/nimbus_feature_monitoring/ as TOML files
Relates to EXP-6732
* feat(nimbus): Nimbus feature monitoring
* feat(nimbus): Nimbus feature monitoring
* feat(nimbus): Nimbus feature monitoring
* feat(nimbus): bump mozilla-metric-config-parser to 2026.4.3
* fix(nimbus): update query template to use source_table.type instead of is_events_stream
* feat(nimbus): remove --config-repo option, auto-clone metric-hub via from_github_repo
* revert(nimbus): remove telemetry-alerts from bqetl_marketing_analysis email list
* feat(nimbus): use ConfigCollection.from_github_repo().featmon_configs instead of FeatmonSpec
* fix(nimbus): use feat.nimbus_slug() for feature name to match actual Nimbus experiment slug
* fix(nimbus): rename unused feat_name to _feat_name
* fix(nimbus): fix filter_labels -> label_in and ratios -> feature.ratios in query template
* fix(nimbus): update featmon to use FeatmonConfig.spec.* accessors and fix stale urlbar view
- Update __init__.py to iterate list[FeatmonConfig] and access dataset/data_sources/features via .spec
- Restore urlbar_events_daily view to point at _v2 (was inadvertently left at _v1 due to branch staleness)
* fix(nimbus): revert unrelated formatting changes in __init__.py
* feat(nimbus): update mozilla-metric-config-parser to 2026.4.3 in requirements.txt
* fix(nimbus): rename event_stream to events_stream, add ratios from config, add tests
* fix(nimbus): update mozilla-metric-config-parser to 2026.4.4
* refactor(nimbus): follow *Spec/*Configuration pattern for SourceTable
Because - SourceTable re-declared fields (table_name, type, analysis_unit_id)
that already exist on SourceTableSpec, causing duplication.
This commit - renames SourceTable to SourceTableConfiguration, adds a
spec: SourceTableSpec field, and delegates name/table_name/type/
analysis_unit_id/time_partition_field via properties. Rendering-only
context (project, dataset, dimensions) stays as direct fields.
* fix(nimbus): move tests to tests/sql_generators and rename spec field
Because - tests in sql_generators/ don't get picked up by the test runner;
spec field name was too generic.
This commit - moves test_generate_queries.py to tests/sql_generators/
nimbus_feature_monitoring/ and renames SourceTableConfiguration.spec
to source_table_spec per reviewer suggestion.
* fix(nimbus): remove unused pytest import and apply black formatting to tests
---------
Co-authored-by: Yashika Khurana <yashikakhurana@Yashikas-MBP.home.local>
Co-authored-by: Yashika Khurana <yashikakhurana@Yashikas-MacBook-Pro.local>1 parent 1584163 commit 3e9c682
6 files changed
Lines changed: 213 additions & 139 deletions
File tree
- sql_generators/nimbus_feature_monitoring
- templates
- nimbus_feature_monitoring_v1
- tests/sql_generators/nimbus_feature_monitoring
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
1261 | | - | |
| 1260 | + | |
| 1261 | + | |
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | 48 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
58 | 76 | | |
59 | 77 | | |
60 | 78 | | |
| |||
68 | 86 | | |
69 | 87 | | |
70 | 88 | | |
71 | | - | |
| 89 | + | |
72 | 90 | | |
73 | 91 | | |
74 | 92 | | |
| |||
86 | 104 | | |
87 | 105 | | |
88 | 106 | | |
89 | | - | |
| 107 | + | |
90 | 108 | | |
91 | 109 | | |
92 | 110 | | |
| |||
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | | - | |
| 139 | + | |
122 | 140 | | |
123 | 141 | | |
124 | 142 | | |
| |||
139 | 157 | | |
140 | 158 | | |
141 | 159 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 160 | + | |
| 161 | + | |
145 | 162 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 163 | + | |
149 | 164 | | |
150 | | - | |
| 165 | + | |
151 | 166 | | |
152 | 167 | | |
| 168 | + | |
| 169 | + | |
153 | 170 | | |
154 | 171 | | |
155 | 172 | | |
156 | 173 | | |
157 | 174 | | |
158 | 175 | | |
159 | 176 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
164 | 181 | | |
165 | | - | |
166 | 182 | | |
167 | 183 | | |
168 | | - | |
| 184 | + | |
169 | 185 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 186 | + | |
173 | 187 | | |
174 | 188 | | |
175 | 189 | | |
| |||
185 | 199 | | |
186 | 200 | | |
187 | 201 | | |
188 | | - | |
| 202 | + | |
189 | 203 | | |
190 | | - | |
| 204 | + | |
191 | 205 | | |
192 | 206 | | |
193 | 207 | | |
| |||
202 | 216 | | |
203 | 217 | | |
204 | 218 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
209 | 223 | | |
210 | | - | |
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
| |||
Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments