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

S3 support #190

Merged
merged 9 commits into from
Jul 22, 2022
Merged

S3 support #190

merged 9 commits into from
Jul 22, 2022

Conversation

mak
Copy link
Contributor

@mak mak commented Jul 21, 2022

MinIO is S3 compatible so it may make sense to use just S3 compatible lib instead of minio-py - this also allows to use other S3-compatibile storage such as amazon or ceph

@psrok1
Copy link
Member

psrok1 commented Jul 21, 2022

Nice, thanks for contribution!

@@ -46,8 +46,8 @@ def __init__(
self._load_from_env()

Copy link
Member

@psrok1 psrok1 Jul 21, 2022

Choose a reason for hiding this comment

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

I have doubts about backwards compatibility, because change in major section name might cause some troubles in fluent transition from 4.x.x to 5.x.x.

I would start with deprecation and add something like that:

Suggested change
if self.has_section("minio") and not self.has_section("s3"):
warning.warn("[minio] section in configuration is deprecated, replace it with [s3]", DeprecationWarning)
self._config["s3"] = self._config["minio"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah why not

karton/core/backend.py Outdated Show resolved Hide resolved
karton/core/backend.py Show resolved Hide resolved
Copy link
Member

@psrok1 psrok1 left a comment

Choose a reason for hiding this comment

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

Great, thanks! 🎉 Added a bit better fallback and found that DeprecationWarnings are actually ignored outside __main__ (https://docs.python.org/3/library/exceptions.html#DeprecationWarning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants