Repository navigation
Commit 4782ba3
authored
fix: Keep HybridOnlineStore routing_tag across FeatureViews (#6769)
* fix: keep HybridOnlineStore routing_tag across FeatureViews
HybridOnlineStore.update() applied the first FeatureView and then failed on
the second with
ValueError: FeatureView must have a 'tribe' tag to use HybridOnlineStore
no matter how the views were tagged. The message reports 'tribe' — the
fallback, not the configured routing_tag — because config.online_store is no
longer the HybridOnlineStoreConfig by the time the second view is read.
Two causes:
1. _prepare_repo_conf mutated the caller's RepoConfig. `rconfig = config` is
an alias, so both the attribute assignment and the __dict__ writes landed
on the caller's object and replaced online_store with the selected
backend's config. It also injected `type` into online_store.conf, which
belongs to the user's config.
2. update() and teardown() rebound the `config` parameter inside their loops,
so the next iteration read routing_tag off the narrowed config even once
the mutation was gone.
Build the returned mapping from a copy, construct a new dict for the backend
conf, and assign the per-backend RepoConfig to a local name in the loops.
Behaviour is otherwise unchanged: the returned kwargs are identical to what
the mutating version produced.
Adds a unit regression test covering both the multi-FeatureView routing and
the caller's config staying intact. Both fail on master.
Signed-off-by: Jade <retrorca@gmail.com>
* fix: route only each backend's own FeatureViews in HybridOnlineStore
Backends act on every FeatureView handed to them, so passing the full
keep/delete lists made e.g. SQLite create tables for Redis-routed views,
and teardown let each backend drop another backend's tables.
- group FeatureViews by routing tag once, call each backend with only its
own subset
- update() now also reaches a backend that has deletions but no kept
views; previously it was never called and its tables were never dropped
- teardown() drops the (tribe, type, id(conf)) dedup set: grouping already
gives one call per backend, and the old dedup skipped the second view
routed to the same backend
Signed-off-by: Jade <retrorca@gmail.com>
* test: annotate HybridOnlineStore test signatures
Per review feedback on the fixtures and test functions. The whole file is
covered rather than only the flagged lines, so the signatures stay
consistent.
No behaviour change; `ruff check` and `ruff format --check` pass on
sdk/python/feast and sdk/python/tests.
Signed-off-by: Jade <retrorca@gmail.com>
* test: cover the untagged and unrouted paths in HybridOnlineStore
Codecov flagged the new _group_by_routing_tag branches as the only
uncovered lines in the patch: nothing exercised an untagged FeatureView
or a tag value with no configured backend.
- update() raises naming the *configured* routing tag, not the "tribe"
default, when a kept view is untagged — that wrong name was the
symptom this PR set out to fix
- update() skips an untagged view in tables_to_delete instead of raising
- update() raises NotImplementedError for a tag no backend claims
- teardown() skips such a tag rather than failing
_feature_view() takes Optional[str] so a view can be built without the
tag. No production change; 9 tests pass, patch coverage is now complete
(branch partials on the changed lines go to zero).
Signed-off-by: Jade <retrorca@gmail.com>
---------
Signed-off-by: Jade <retrorca@gmail.com>1 parent a037863 commit 4782ba3
2 files changed
Lines changed: 361 additions & 45 deletions
File tree
- sdk/python
- feast/infra/online_stores/hybrid_online_store
- tests/unit/infra/online_store
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
142 | 147 | | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | | - | |
| 162 | + | |
| 163 | + | |
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
162 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
163 | 205 | | |
164 | 206 | | |
165 | 207 | | |
| |||
266 | 308 | | |
267 | 309 | | |
268 | 310 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
276 | 320 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 321 | + | |
288 | 322 | | |
289 | 323 | | |
290 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
291 | 337 | | |
292 | 338 | | |
293 | 339 | | |
| |||
303 | 349 | | |
304 | 350 | | |
305 | 351 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
0 commit comments