Skip to content

[Python] Catch PermissionDenied when checking the feature store in VertexAIFeatureStoreEnrichmentHandler - #40463

Open
schizophrenicmaniac wants to merge 1 commit into
apache:masterfrom
schizophrenicmaniac:fix/40442-bug-uncaught-permission-exception
Open

schizophrenicmaniac wants to merge 1 commit into
apache:masterfrom
schizophrenicmaniac:fix/40442-bug-uncaught-permission-exception

Conversation

@schizophrenicmaniac

Copy link
Copy Markdown
Contributor

VertexAIFeatureStoreEnrichmentHandler.__init__ tries to check that the feature store exists and is meant to only log a warning if the caller doesn't have admin permission. But the try/except only covered creating FeatureOnlineStoreAdminServiceClient, which makes no RPC. The call that actually checks permissions, get_feature_online_store, was in the else branch, so a PermissionDenied went uncaught and failed pipeline construction for users who only have data read access.

This moves the path building and get_feature_online_store into the try and catches PermissionDenied specifically, so NotFound and other errors still surface. Errors raised while creating the client are no longer turned into the "insufficient admin permission" warning either. They would fail again in __enter__ anyway. Added unit tests that mock the admin client for the PermissionDenied and NotFound cases.

Fixes #40442


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README for a list of workflows and how to trigger them.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.01%. Comparing base (69bdf5f) to head (e2a7473).
⚠️ Report is 44 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40463      +/-   ##
============================================
- Coverage     59.04%   59.01%   -0.03%     
+ Complexity    15624    15616       -8     
============================================
  Files          2797     2798       +1     
  Lines        280750   280843      +93     
  Branches      12488    12477      -11     
============================================
- Hits         165764   165747      -17     
- Misses       108540   108655     +115     
+ Partials       6446     6441       -5     
Flag Coverage Δ
python 79.55% <100.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @claudevdm for label python.

This pull request likely touches a core component ("core" label). Please review with scrutiny.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Uncaught permission exception during VertexAIFeatureStoreEnrichmentHandler initialization

1 participant