Project

Profile

Help

Issue #1430

closed

Package* unit types fails validation after upgrade

Added by bmbouter almost 9 years ago. Updated over 5 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 - CURRENTRELEASEpcreech

Actions
Actions #1

Updated by bmbouter almost 9 years ago

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

Updated by mhrivnak almost 9 years ago

  • Triaged changed from No to Yes
Actions #3

Updated by bmbouter almost 9 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter
Actions #4

Updated by bmbouter almost 9 years ago

  • Status changed from ASSIGNED to POST

Added by bmbouter almost 9 years ago

Revision fde2f02d | View on GitHub

Adds migration 23 for translated_* fields fix

Also adds test coverage for migration 22 and 23

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

Actions #5

Updated by bmbouter almost 9 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #6

Updated by rbarlow almost 9 years ago

  • Status changed from MODIFIED to 5
Actions #7

Updated by dkliban@redhat.com over 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #8

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF