◐ Shell
clean mode source ↗

fix: Incorrect type passed to assert_permissions in materialize endpoints by robhowley · Pull Request #4727 · feast-dev/feast

Conversation

@robhowley

What this PR does / why we need it:

fixes permissions assertion in /materialize and /materialize-incremental, see attached git issue

Which issue(s) this PR fixes:

Fixes #4726

Misc

Signed-off-by: Rob Howley <howley.robert@gmail.com>

robhowley

Comment on lines 253 to 261

for feature_view in request.feature_views or []:
# TODO: receives a str for resource but isn't in the Union. is str actually allowed?
assert_permissions(
resource=feature_view, # type: ignore
resource=_get_feast_object(feature_view, True),
actions=[AuthzedAction.WRITE_ONLINE],
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix: we don't assert_permissions on the str name of the feature_view, but on the FeastObject itself

franciscojavierarceo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

shuchu pushed a commit to shuchu/feast that referenced this pull request

Nov 21, 2024

dharmisha pushed a commit to nishantgaurav-dev/feast that referenced this pull request

Jan 15, 2025

Labels

2 participants

@robhowley @franciscojavierarceo