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

Support s3 storage #379

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Support s3 storage #379

wants to merge 1 commit into from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 31, 2025

Pulp supports multiple storage backends via the django-storages package. This exposes both the file storage (default) and s3.

No specific s3 options are exposed, but rather the whole options hash. This makes it easily extensible, both for specific s3 tuning and for future expansion.

It depends on the django-storages Python package in install. This is too specific now, but changing that would require a packaging change.

Pulp supports multiple storage backends via the django-storages package.
This exposes both the file storage (default) and s3.

No specific s3 options are exposed, but rather the whole options hash.
This makes it easily extensible, both for specific s3 tuning and for
future expansion.

It depends on the django-storages Python package in install. This is too
specific now, but changing that would require a packaging change.
@ekohl ekohl added Enhancement New feature or request and removed Not yet reviewed labels Mar 31, 2025
Comment on lines +16 to +17
# TODO: better virtual for this
package { 'python3.11-django-storages':
Copy link
Member Author

Choose a reason for hiding this comment

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

@Odilhao any thoughts on how we should tackle this in packaging? I thought about a pulpcore-storages subpackage or multiple to reflect the extras in https://github.com/pulp/pulpcore/blob/528efde666ef49b6a3f0815e6084419750ee2314/pyproject.toml#L74-L77.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

We can use subpackages as we use for cachecontrol

%description -n python%{python3_pkgversion}-%{srcname}+filecache
This is a metapackage bringing in filecache extra requires for python%{python3_pkgversion}-%{srcname}
It contains no code, just makes sure the dependencies are installed.

%files -n python%{python3_pkgversion}-%{srcname}+filecache
%ghost %{python3_sitelib}/%{srcname}-%{version}.dist-info/

This code will generate the following package:
Provides: python3.12-cachecontrol+filecache = 0.14.2-4.el9 python3.12dist(cachecontrol[filecache]) = 0.14.2

We can use the rich decency package in this case python3.12dist(cachecontrol[filecache]) or in pulpcore logic
python3.12dist(pulpcore[s3])

For pulpcore I see the package like this:

%package -n python%{python3_pkgversion}-%{pypi_name}+s3
Summary: Metapackage for python%{python3_pkgversion}-%{pypi_name}: s3 extra
Requires: python%{python3_pkgversion}-django-storage+s3 >= 3.8.0

%description -n python%{python3_pkgversion}-%{pypi_name}+s3
This is a metapackage bringing in s3 extra requires for python%{python3_pkgversion}-%{pypi_name}
It contains no code, just makes sure the dependencies are installed.

%files -n python%{python3_pkgversion}-%{pypi_name}+s3
%ghost %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/

This will also require us to add the extra package into django-storage.

1 - https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras

Copy link
Member Author

Choose a reason for hiding this comment

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

I like the idea of converting the extras but it still contains the Python version in the name and I'd like to avoid that. Any thought on adding a Provides: pulpcore-storage-s3 on it that packaging could depend on?

Copy link
Member

Choose a reason for hiding this comment

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

I don't see a problem with Provides: pulpcore-storage-s3 we can add that to the metapackage

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

Successfully merging this pull request may close these issues.

2 participants