You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: [Python] VertexAIFeatureStoreEnrichmentHandler raises UnboundLocalError on NotFound when exception_level=ExceptionLevel.QUIET #41345
VertexAIFeatureStoreEnrichmentHandler (sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py) has three related bugs around NotFound handling and client initialization:
UnboundLocalError when exception_level=ExceptionLevel.QUIET (lines 164-182):
When an entity key is not present in Vertex AI Feature Store and fetch_feature_values raises google.api_core.exceptions.NotFound, the except NotFound: block handles ExceptionLevel.WARN (return request, beam.Row()) and ExceptionLevel.RAISE, but has no branch for ExceptionLevel.QUIET. Execution falls through to line 181 (response_dict = dict(response.proto_struct)) and crashes with: UnboundLocalError: cannot access local variable 'response' where it is not associated with a value.
VertexAIFeatureStoreLegacyEnrichmentHandler ignores exception_level on NotFound (lines 302-305):
Unconditionally raises ValueError on NotFound even when exception_level is ExceptionLevel.WARN (the default) or ExceptionLevel.QUIET.
Live network RPCs inside __init__ (lines 115-125 and 258-268): __init__ instantiates an admin client and calls get_feature_online_store / aiplatform.Featurestore(...) during pipeline construction rather than inside __enter__, breaking offline pipeline validation, CI unit tests without GCP credentials, and template builds.
Missing return request, beam.Row() for ExceptionLevel.QUIET inside except NotFound: at lines 171-180, and eager admin existence checks in __init__ instead of __enter__.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Activity
arijeetmukherjee3108-droid commentedon Nov 26, 2026
.take-issue