Project

Profile

Help

Issue #9096

Sync of SUSE, post-2to3-migration, exposes a bug in resolve_advisory_conflict()

Added by ggainey 2 months ago. Updated 2 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 101
Quarter:

Description

See https://pulp.plan.io/issues/8275?issue_count=11&issue_position=9&next_issue_id=7992&prev_issue_id=8562#note-18 for reproducer steps

Traceback:

Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: pulp [0b7b6c3f4bac4dfab33701d49bbd93d9]: pulpcore.tasking.pulpcore_worker:INFO: Task 1982ba86-fa16-4927-8c18-0de11d3ea6ad failed ('<' not supported between instances of 'datetime.datetime' and 'NoneType')
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: pulp [0b7b6c3f4bac4dfab33701d49bbd93d9]: pulpcore.tasking.pulpcore_worker:INFO:   File "/home/vagrant/devel/pulpcore/pulpcore/tasking/pulpcore_worker.py", line 268, in _perform_task
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: result = func(*args, **kwargs)
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulp_rpm/pulp_rpm/app/tasks/synchronizing.py", line 422, in synchronize
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: version = dv.create()
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulpcore/pulpcore/plugin/stages/declarative_version.py", line 151, in create
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: loop.run_until_complete(pipeline)
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulpcore/pulpcore/app/models/repository.py", line 963, in __exit__
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: repository.finalize_new_version(self)
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulp_rpm/pulp_rpm/app/models/repository.py", line 346, in finalize_new_version
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: resolve_advisories(new_version, previous_version)
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulp_rpm/pulp_rpm/app/advisory.py", line 89, in resolve_advisories
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: previous_advisory, added_advisory
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: File "/home/vagrant/devel/pulp_rpm/pulp_rpm/app/advisory.py", line 217, in resolve_advisory_conflict
Jul 16 13:58:38 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com pulpcore-worker[24711]: if previous_updated_date < added_updated_date:
Jul 16 13:58:39 pulp2-nightly-pulp3-source-centos7.padre-fedora.example.com gunicorn[24713]: pulp [9656916d2e17449696c4857f667e3acb]: 127.0.0.1 - admin [16/Jul/2021:13:58:39 +0000] "GET /pulp/api/v3/tasks/1982ba86-fa16-4927-8c18-0de11d3ea6ad/ HTTP/1.1" 200 2422 "-" "python-requests/2.25.1"
 ESC

Related issues

Related to RPM Support - Issue #8275: ComplexRepoMigration fails with "file doesn't exists or not a regular file"CLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 47584d3c View on GitHub
Added by ggainey 2 months ago

Adapted to some (more) SUSE repo edge-cases.

  • Some metadata-files can have '-' in the filename
  • Some advisory datetimes are just timestamps.

fixes #8275 fixes #9096

History

#1 Updated by ggainey 2 months ago

The failure here is due advisory.updated_date == None, and advisory.issue_date == '1594030941' (a timestamp) (?!?!). The code in resolve_advisory_conflict() 'assumes' an actual datetime, not a timestamp.

Failing repo : https://updates.suse.com/SUSE/Updates/SLE-SERVER/12-SP5/x86_64/update/

#2 Updated by dalley 2 months ago

  • Status changed from NEW to ASSIGNED

#3 Updated by dalley 2 months ago

  • Assignee set to ggainey
  • Sprint/Milestone set to 3.14.0
  • Triaged changed from No to Yes
  • Sprint set to Sprint 101

#4 Updated by dalley 2 months ago

  • Related to Issue #8275: ComplexRepoMigration fails with "file doesn't exists or not a regular file" added

#5 Updated by ggainey 2 months ago

  • Status changed from ASSIGNED to MODIFIED

#6 Updated by pulpbot 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF