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

Make online store nullable #2224

Merged

Conversation

mirayyuce
Copy link
Contributor

@mirayyuce mirayyuce commented Jan 19, 2022

What this PR does / why we need it: At "feast init" step if no provider is specified the current version initializes the online store with default type based on the provider. However, some users don't want to specify an online store. When the online store parameter is not set in feature_store.yaml with provider either gcp or aws, it will fail at apply().

Which issue(s) this PR fixes:

Fixes #1809

Does this PR introduce a user-facing change?:

NONE

Miray Yuce added 5 commits January 14, 2022 17:26
Signed-off-by: Miray Yuce <[email protected]>
Signed-off-by: Miray Yuce <[email protected]>
Signed-off-by: Miray Yuce <[email protected]>
Signed-off-by: Miray Yuce <[email protected]>
@feast-ci-bot
Copy link
Collaborator

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

@pyalex
Copy link
Collaborator

pyalex commented Jan 19, 2022

@mirayyuce thanks for your contribution!

However, using Feast without an online store is rather an exception than a rule, simply because this is one of the core features of Feast. I also suspect the proposed change might introduce inconsistency for users who don't specify online store type and instead use inferred value.
That being said, I think the fix should be to enable setting online_store explicitly to null in feature_store.yaml instead of setting sqlite as default always.

pyalex
pyalex previously requested changes Jan 19, 2022
Copy link
Collaborator

@pyalex pyalex left a comment

Choose a reason for hiding this comment

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

Better solution would be to make online_store nullable.
PR also should be cleaned up: .DS_Store files should be removed, unrelated changes should be removed.

@mirayyuce
Copy link
Contributor Author

@mirayyuce thanks for your contribution!

However, using Feast without an online store is rather an exception than a rule, simply because this is one of the core features of Feast. I also suspect the proposed change might introduce inconsistency for users who don't specify online store type and instead use inferred value. That being said, I think the fix should be to enable setting online_store explicitly to null in feature_store.yaml instead of setting sqlite as default always.

Thank you for the review @pyalex

In the issue I see two users who don't specify an online store with provider aws having some errors. GCP also causes different errors if we don't set the online store. It searches for Datastore or Firebase in GCP project. These errors were caused by the fact that apply() updates the online store with the latest feature values whether or not there is an online store. If there isn't an online/offline store, repo_config is setting the store type based on the provider, however because of the required parameters for both online and offline store those two users had issues.

I tried giving some dummy hardcoded values to aws online store parameters, but then it tried to connect and had credential errors.

At first I set the online store to null, however this caused problems with the tests. In all tests I see that sqlite is assumed as the default online store if it is not specified. This change will be the quickest change with minimum effect. It will help users having errors when they don't set an online store.

@mirayyuce mirayyuce changed the title Make online store key optional Make sqlite default online store Jan 19, 2022
@mavysavydav
Copy link
Collaborator

/ok-to-test

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2022

Codecov Report

Merging #2224 (765a91a) into master (2a95629) will decrease coverage by 24.69%.
The diff coverage is 62.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2224       +/-   ##
===========================================
- Coverage   84.98%   60.28%   -24.70%     
===========================================
  Files         105      106        +1     
  Lines        8450     8609      +159     
===========================================
- Hits         7181     5190     -1991     
- Misses       1269     3419     +2150     
Flag Coverage Δ
integrationtests ?
unittests 60.28% <62.00%> (+0.43%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/infra/aws.py 23.55% <0.00%> (-48.78%) ⬇️
.../python/tests/integration/registration/test_cli.py 55.78% <44.00%> (-44.22%) ⬇️
sdk/python/feast/repo_config.py 77.09% <50.00%> (-9.92%) ⬇️
sdk/python/feast/infra/local.py 95.45% <100.00%> (+0.10%) ⬆️
sdk/python/feast/infra/passthrough_provider.py 89.85% <100.00%> (-10.15%) ⬇️
.../tests/integration/scaffolding/test_repo_config.py 100.00% <100.00%> (ø)
.../integration/online_store/test_universal_online.py 15.20% <0.00%> (-82.94%) ⬇️
.../integration/online_store/test_online_retrieval.py 17.39% <0.00%> (-82.61%) ⬇️
...fline_store/test_universal_historical_retrieval.py 19.18% <0.00%> (-80.82%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 20.68% <0.00%> (-79.32%) ⬇️
... and 64 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 2a95629...765a91a. Read the comment docs.

Signed-off-by: Miray Yuce <[email protected]>
Signed-off-by: Miray Yuce <[email protected]>
@mirayyuce mirayyuce changed the title Make sqlite default online store Make online store nullable Jan 20, 2022
@pyalex
Copy link
Collaborator

pyalex commented Jan 20, 2022

  1. Sqlite is not a really good default choice for AWS or GCP. Simply because you will need to store sqlite file on S3 or GS to make it accessible by all services / clients (this is not local mode anymore) and natively sqlite is not even supporting S3 or GS (there are some hacks to make it work, but I would avoid them if possible).

  2. For most users (that are using online store) it's totally fine and expected that Feast is trying to setup datastore / dynamo during apply. And some of them might have feature_store.yaml looking like this:

provider: aws
online_store:
  region: us-west-2

The proposed change will break their setup.

  1. That's why I propose to make online_store Optional and allow explicitly set it to null. Yes, this will require some changes to apply flow and maybe updating some tests. But this would be a more consistent solution that won't break existing users' configurations and actually would solve the original problem, which was that some users don't need an online store, which is not equivalent to "some users want to have sqlite as default on AWS/GCP".

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.

looks great overall!

sdk/python/feast/repo_config.py Outdated Show resolved Hide resolved
sdk/python/tests/integration/registration/test_cli.py Outdated Show resolved Hide resolved
Miray Yuce added 3 commits January 25, 2022 12:49
Signed-off-by: Miray Yuce <[email protected]>
Signed-off-by: Miray Yuce <[email protected]>
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.

@mirayyuce looks great overall! I think with a few more changes, this should be ready to merge in

sdk/python/feast/repo_config.py Outdated Show resolved Hide resolved
sdk/python/feast/infra/local.py Outdated Show resolved Hide resolved
sdk/python/feast/infra/passthrough_provider.py Outdated Show resolved Hide resolved
Signed-off-by: Miray Yuce <[email protected]>
@mirayyuce mirayyuce requested a review from pyalex January 26, 2022 03:15
Signed-off-by: Miray Yuce <[email protected]>
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: felixwang9817, mirayyuce

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 felixwang9817 dismissed pyalex’s stale review January 26, 2022 22:26

cc @pyalex I think your comments have been addressed

@feast-ci-bot feast-ci-bot merged commit 88fac8b into feast-dev:master Jan 26, 2022
@felixwang9817
Copy link
Collaborator

@mirayyuce thanks for the contribution to Feast!!

@mirayyuce
Copy link
Contributor Author

@mirayyuce thanks for the contribution to Feast!!

Thank you so much for the guidance!

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.

Leaving "online_store" key out of "aws" provider in feature_store.yaml produces error
8 participants