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

Add Dockerfile for GCP CloudRun FeatureServer #1887

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

judahrand
Copy link
Member

@judahrand judahrand commented Sep 20, 2021

What this PR does / why we need it:
Pretty self explanatory.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Add Dockerfile for GCP CloudRun FeatureServer.

@feast-ci-bot
Copy link
Collaborator

Hi @judahrand. 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 Sep 20, 2021

Codecov Report

Merging #1887 (0892133) into master (df724a8) will decrease coverage by 1.50%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1887      +/-   ##
==========================================
- Coverage   81.89%   80.39%   -1.51%     
==========================================
  Files          97       99       +2     
  Lines        7756     9345    +1589     
==========================================
+ Hits         6352     7513    +1161     
- Misses       1404     1832     +428     
Flag Coverage Δ
integrationtests 75.50% <ø> (+1.44%) ⬆️
unittests 59.28% <ø> (ø)

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

Impacted Files Coverage Δ
sdk/python/feast/repo_config.py 78.97% <ø> (ø)
...fline_store/test_universal_historical_retrieval.py 75.29% <0.00%> (-24.00%) ⬇️
...n/feature_repos/universal/data_sources/bigquery.py 74.57% <0.00%> (-23.05%) ⬇️
sdk/python/feast/infra/offline_stores/bigquery.py 64.47% <0.00%> (-15.64%) ⬇️
sdk/python/feast/infra/offline_stores/redshift.py 69.37% <0.00%> (-15.63%) ⬇️
sdk/python/tests/utils/data_source_utils.py 84.61% <0.00%> (-15.39%) ⬇️
sdk/python/feast/infra/utils/aws_utils.py 62.96% <0.00%> (-8.06%) ⬇️
sdk/python/feast/repo_operations.py 36.85% <0.00%> (-7.36%) ⬇️
...python/feast/infra/offline_stores/offline_store.py 84.12% <0.00%> (-3.38%) ⬇️
...python/feast/infra/offline_stores/offline_utils.py 88.46% <0.00%> (-1.76%) ⬇️
... and 14 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 df724a8...0892133. Read the comment docs.

@felixwang9817 felixwang9817 self-assigned this Sep 20, 2021
@adchia
Copy link
Collaborator

adchia commented Sep 20, 2021

/ok-to-test

@felixwang9817
Copy link
Collaborator

Hey @judahrand, thanks for this PR! We're currently working on serverless deployments on AWS Lambda, so a few things will likely be changing over the next couple of weeks (e.g. in the app.py and config.py files you have). Are GCP serverless deployments a blocker for you right now? If not, we'd prefer to delay merging in this PR until the AWS Lambda work has landed, which should be in ~2 weeks.

@judahrand
Copy link
Member Author

Works for me! Happy to rework this then if need be.

@felixwang9817
Copy link
Collaborator

Great, thanks @judahrand. I'll let you know when the AWS serverless changes have landed.

Comment on lines 22 to 23
execution_role_name: StrictStr
"""The execution role for the AWS Lambda function."""
Copy link
Member

Choose a reason for hiding this comment

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

Probably don't need this for gcp?

Comment on lines +13 to +17
enabled: StrictBool = False
"""Whether the feature server should be launched."""

public: StrictBool = True
"""Whether the endpoint should be publicly accessible."""
Copy link
Member

Choose a reason for hiding this comment

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

Are these used anywhere?

Copy link
Member Author

@judahrand judahrand Oct 15, 2021

Choose a reason for hiding this comment

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

I assume so? They are defined as the required configuration parameters in the AWS Lambda RFC. I assume we'd want to follow the same interface?

image

store = FeatureStore(repo_path=str(repo_path.resolve()))

# Create the FastAPI app
app = get_app(store)
Copy link
Member

Choose a reason for hiding this comment

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

Is the only diff between this and the aws lambda app the fact that that one uses mangum?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I believe that is the only difference in the app.py file.

Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>
@judahrand judahrand force-pushed the docker-cloudrun branch 2 times, most recently from fafdc80 to 041b0e4 Compare October 15, 2021 08:24
Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>
Signed-off-by: Judah Rand <17158624+judahrand@users.noreply.github.com>
@judahrand
Copy link
Member Author

@achals Failures don't look like my fault

@achals
Copy link
Member

achals commented Oct 15, 2021

@achals Failures don't look like my fault

yeah i fixed these (integ test clean up issue). Can you remove the role name field from the gcp config? Should be g2g after that.

@judahrand
Copy link
Member Author

@achals Failures don't look like my fault

yeah i fixed these (integ test clean up issue). Can you remove the role name field from the gcp config? Should be g2g after that.

I did, didn't I? 🤔 Do you mean something other than what I removed?

@achals
Copy link
Member

achals commented Oct 15, 2021

@achals Failures don't look like my fault

yeah i fixed these (integ test clean up issue). Can you remove the role name field from the gcp config? Should be g2g after that.

I did, didn't I? 🤔 Do you mean something other than what I removed?

Oh oops I was looking at an older version of the PR. You did, my bad.

@woop
Copy link
Member

woop commented Oct 15, 2021

Shouldn't dockerfiles be in https://github.com/feast-dev/feast/tree/master/infra/docker?

@judahrand
Copy link
Member Author

judahrand commented Oct 15, 2021

🤷 I just followed the pattern 😛

The AWS one lives in the equivalent place at the moment.

I kinda think this is okay. Otherwise, the resources for the Feature Server cloud deployments will get spread out and more difficult to work on.

@judahrand
Copy link
Member Author

Shouldn't dockerfiles be in https://github.com/feast-dev/feast/tree/master/infra/docker?

Also I think the answer here is no as my understanding is that these Dockerfiles are part of the SDK. There are needed in order to locally build the images and push them to the user's registry.

@judahrand
Copy link
Member Author

@achals Do you think this is worth merging and then working on the other bits needed to complete the CloudRun support? (The failed test looks like a timeout)

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, judahrand

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

/ok-to-test

@felixwang9817
Copy link
Collaborator

/kind feature

@feast-ci-bot feast-ci-bot added kind/feature New feature or request and removed needs-kind labels Oct 20, 2021
@felixwang9817
Copy link
Collaborator

felixwang9817 commented Oct 20, 2021

Hey @judahrand, your changes lgtm but for some reason integration tests are failing (doesn't seem to be due to your changes). I'm going to take a look and see if I fix the integration test failures.

Edit: nvm, looks like your changes have been merged.

@feast-ci-bot feast-ci-bot merged commit 41affbb into feast-dev:master Oct 20, 2021
@judahrand
Copy link
Member Author

Hey @judahrand, your changes lgtm but for some reason integration tests are failing (doesn't seem to be due to your changes). I'm going to take a look and see if I fix the integration test failures.

Edit: nvm, looks like your changes have been merged.

It looked like a timeout when I looked briefly - job was cancelled rather than failure iirc.

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.

7 participants