Actions
Issue #6886
closedmigrating a sub-set of previously migrated repos fails with 'ERROR: UnboundLocalError: local variable 'item' referenced before assignment
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Katello
Sprint:
Sprint 74
Quarter:
Description
I believe to reproduce you would:
- create a pulp2 repository with errata and migrate it
- create a new pulp2 repository with errata (i synced the same content in this case), and ONLY migrate that one
You'll get this error:
pulp: rq.worker:ERROR: UnboundLocalError: local variable 'item' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/rq/worker.py", line 886, in perform_job
rv = job.perform()
File "/usr/lib/python3.6/site-packages/rq/job.py", line 664, in perform
self._result = self._execute()
File "/usr/lib/python3.6/site-packages/rq/job.py", line 670, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 124, in migrate_from_pulp2
pre_migrate_all_content(plan)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py", line 66, in pre_migrate_all_content
pre_migrate_content(content_model, mutable_type, lazy_type, premigrate_hook)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/pre_migration.py", line 162, in pre_migrate_content
'Add content item to the list to migrate: {item}'.format(item=item))
UnboundLocalError: local variable 'item' referenced before assignment
I don't think this would be a common use case in katello, usually if we stop including a repo in a migration its been deleted from pulp, but looked like a simple fix (indent two lines)
Updated by ipanova@redhat.com over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
- Sprint set to Sprint 74
Added by ipanova@redhat.com over 4 years ago
Added by ipanova@redhat.com over 4 years ago
Revision 39c61820 | View on GitHub
Fix variable reference before assignment.
Added by ipanova@redhat.com over 4 years ago
Revision 39c61820 | View on GitHub
Fix variable reference before assignment.
Updated by ipanova@redhat.com over 4 years ago
- Status changed from ASSIGNED to POST
- Triaged changed from No to Yes
Updated by ipanova@redhat.com over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp:pulp-2to3-migration|39c618201b777b1accef1866e86b4fa34728ee63.
Updated by ipanova@redhat.com over 4 years ago
Applied in changeset pulp-2to3-migration|39c618201b777b1accef1866e86b4fa34728ee63.
Updated by ipanova@redhat.com over 4 years ago
Applied in changeset pulp:pulp-2to3-migrate|39c618201b777b1accef1866e86b4fa34728ee63.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fix variable reference before assignment.
closes #6886 https://pulp.plan.io/issues/6886