Project

Profile

Help

Story #3935

closed

As a plugin writer, I can inject stages into DeclarativeVersion

Added by bmbouter over 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
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

Related to RPM Support - Refactor #3945: Start using DeclarativeVersion againCLOSED - DUPLICATE

Actions

Also available in: Atom PDF