Project

Profile

Help

Refactor #1506

closed

Remove _storage_path from ContentUnit definition

Added by bmbouter over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Currently platform has a ContentUnit and a FileContentUnit. When FileContentUnit was created, the "file" related attributes and methods were moved from ContentUnit to FileContentUnit except for the _storage_path field, which is now present on both. The _storage_path needs to be removed from ContentUnit definition, it doesn't belong there.

It was left there because removing it will take work. The attribute is defined on ContentUnit but never used; when accessed, it has the value None. Code in platform and many plugins rely on this behavior and things will break when it is removed since AttributeError will be raised. As another example, things like nodes don't make a distinction about content type so that may need a more significant fix than other areas.

This refactor includes both removing the field and updating the code which uses that field through the platform and plugins. Note the usage only needs to be done when the unit type is not a descendant of FileContentUnit. Only in those situations does the field removal matter since FileContentUnit provides _storage_path.

Actions #1

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #2

Updated by mhrivnak almost 8 years ago

  • Sprint Candidate changed from Yes to No
Actions #3

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #4

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #5

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF