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

Implement feature uploading bento repo to S3. #356

Merged
merged 1 commit into from Oct 26, 2019

Conversation

@leonsim
Copy link
Collaborator

leonsim commented Oct 21, 2019

(Thanks for sending a pull request! Please make sure to read the contribution guidelines, then fill out the blanks below.)

What changes were proposed in this pull request?

Does this close any currently open issues?

How was this patch tested?

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 21, 2019

Codecov Report

Merging #356 into master will decrease coverage by 0.08%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #356      +/-   ##
==========================================
- Coverage   53.67%   53.59%   -0.09%     
==========================================
  Files          78       78              
  Lines        5246     5269      +23     
==========================================
+ Hits         2816     2824       +8     
- Misses       2430     2445      +15
Impacted Files Coverage Δ
bentoml/yatai/yatai_service_impl.py 35.17% <ø> (ø) ⬆️
bentoml/deployment/serverless/aws_lambda.py 0% <ø> (ø) ⬆️
bentoml/proto/repository_pb2.py 100% <ø> (ø) ⬆️
bentoml/repository/__init__.py 56.32% <25%> (+0.5%) ⬆️
bentoml/yatai/python_api.py 65.38% <42.3%> (-24.62%) ⬇️

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 00555cd...8e52040. Read the comment docs.

@pep8speaks

This comment has been minimized.

Copy link

pep8speaks commented Oct 21, 2019

Hello @leonsim, Thanks for updating this PR.

There are currently no PEP 8 issues detected in this PR. Cheers! 🍻

Comment last updated at 2019-10-26 04:50:32 UTC
@leonsim leonsim force-pushed the s3 branch 3 times, most recently from 8a61b5a to a89fc0c Oct 21, 2019
@leonsim leonsim changed the title Expand an endpoint to support uploading to S3. Implement feature uploading bento repo to S3. Oct 21, 2019
@@ -122,3 +122,6 @@ built-docs

# MacOS X
.DS_Store

# sqlite
storage.db

This comment has been minimized.

Copy link
@parano

parano Oct 22, 2019

Member

this should not be created in the repo directory right? curious why adding this

This comment has been minimized.

Copy link
@leonsim

leonsim Oct 24, 2019

Author Collaborator

if I install BentoML by pip install -e . then this file will be generated when I run a service.save() command.

bentoml/yatai/python_api.py Outdated Show resolved Hide resolved
bentoml/yatai/python_api.py Outdated Show resolved Hide resolved

# Return URI to saved bento in repository storage
return response.uri.uri
elif response.uri.type == BentoUri.S3:
with tempfile.TemporaryDirectory() as tmpdir:

This comment has been minimized.

Copy link
@parano

parano Oct 26, 2019

Member

add something like update_bento_upload_progress(... , InProgress, progress = 0) here? since the upload may take a while

tar.add(tmpdir, arcname=bento_service.name)
fileobj.seek(0, 0)

files = {'file': ('dummy', fileobj)}

This comment has been minimized.

Copy link
@parano

parano Oct 26, 2019

Member

could you add a comment about "dummy" here?

@parano

This comment has been minimized.

Copy link
Member

parano commented Oct 26, 2019

Thanks for updating the PR @leonsim , merging now!

@parano parano merged commit eeb398c into master Oct 26, 2019
3 of 5 checks passed
3 of 5 checks passed
codecov/patch 40% of diff hit (target 53.67%)
Details
codecov/project 53.59% (-0.09%) compared to 00555cd
Details
License Compliance All checks passed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.