Skip to content

fix: Fall back when UDF globals are missing - #6891

Open
zqzq0422 wants to merge 1 commit into
feast-dev:masterfrom
zqzq0422:codex/udf-rehydrate-globals
Open

zqzq0422 wants to merge 1 commit into
feast-dev:masterfrom
zqzq0422:codex/udf-rehydrate-globals

Conversation

@zqzq0422

Copy link
Copy Markdown
Contributor

What changed

Validate global names read by rehydrated UDF bytecode, including nested code objects. If source rehydration would leave a module global unresolved, return None so resolve_udf can use the persisted dill body. Attribute access such as frame.copy() and Python builtins remain valid.

Fixes #6815.

Validation

  • python -m py_compile feast/transformation/udf_rehydrate.py tests/unit/transformation/test_udf_rehydrate.py
  • Lightweight rehydration smoke checks passed for missing globals, nested callbacks, attribute access, and builtins.
  • git diff --check passed.
  • The targeted pytest file could not run because this environment does not have pytest, dill, or pandas installed.

Signed-off-by: chloe <823083779@qq.com>
@zqzq0422
zqzq0422 requested a review from a team as a code owner September 29, 2026 09:14
@codecov-commenter

codecov-commenter commented Sep 29, 2026 •

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.89%. Comparing base (a87c070) to head (a3fd7bd).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
sdk/python/feast/transformation/udf_rehydrate.py 76.19% 4 Missing and 1 partial ⚠️
❗ 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    #6891      +/-   ##
==========================================
+ Coverage   47.84%   47.89%   +0.05%     
==========================================
  Files         422      422              
  Lines       52727    52771      +44     
  Branches     7662     7673      +11     
==========================================
+ Hits        25226    25276      +50     
+ Misses      25680    25677       -3     
+ Partials     1821     1818       -3     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 49.24% <76.19%> (+0.05%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/transformation/udf_rehydrate.py 66.17% <76.19%> (+1.52%) ⬆️

... and 9 files with indirect coverage changes


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 a87c070...a3fd7bd. 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.

This branch has not been deployed

No deployments
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.

On-demand feature view UDFs lose their module globals when rebuilt from the registry, so serving fails with NameError

2 participants