Story #3935
closedAs a plugin writer, I can inject stages into DeclarativeVersion
100%
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
Updated by jortel@redhat.com over 6 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by rchan over 6 years ago
- Sprint set to Sprint 42
this is ready to go and will be useful in pulp_rpm in the near term.
Updated by vdusek over 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to vdusek
Updated by vdusek over 6 years ago
- Status changed from ASSIGNED to POST
Updated by vdusek over 6 years ago
- Related to Refactor #3945: Start using DeclarativeVersion again added
Updated by vdusek over 6 years ago
- Status changed from POST to NEW
- Assignee deleted (
vdusek)
Updated by bmbouter over 6 years ago
- Sprint deleted (
Sprint 43)
Taking off the sprint since it's waiting on work that was discussed in this PR: https://github.com/pulp/pulp/pull/3605#issuecomment-421358274
Added by gmbnomis about 6 years ago
Added by gmbnomis about 6 years ago
Revision cca37a0a | View on GitHub
Allow simpler pipeline customization in DeclarativeVersion
For most custom pipelines it should be sufficient to override
DeclarativeVersion.pipeline_stages()
now.
Updated by gmbnomis about 6 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to gmbnomis
Updated by gmbnomis about 6 years ago
PR with new approach is at https://github.com/pulp/pulp/pull/3664
Updated by gmbnomis about 6 years ago
- Status changed from ASSIGNED to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|cca37a0a779bf2e05615e79900d50b90d6114e48.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
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