thoth-station / storages

Storage and database adapters for project Thoth
https://thoth-station.github.io/
GNU General Public License v3.0
14 stars 16 forks source link

[2pt]Export S3 config factory #2700

Open VannTen opened 2 years ago

VannTen commented 2 years ago

Problem statement

As a Thoth developer, I would like to use directly the boto3 library for cases where storages (this module) API is inconvenient. However, I don't want to parse the environment configuration myself

Proposal description

Exposes a function returning a config object created from the environment variables described in the README

Additional context

This would have been useful for example in https://github.com/thoth-station/document-sync-job/pull/37

Acceptance Criteria

/kind feature /priority backlog /good-first-issue /sig stack-guidance

sesheta commented 2 years ago

@VannTen: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/thoth-station/storages/issues/2700): >## Problem statement >As a Thoth developer, I would like to use directly the boto3 library for cases >where `storages` (this module) API is inconvenient. However, I don't want to >parse the environment configuration myself > >## Proposal description > >Exposes a function returning a `botocore.config.Config` object created >from the environment variables described in the README > >### Additional context >This would have been useful for example in https://github.com/thoth-station/document-sync-job/pull/37 > >## Acceptance Criteria > > >- [ ] storages export a "s3 config factory" >- [ ] at least one client for that API (https://github.com/thoth-station/document-sync-job/pull/37 is a good candidate) > >/kind feature >/priority backlog >/good-first-issue >/sig stack-guidance > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.