Skip to content

S3 endpoint configuration #1169 - #1172

Merged
feast-ci-bot merged 12 commits into
feast-dev:masterfrom
mike0sv:master
Nov 22, 2020
Merged

S3 endpoint configuration #1169#1172
feast-ci-bot merged 12 commits into
feast-dev:masterfrom
mike0sv:master

Conversation

@mike0sv

@mike0sv mike0sv commented Nov 16, 2020

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1169

Does this PR introduce a user-facing change?:

Added an option to configure S3 endpoint url

@feast-ci-bot

Copy link
Copy Markdown
Collaborator

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

Details

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.

@woop

woop commented Nov 17, 2020

Copy link
Copy Markdown
Member

Thanks for this @mike0sv!

/ok-to-test

@woop

woop commented Nov 17, 2020

Copy link
Copy Markdown
Member

/kind feature

@feast-ci-bot feast-ci-bot added kind/feature New feature or request and removed needs-kind labels Nov 17, 2020
@mike0sv

mike0sv commented Nov 17, 2020

Copy link
Copy Markdown
Contributor Author

Hey, @woop, some tests failed because I provided None as default value. There are two possible solutions, 1) add allow_no_value=True to ConfigParser so it will tolerate Nones 2) Set default to https://s3.amazonaws.com, which is default value of ._endpoing when you create boto3.client('s3'). Which do you prefer?

@woop

woop commented Nov 17, 2020

Copy link
Copy Markdown
Member

allow_no_value

I prefer allow_no_value=True. Thanks for giving us options 💯

Signed-off-by: mike0sv <mike0sv@gmail.com>
Signed-off-by: mike0sv <mike0sv@gmail.com>
@mike0sv

mike0sv commented Nov 17, 2020

Copy link
Copy Markdown
Contributor Author

Not sure, why this was closed and not sure why tests failed (seems to be not related to my changes). Please send help :)

@mike0sv mike0sv reopened this Nov 17, 2020
@woop

woop commented Nov 17, 2020

Copy link
Copy Markdown
Member

Not sure, why this was closed and not sure why tests failed (seems to be not related to my changes). Please send help :)

Can you please run make format prior to pushing your commit? That should fix lint-python

@pyalex is trying to fix the other test here: https://github.com/feast-dev/feast/pull/1173/files

@mike0sv

mike0sv commented Nov 17, 2020

Copy link
Copy Markdown
Contributor Author

lint-python fails because of the None, that changed DEAFULTS type from Dict[str, str] to Dict[str, Optional[str]] and mypy raises an error for deafults argument for ConfigParser. Not sure where it gets that it should be Mapping[str, str] thou

@mike0sv

mike0sv commented Nov 21, 2020

Copy link
Copy Markdown
Contributor Author

Unfortunately, the vars solution was not working, because vars takes precedence before the actual config, so passing DEFAULTS there were never gonna work. After that I tried to utilize fallback option, but this way I lost free type casting the configparser module provided. So I decided to approach the "defaults are saved to file" problem by hacking _defaults attribute for the time of writing. Added some tests and it seems to work

Signed-off-by: mike0sv <mike0sv@gmail.com>
@mike0sv

mike0sv commented Nov 21, 2020

Copy link
Copy Markdown
Contributor Author

/retest


self._config = config # type: ConfigParser
self._path = path # type: str

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

By the way, I think you should submit this change as part of a separate PR please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Created new PR, it seems it needs to be merged before this one

Signed-off-by: mike0sv <mike0sv@gmail.com>
@mike0sv

mike0sv commented Nov 22, 2020

Copy link
Copy Markdown
Contributor Author

...

@mike0sv mike0sv reopened this Nov 22, 2020
Signed-off-by: mike0sv <mike0sv@gmail.com>
@woop

woop commented Nov 22, 2020

Copy link
Copy Markdown
Member

Unfortunately, the vars solution was not working, because vars takes precedence before the actual config, so passing DEFAULTS there were never gonna work. After that I tried to utilize fallback option, but this way I lost free type casting the configparser module provided. So I decided to approach the "defaults are saved to file" problem by hacking _defaults attribute for the time of writing. Added some tests and it seems to work

Noted, didn't realize that.

This was referenced Nov 22, 2020

def _upload_to_file_source(
file_url: str, with_partitions: bool, dest_path: str
file_url: str, with_partitions: bool, dest_path: str, config: Config

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the arguments in the docstring is out of date. Would you mind updating?

Signed-off-by: mike0sv <mike0sv@gmail.com>
@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mike0sv, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@woop

woop commented Nov 22, 2020

Copy link
Copy Markdown
Member

/lgtm

@feast-ci-bot
feast-ci-bot merged commit aed366b into feast-dev:master Nov 22, 2020
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.

S3 endpoint configuration

3 participants