Skip to content

fix: source-first UDF rehydrate, Postgres empty-cols SELECT *, online allow_cache=False#6620

Closed
aniketpalu wants to merge 1 commit into
feast-dev:masterfrom
aniketpalu:fix/udf-source-rehydrate-postgres-online-cache
Closed

fix: source-first UDF rehydrate, Postgres empty-cols SELECT *, online allow_cache=False#6620
aniketpalu wants to merge 1 commit into
feast-dev:masterfrom
aniketpalu:fix/udf-source-rehydrate-postgres-online-cache

Conversation

@aniketpalu

@aniketpalu aniketpalu commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • F1/F2: Prefer registry body_text over dill.loads(body) when restoring UDFs (udf_rehydrate.resolve_udf), including Spark transform execute and Pandas/Python/Ray from_proto. Strip leading decorators (e.g. @on_demand_feature_view) before exec so ODFV source rehydrates cleanly.
  • F3: Postgres offline store treats empty feature_name_columns as “all columns” (SELECT * / DISTINCT ON … a.*), matching BatchFeatureView python/pandas mode and Ray semantics.
  • F5a: Online request path always reads FVs with allow_cache=False so FeatureViewState gates see AVAILABLE_ONLINE after materialize (no stale MATERIALIZING/GENERATED 500s).

Out of scope (separate PR)

Test plan

  • Unit: test_udf_rehydrate.py (source preference, decorator strip, dill fallback)
  • Unit: Postgres empty feature_colsSELECT * / star path
  • E2E (optional): SparkApplication UDF materialize + ODFV online on mixed Python images

Made with Cursor

…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>
@aniketpalu
aniketpalu requested a review from a team as a code owner July 20, 2026 15:01
# 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
aniketpalu marked this pull request as draft July 20, 2026 15:03
@aniketpalu aniketpalu closed this Jul 20, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.94%. Comparing base (294efad) to head (35dca23).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            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              
Flag Coverage Δ *Carryforward flag
go-feature-server 30.58% <ø> (ø)
python-unit 47.24% <ø> (-0.01%) ⬇️ Carriedforward from 294efad

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
sdk/python/feast/feature_server.py 62.84% <ø> (ø)
...ast/infra/compute_engines/spark/feature_builder.py 0.00% <ø> (ø)
.../python/feast/infra/compute_engines/spark/nodes.py 25.92% <ø> (-0.15%) ⬇️
..._stores/contrib/postgres_offline_store/postgres.py 44.47% <ø> (-0.61%) ⬇️
...thon/feast/transformation/pandas_transformation.py 72.22% <ø> (-0.51%) ⬇️
...thon/feast/transformation/python_transformation.py 86.79% <ø> (-0.25%) ⬇️
.../python/feast/transformation/ray_transformation.py 0.00% <ø> (ø)
sdk/python/feast/utils.py 76.83% <ø> (-0.04%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 294efad...35dca23. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants