Project

Profile

Help

Issue #7236

closed

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

Added by quba42 about 2 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
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.


Related issues

Related to Debian Support - Issue #7190: Pulp 3 - pulp-deb : APT client installing same patches again and again (field Multi-Arch)CLOSED - CURRENTRELEASEActions
Related to Debian Support - Issue #7257: Many pulp_deb control file fields are limited to 255 characters but should not beCLOSED - CURRENTRELEASEActions
Related to Debian Support - Test #7279: Add a test that uploads a "minimal" Debian package.CLOSED - DUPLICATEActions
Actions #1

Updated by quba42 about 2 years ago

  • Sprint/Milestone set to Katello
Actions #2

Updated by quba42 about 2 years ago

Actions #3

Updated by quba42 about 2 years ago

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

Updated by quba42 about 2 years ago

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

Updated by quba42 about 2 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 about 2 years ago

Revision e6ef3856

Change required status of package fields.

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

Actions #6

Updated by pulpbot about 2 years ago

  • Status changed from NEW to POST
Actions #7

Updated by quba42 about 2 years ago

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

Updated by msinghal about 2 years ago

  • Status changed from POST to MODIFIED
Actions #9

Updated by quba42 about 2 years ago

  • Sprint/Milestone changed from Katello to 2.6.0b1
Actions #10

Updated by quba42 over 1 year ago

  • Status changed from MODIFIED to CLOSED - DUPLICATE
Actions #11

Updated by quba42 over 1 year ago

  • Status changed from CLOSED - DUPLICATE to CLOSED - CURRENTRELEASE

Also available in: Atom PDF