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

Support of GC and S3 storages for registry in Java Feature Server #2043

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

pyalex
Copy link
Collaborator

@pyalex pyalex commented Nov 16, 2021

Signed-off-by: pyalex [email protected]

What this PR does / why we need it:

Previously only local file could be used as registry in Java Feature Server. This PR adds support for both Google Storage and AWS S3 as possible sources for registry file. Feature Server can only read registry file and not update it. It also may periodically check (when this enabled) if registry file was updated and load new version into memory.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

New application property `feast.registry-refresh-interval` when set to value bigger than `0` will enable periodical check whether registry file was updated

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2021

Codecov Report

Merging #2043 (32a4051) into master (7032559) will increase coverage by 25.76%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2043       +/-   ##
===========================================
+ Coverage   57.54%   83.31%   +25.76%     
===========================================
  Files         100      100               
  Lines        8028     8080       +52     
===========================================
+ Hits         4620     6732     +2112     
+ Misses       3408     1348     -2060     
Flag Coverage Δ
integrationtests 73.74% <ø> (?)
unittests 58.24% <ø> (+0.69%) ⬆️

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

Impacted Files Coverage Δ
sdk/python/feast/repo_operations.py 42.58% <0.00%> (-1.37%) ⬇️
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%) ⬆️
sdk/python/feast/data_source.py 61.29% <0.00%> (+6.45%) ⬆️
sdk/python/feast/infra/offline_stores/file.py 96.80% <0.00%> (+8.00%) ⬆️
sdk/python/feast/feature_view.py 88.05% <0.00%> (+10.69%) ⬆️
sdk/python/feast/infra/passthrough_provider.py 100.00% <0.00%> (+11.11%) ⬆️
... and 50 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 7032559...32a4051. Read the comment docs.

@pyalex pyalex added the kind/feature New feature or request label Nov 16, 2021
@pyalex pyalex changed the title Support of GCS and s3 storages for registry in Java Feature Server Support of GC and S3 storages for registry in Java Feature Server Nov 16, 2021
@pyalex pyalex force-pushed the java-cloud-registry branch 2 times, most recently from dd96ee2 to 85b166b Compare November 17, 2021 03:17
this.registry = new Registry(this.registryFile.getContent());

if (refreshIntervalSecs > 0) {
setupPeriodicalRefresh(refreshIntervalSecs);
Copy link
Member

Choose a reason for hiding this comment

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

In the AWS Lambda Feature server, every feast apply is responsible for tearing down existong lambdas and recreating them with the new registry file. Should we follow the same pattern in feast-serving? Just seems weird that the behavior for the two servings options is different in this respect.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although, I agree on consistency point, this is a little different case. Java Feature Server will be deployed in Kubernetes (see my proposal for deploying architecture in #2017 ) with Helm chart (at least for now). I also would argue that restarting pod on each registry change might be not be desired in production environment (not sure whether it's good thing for lambda as well, since it also doesn't start instantly).
But the main problem that currently feast sdk isn't capable of managing complex infrastructure, even aws lambda is currently deployed not completely (still requires manually configuration), and for this case we would need to manage kubernetes object. Probably that will be solved with introduction of pulumi.
But I still think that this current simple solution deserves to exist. It could be short-term solution until feast apply is capable of managing complex infra or long-term for people who will manage infra manually.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, yeah I think that's fair. For more "productionized" services, the ability to run without restarts is valuable.

Copy link
Member

Choose a reason for hiding this comment

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

Is it worth making a TODO comment here with our reasoning? I just want to make sure that we capture our decision.

Signed-off-by: pyalex <[email protected]>
@achals
Copy link
Member

achals commented Nov 18, 2021

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, pyalex

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

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.

5 participants