Project

Profile

Help

Issue #1430

Package* unit types fails validation after upgrade

Added by bmbouter almost 6 years ago. Updated over 2 years ago.

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

Description

pulp-admin had an incorrect behavior where the default value for the field is '' when the type is a dict. The string versions have made it into the database for any user who used pulp admin to upload a PackageGroup, PackageEnvironment, or PackageCategory. The pulp-admin issue has been fixed, but the database records are already in users databases. This causes validation to fail for PackageGroup, PackageEnvironment, or PackageCategory after an upgrade to 2.8.0.

The solution is to add a migration that looks for the incorrect default of '' on the translated_name field and replaces it with {}. It is slightly less risky to replace the '' with {} versus just removing the '' attribute because other areas of Pulp may check if the attribute exists.

Also this task includes evaluating and fixing the translated_description as well, which likely has the same problem on all 3 Package* unit types.


Related issues

Related to Pulp - Task #1415: Write a pre 2.8 upgrade scriptCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision fde2f02d View on GitHub
Added by bmbouter almost 6 years ago

Adds migration 23 for translated_* fields fix

Also adds test coverage for migration 22 and 23

https://pulp.plan.io/issues/1430 closes #1430

History

#1 Updated by bmbouter almost 6 years ago

  • Related to Task #1415: Write a pre 2.8 upgrade script added

#2 Updated by mhrivnak almost 6 years ago

  • Triaged changed from No to Yes

#3 Updated by bmbouter almost 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#4 Updated by bmbouter almost 6 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by bmbouter almost 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by rbarlow almost 6 years ago

  • Status changed from MODIFIED to 5

#7 Updated by dkliban@redhat.com over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF