Actions
Story #3935
closedAs a plugin writer, I can inject stages into DeclarativeVersion
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Quarter:
Description
Problem Statement¶
If a plugin needs to inject a custom stage, e.g. RPMs RelatedErrataModelSaver, it must carry lots of code that is already contained in DeclarativeVersion. This is doubly unfortunate because as DeclarativeVersion gets more feature over time, these other forked pipelines have to continue to duplicate those changes also.
Solution¶
Create a method in DeclarativeVersion call pipeline_stages that provides the artifact and content portions of the pipeline (leaving out the associate/unassociate stages).
Quoting from @gmbnomis' comment plugin writers have lots of options then:
- Scrap the whole thing if it does not fit
- Overwrite pipeline_stages() to instantiate stock or customized stages in any order
- Do "surgery" on the stages list by calling super().pipeline_stages() and modifying the result (the idea of this PR).
- Use it as is
Related issues
Actions
Allow simpler pipeline customization in DeclarativeVersion
For most custom pipelines it should be sufficient to override
DeclarativeVersion.pipeline_stages()
now.fixes #3935 https://pulp.plan.io/issues/3935