-
Notifications
You must be signed in to change notification settings - Fork 30
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
base: master
Are you sure you want to change the base?
Support s3 storage #379
Conversation
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.
# TODO: better virtual for this | ||
package { 'python3.11-django-storages': |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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.