fix: source-first UDF rehydrate, Postgres empty-cols SELECT *, online allow_cache=False#6620
Closed
aniketpalu wants to merge 1 commit into
Closed
Conversation
…istry reads Rehydrate BatchFeatureView/ODFV callables from body_text (strip leading decorators) before dill.loads to avoid Spark driver exit 139 and cross-Python serve failures. Treat empty Postgres feature_name_columns as SELECT *. Disable registry cache on the online request path so FeatureView state gates see AVAILABLE_ONLINE immediately after materialize. Co-authored-by: Cursor <cursoragent@cursor.com>
| # dill.source.getsource() output. They are not needed to recover the callable and | ||
| # usually reference names unavailable at rehydrate time. | ||
| _DECORATOR_BLOCK = re.compile( | ||
| r"^(?:\s*@[\s\S]*?\n)+(?=\s*(?:async\s+)?def\s+)", |
aniketpalu
marked this pull request as draft
July 20, 2026 15:03
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6620 +/- ##
==========================================
- Coverage 45.94% 45.94% -0.01%
==========================================
Files 412 412
Lines 48864 48853 -11
Branches 6913 6913
==========================================
- Hits 22452 22444 -8
+ Misses 24859 24856 -3
Partials 1553 1553
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
body_textoverdill.loads(body)when restoring UDFs (udf_rehydrate.resolve_udf), including Spark transform execute and Pandas/Python/Rayfrom_proto. Strip leading decorators (e.g.@on_demand_feature_view) beforeexecso ODFV source rehydrates cleanly.feature_name_columnsas “all columns” (SELECT */DISTINCT ON … a.*), matching BatchFeatureView python/pandas mode and Ray semantics.allow_cache=Falseso FeatureViewState gates seeAVAILABLE_ONLINEafter materialize (no stale MATERIALIZING/GENERATED 500s).Out of scope (separate PR)
MATERIALIZINGFVs on failure) depends on/materialize-asyncfrom remote materialization (feat: Add remote materialization support via feature server #6590) and is not included here.Test plan
test_udf_rehydrate.py(source preference, decorator strip, dill fallback)feature_cols→SELECT */ star pathMade with Cursor