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

Don't allow FeatureStore.apply with commit=False #2047

Conversation

nossrannug
Copy link
Contributor

What this PR does / why we need it:
The FeatureStore.apply method will call update_infra for the provider without
offering a dry run, so invoking it without committing should not be
an option. It would make all the infra updates but not update the
registry causing them to be out of sync.

Added commit=False to apply_feature_service and apply_feature_table in the
apply method.

Which issue(s) this PR fixes:
When calling feast apply and adding a feature table or feature service
the registry will get updated even if the update_infra call fails.
This PR makes the only registry commit happen after the call to update_infra
has completed successfully.

Does this PR introduce a user-facing change?:

NONE

The apply method will call update_infra for the provider without
offering a dry run, so invoking it without committing should not be
an option. It would make all the infra updates but not update the
registry causing them to be out of sync.

Added commit=False to apply_feature_service and apply_feature_table in the
apply method.
Today when calling apply, the update_infra might fail but then we have
already updated the registry causing everything to be out of sync.

Signed-off-by: Gunnar Sv Sigurbjörnsson <gunnar.sigurbjornsson@gmail.com>
@feast-ci-bot
Copy link
Collaborator

Hi @nossrannug. 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.

@achals
Copy link
Member

achals commented Nov 17, 2021

Thanks for identifying the bug and the fix @nossrannug!

Copy link
Member

@achals achals 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: achals, nossrannug

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

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #2047 (90787bb) into master (d0a7863) will increase coverage by 23.40%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2047       +/-   ##
===========================================
+ Coverage   60.01%   83.41%   +23.40%     
===========================================
  Files         103      100        -3     
  Lines        8523     8026      -497     
===========================================
+ Hits         5115     6695     +1580     
+ Misses       3408     1331     -2077     
Flag Coverage Δ
integrationtests 74.16% <50.00%> (?)
unittests 57.55% <25.00%> (-2.47%) ⬇️

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

Impacted Files Coverage Δ
sdk/python/feast/repo_operations.py 44.12% <0.00%> (+0.17%) ⬆️
sdk/python/feast/feature_store.py 90.42% <66.66%> (+19.29%) ⬆️
.../python/tensorflow_metadata/proto/v0/schema_pb2.py
...dk/python/tensorflow_metadata/proto/v0/path_pb2.py
...hon/tensorflow_metadata/proto/v0/statistics_pb2.py
sdk/python/feast/online_response.py 87.71% <0.00%> (+1.75%) ⬆️
sdk/python/feast/infra/online_stores/sqlite.py 96.77% <0.00%> (+2.15%) ⬆️
sdk/python/feast/feature.py 72.72% <0.00%> (+3.03%) ⬆️
sdk/python/feast/infra/provider.py 91.73% <0.00%> (+4.95%) ⬆️
sdk/python/feast/errors.py 70.00% <0.00%> (+5.00%) ⬆️
... and 54 more

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 d0a7863...90787bb. Read the comment docs.

@felixwang9817
Copy link
Collaborator

/kind bug

@feast-ci-bot feast-ci-bot merged commit 8426ca5 into feast-dev:master Nov 18, 2021
@nossrannug nossrannug deleted the dont-commit-to-registry-until-update-complete branch November 18, 2021 09:08
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.

None yet

5 participants