Rework package management to allow composition of dependencies
@smortex đang làm issue này rồi.
Từ ngày 10/1/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
This issue has the purpose of tracking progress for improving the way the puppet-python module manage packages.
Issues we want to solve
In these example, we assume a control-repo with a profile::python class that wraps the puppet-python module with site-specific config:
class profile::python {
class { 'python':
ensure => present,
# ...
}
}
System packages with dependencies on python-foo
The syslog-ng-mod-python package depend on python-venv. When this package is added to the catalog, puppet will install syslog-ng-mod-python, which will install python-venv as a dependency. On next run, python-venv is removed (because the python class default to ensure this package is absent) and syslog-ng-mod-python which depend on it is also removed.
To workaround this issue, we can skip management of the python-venv in the python module with:
class profile::python {
class { 'python':
# ...
manage_venv_package => false, # python-venv is a dependency of syslog-ng-mod-python
}
}
If another node need to have the venv package installed, we have a few solutions:
- Add a parameter to the
profile::pythonand use Hiera to set it to a custom value on the nodes that must have different behavior; - Duplicate and adjust the
profile::pythonclass (e.g.profile::python_with_venv) and include one or the other of these two conflicting profiles, leading to some duplication; - Manage the
python-venvpackage in the profile that need it, duplicating what the puppet-python module is supposed to manage.
None of these solutions is great.
Puppet modules needing a specific component
The puppet-puppetboard module rely on the puppet-python module. When installing from a venv, it include this code in the catalog:
class { 'python':
version => $python_version,
dev => 'present',
venv => 'present',
}
This clash with the above profile::python. To cope with this, the module provide a manage_virtualenv parameter to skips this fragment and allow the user to handle this themself, with the same solutions and same drawbacks as seen in the previous example.
How puppetlabs-apache handle a similar issue
Apache has a lot of different modules, but each one is managed in a different class allowing to do some composition of the dependencies from another puppet module, e.g.:
class taiga::vhost {
include apache
include apache::mod::passenger
# ...
}
For the end-user include taiga::vhost will do the right thing, and if they want to customize the apache::mod::passenger parameters, they can do this in their code:
class profile::taiga {
class { 'apache::mod::passenger':
# ... this would be in a passenger specific profile
}
class { 'taiga::vhost':
# ...
}
}
Roadmap
After this long context, I propose to rework the module package management to match what is done by puppetlabs-apache, make it easier to manage dependencies in consumer modules and avoid conflicts.
This is a three step process:
- Allow to opt-out of management of
python-dev(enhancement) #669 [Released in v7.1.0]; - Move components installation code in dedicated classes (enhancement) #670;
- Change defaults for packages which are ensured absent by default: switch them to installed but do not manage them by default (backwards-incompatible).
- Ngôn ngữ chính
- Ruby
- Star
- 196
- Fork
- 371
- Merge trung bình
- 5 giờ 54 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voxpupuli/puppet-python
-
Requirements not installedĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
voxpupuli/puppet-python#759 ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
voxpupuli/puppet-python#743 · 1 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
voxpupuli/puppet-python#721 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
voxpupuli/puppet-python#711 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
voxpupuli/puppet-python#673 · 1 bình luận ·
Tất cả issue của voxpupuli/puppet-python
Issue tương tự
-
Missing zh-CN translation: components/common/CommunitySolution.tsx:communitySolution.authorsSolutionĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
openstreetmap/openstreetmap-website#7554 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bensheldon/good_job#1904 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
riscv/riscv-unified-db#2785 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Limit which neighbourhoods a site admin can changeCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởsecurity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
geeksforsocialchange/PlaceCal#3838 ·
Maintainer thường phản hồi trong vòng 1 ngày