Project

Profile

Help

Issue #7236

Sync fails if packages do not have a 'section' field

Added by quba42 3 months ago. Updated about 2 months ago.

Status:
MODIFIED
Priority:
High
Assignee:
-
Sprint/Milestone:
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.


Checklist


Related issues

Related to Debian Support - Issue #7190: Pulp 3 - pulp-deb : APT client installing same patches again and again (field Multi-Arch)MODIFIED<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Debian Support - Issue #7257: Many pulp_deb control file fields are limited to 255 characters but should not beMODIFIED<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Debian Support - Test #7279: Add a test that uploads a "minimal" Debian package.NEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision e6ef3856 View on GitHub
Added by msinghal 3 months ago

Change required status of package fields.

fixes #7236 https://pulp.plan.io/issues/7236

History

#1 Updated by quba42 3 months ago

  • Sprint/Milestone set to Katello

#2 Updated by quba42 3 months ago

  • Checklist item Ensure exactly those control file fields are mandatory, that officially are so. added

#3 Updated by quba42 3 months ago

  • Related to Issue #7190: Pulp 3 - pulp-deb : APT client installing same patches again and again (field Multi-Arch) added

#4 Updated by quba42 3 months ago

  • Related to Issue #7257: Many pulp_deb control file fields are limited to 255 characters but should not be added

#5 Updated by quba42 3 months 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

#6 Updated by pulpbot 3 months ago

  • Status changed from NEW to POST

#7 Updated by quba42 3 months ago

  • Related to Test #7279: Add a test that uploads a "minimal" Debian package. added

#8 Updated by msinghal 3 months ago

  • Status changed from POST to MODIFIED

#9 Updated by quba42 about 2 months ago

  • Sprint/Milestone changed from Katello to 2.6.0b1

Please register to edit this issue

Also available in: Atom PDF