Commit a9219d9
fix: Report single-feature-view spark_application materialization success
`SparkApplicationComputeEngine.materialize()` deletes the SparkApplication CR
in its `finally` immediately after `_build_per_fv_jobs()` returns. For a single
feature view, `_build_per_fv_jobs()` short-circuited and returned the live
polling job. `FeatureStore._submit_and_process_materialization_jobs()` then
re-checks `job.status()`, which re-queries the just-deleted CR, gets a 404, and
raises `SparkApplication feast-sa-<id> not found` — for a materialization that
actually succeeded and already updated the registry. Automation calling
`feast materialize` or `/materialize` sees a failure and may retry completed
work. The bug is deterministic for exactly one feature view.
Resolve the per-FV outcome from registry state for every task count, exactly as
the multi-FV path already does: a materialized FV (`AVAILABLE_ONLINE`) becomes a
`CompletedMaterializationJob`, which reports SUCCEEDED without any Kubernetes
call and is therefore safe after cleanup. The now-unused `job` parameter is
dropped. Genuine failures still surface as ERROR (the FV is not
`AVAILABLE_ONLINE`), and the Spark driver's error detail is already logged by
`_wait_for_completion`.
Updated the single-task unit test, which previously asserted the buggy
behavior (return the live job, skip the registry), to require resolution from
registry state with no CR query, and added a single-failed-FV case.
Fixes #6673
Signed-off-by: adarshsm <adarshmudugal@deborhn.shop>1 parent 9affee5 commit a9219d9
2 files changed
Lines changed: 56 additions & 17 deletions
File tree
- sdk/python
- feast/infra/compute_engines/spark_application
- tests/unit/infra/compute_engines
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
| |||
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
| |||
Lines changed: 47 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
| 316 | + | |
318 | 317 | | |
319 | 318 | | |
320 | 319 | | |
| |||
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 345 | + | |
350 | 346 | | |
351 | 347 | | |
352 | 348 | | |
| |||
355 | 351 | | |
356 | 352 | | |
357 | 353 | | |
358 | | - | |
| 354 | + | |
| 355 | + | |
359 | 356 | | |
| 357 | + | |
| 358 | + | |
360 | 359 | | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
364 | 399 | | |
365 | 400 | | |
366 | 401 | | |
367 | 402 | | |
368 | | - | |
369 | | - | |
| 403 | + | |
370 | 404 | | |
371 | 405 | | |
372 | | - | |
373 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
374 | 409 | | |
375 | 410 | | |
376 | 411 | | |
| |||
0 commit comments