Story #4308
closedStages should not blindly trust the correct state of DeclarativeContent
0%
Description
Pulpcore's stages currently assume the state of DeclarativeContent based on its location in the pipeline.
Some examples:
- The Artifact saver assumes the artifact has been downloaded, because it is placed after the ArtifactDownloader
- The Content saver assumes that the artifacts have been saved because it is after the Artifact saver
This holds true for simple pipelines, but there are problems with nested content units (newly discovered content) that may be in a different state. Hopefully, the implementation of [Loops/Discoverable Futures] https://pulp.plan.io/issues/4294 will flatten the pipeline structure for plugins with nested content. However, I still think that it would be worth considering making the stages more robust.
Even if all the core stages work perfectly, they are going to be used by many plugin developers, and it is very difficult to debug problems that arise from stages attempting to act on DeclarativeContent that is not in the expected state.
Proposal:
Each stage should explicitly state the expectations for the declarative content that is flowing into it. Those expectations should be checked, and exceptions should be raised if they are not met.
Updated by CodeHeeler about 5 years ago
- Tracker changed from Issue to Story
- % Done set to 0
Updated by bmbouter almost 5 years ago
- Status changed from NEW to CLOSED - WONTFIX