Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unexpected feature view deletion when applying edited odfv #2054

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

ArrichM
Copy link
Contributor

@ArrichM ArrichM commented Nov 17, 2021

What this PR does / why we need it:
When changing existing on-demand-feature-views, the existing proto in the registry needs to be replaced by the new one. In this step, the existing proto has been deleted from the wrong container. The existing implementation always deletes the proto of the given index from the REGULAR feature-view container, not the odfv container.

This leads to:

  1. Unexpected deletion of feature views
  2. Index error when there are more odfv than regular feature views.

Does this PR introduce a user-facing change?:

NONE

…ature-view has changed.

Signed-off-by: ArrichM <maximilianjakob.arrich@student.unisg.ch>
@feast-ci-bot
Copy link
Collaborator

Hi @ArrichM. Thanks for your PR.

I'm waiting for a feast-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #2054 (6f63453) into master (7032559) will increase coverage by 0.75%.
The diff coverage is 79.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2054      +/-   ##
==========================================
+ Coverage   57.54%   58.30%   +0.75%     
==========================================
  Files         100      100              
  Lines        8028     8066      +38     
==========================================
+ Hits         4620     4703      +83     
+ Misses       3408     3363      -45     
Flag Coverage Δ
unittests 58.30% <79.48%> (+0.75%) ⬆️

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

Impacted Files Coverage Δ
...on/tests/integration/registration/test_registry.py 72.04% <78.94%> (+2.13%) ⬆️
sdk/python/feast/registry.py 70.27% <100.00%> (+2.79%) ⬆️
sdk/python/tests/conftest.py 68.83% <0.00%> (-1.30%) ⬇️
sdk/python/feast/data_source.py 60.88% <0.00%> (+6.04%) ⬆️
sdk/python/feast/on_demand_feature_view.py 60.83% <0.00%> (+25.83%) ⬆️

Continue to review full report at Codecov.

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

@@ -341,7 +341,7 @@ def apply_feature_view(
):
return
else:
del self.cached_registry_proto.feature_views[idx]
del existing_feature_views_of_same_type[idx]
Copy link
Collaborator

Choose a reason for hiding this comment

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

good catch - do you mind adding a test in test_registry.py for this case? I definitely feel like we should have caught this bug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I just added a case testing the modification of an odfv.

…re not interfered with when modifying on-demand-feature-views.

Signed-off-by: ArrichM <maximilianjakob.arrich@student.unisg.ch>
Copy link
Collaborator

@felixwang9817 felixwang9817 left a comment

Choose a reason for hiding this comment

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

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ArrichM, felixwang9817

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@felixwang9817
Copy link
Collaborator

/kind bug

@felixwang9817
Copy link
Collaborator

/ok-to-test

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.

4 participants