Project

Profile

Help

Issue #3524

Changeset exception during sync

Added by daviddavis over 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 35

Description

In pulp_ansible, we have role versions and we're seeing the error below when the code hits dupe artifacts. The problem is that the artifact_q filter is empty:

https://github.com/pulp/pulp/blob/3.0-dev/plugin/pulpcore/plugin/changeset/model.py#L376-L381

I think this doesn't happen for pulp_file because we're able to set the digests on the artifacts:

https://github.com/pulp/pulp_file/blob/master/pulp_file/app/tasks/synchronizing.py#L161

This digest info comes from the metadata and in pulp_ansible's metadata, we don't have any digest info for artifacts.

Mar 23 19:12:00 pulp3.dev celery[2413]: Traceback (most recent call last):
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 374, in trace_task
Mar 23 19:12:00 pulp3.dev celery[2413]:     R = retval = fun(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/pulpcore/pulpcore/tasking/tasks.py", line 273, in __call__
Mar 23 19:12:00 pulp3.dev celery[2413]:     return super().__call__(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 629, in __protected_call__
Mar 23 19:12:00 pulp3.dev celery[2413]:     return self.run(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/synchronizing.py", line 80, in synchronize
Mar 23 19:12:00 pulp3.dev celery[2413]:     for report in changeset.apply():
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/main.py", line 196, in apply
Mar 23 19:12:00 pulp3.dev celery[2413]:     for report in itertools.chain(self._apply_additions(), self._apply_removals()):
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/main.py", line 151, in _apply_additions
Mar 23 19:12:00 pulp3.dev celery[2413]:     content.settle()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 189, in settle
Mar 23 19:12:00 pulp3.dev celery[2413]:     self.save()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 210, in save
Mar 23 19:12:00 pulp3.dev celery[2413]:     artifact.save()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 381, in save
Mar 23 19:12:00 pulp3.dev celery[2413]:     self._stored_model = Artifact.objects.get(q)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
Mar 23 19:12:00 pulp3.dev celery[2413]:     return getattr(self.get_queryset(), name)(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/query.py", line 384, in get
Mar 23 19:12:00 pulp3.dev celery[2413]:     (self.model._meta.object_name, num)
Mar 23 19:12:00 pulp3.dev celery[2413]: pulpcore.app.models.content.MultipleObjectsReturned: get() returned more than one Artifact -- it returned 70!

Associated revisions

Revision 0e55d183 View on GitHub
Added by jortel@redhat.com over 1 year ago

Prevent query matching all content/artifact when not criteria included in the Q.
closes #3524

Revision 0e55d183 View on GitHub
Added by jortel@redhat.com over 1 year ago

Prevent query matching all content/artifact when not criteria included in the Q.
closes #3524

Revision 0e55d183 View on GitHub
Added by jortel@redhat.com over 1 year ago

Prevent query matching all content/artifact when not criteria included in the Q.
closes #3524

History

#1 Updated by daviddavis over 1 year ago

  • Description updated (diff)

FYI, this is a blocker for pulp_ansible and probably other plugins as well.

#2 Updated by daviddavis over 1 year ago

  • Description updated (diff)

#3 Updated by dalley over 1 year ago

  • Triaged changed from No to Yes

#4 Updated by jortel@redhat.com over 1 year ago

  • Status changed from NEW to POST
  • Assignee set to jortel@redhat.com
  • Sprint set to Sprint 35

#5 Updated by jortel@redhat.com over 1 year ago

  • Status changed from POST to MODIFIED

#6 Updated by dkliban@redhat.com over 1 year ago

  • Sprint/Milestone set to 3.0

#7 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

Please register to edit this issue

Also available in: Atom PDF