Actions
Issue #7236
closedSync fails if packages do not have a 'section' field
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Debian:
Platform Release:
Target Release - Debian:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
The following remote can be used to reproduce this:
http post :/pulp/api/v3/remotes/deb/apt/ name=mongo_debian_remote distributions="buster/mongodb-org/4.4" url="http://repo.mongodb.org/apt/debian/"
The traceback:
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.8/site-packages/rq/worker.py", line 934, in perform_job
rv = job.perform()
File "/usr/local/lib/pulp/lib64/python3.8/site-packages/rq/job.py", line 686, in perform
self._result = self._execute()
File "/usr/local/lib/pulp/lib64/python3.8/site-packages/rq/job.py", line 692, in _execute
return self.func(*self.args, **self.kwargs)
File "/home/vagrant/devel/pulp_deb/pulp_deb/app/tasks/synchronizing.py", line 106, in synchronize
DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()
File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/declarative_version.py", line 148, in create
loop.run_until_complete(pipeline)
File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
await asyncio.gather(*futures)
File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/api.py", line 43, in __call__
await self.run()
File "/home/vagrant/devel/pulp_deb/pulp_deb/app/tasks/synchronizing.py", line 388, in run
await asyncio.gather(
File "/home/vagrant/devel/pulp_deb/pulp_deb/app/tasks/synchronizing.py", line 442, in _handle_distribution
await asyncio.gather(
File "/home/vagrant/devel/pulp_deb/pulp_deb/app/tasks/synchronizing.py", line 496, in _handle_component
await asyncio.gather(*pending_tasks)
File "/home/vagrant/devel/pulp_deb/pulp_deb/app/tasks/synchronizing.py", line 542, in _handle_package_index
serializer.is_valid(raise_exception=True)
File "/usr/local/lib/pulp/lib64/python3.8/site-packages/rest_framework/serializers.py", line 243, in is_valid
raise ValidationError(self.errors)
rest_framework.exceptions.ValidationError: {'section': [ErrorDetail(string='This field is required.', code='required')], 'priority': [ErrorDetail(string='This field is required.', code='required')]}
It looks like there are packages without a section field which is declared as "required" by pulp_deb.
Debian only recommends (but does not require) this field (for both source and binary packages): https://www.debian.org/doc/debian-policy/ch-controlfields.html
If follows the plugin should not require it either.
We may want to take this opportunity to check for other falsely required fields.
Related issues
Updated by quba42 over 4 years ago
- Related to Issue #7190: Pulp 3 - pulp-deb : APT client installing same patches again and again (field Multi-Arch) added
Updated by quba42 over 4 years ago
- Related to Issue #7257: Many pulp_deb control file fields are limited to 255 characters but should not be added
Updated by quba42 over 4 years ago
The Debian policy manual includes a clear list of what is and isn't required: https://www.debian.org/doc/debian-policy/ch-controlfields.html
Added by msinghal over 4 years ago
Updated by pulpbot over 4 years ago
- Status changed from NEW to POST
Updated by quba42 over 4 years ago
- Related to Test #7279: Add a test that uploads a "minimal" Debian package. added
Updated by msinghal over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset e6ef38563b03441d6b83ff5d126f7e2d964b9890.
Updated by quba42 about 4 years ago
- Sprint/Milestone changed from Katello to 2.6.0b1
Updated by quba42 over 3 years ago
- Status changed from MODIFIED to CLOSED - DUPLICATE
Updated by quba42 over 3 years ago
- Status changed from CLOSED - DUPLICATE to CLOSED - CURRENTRELEASE
Actions
Change required status of package fields.
fixes #7236 https://pulp.plan.io/issues/7236