Project

Profile

Help

Story #3935

closed

As a plugin writer, I can inject stages into DeclarativeVersion

Added by bmbouter over 5 years ago. Updated over 4 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
Actions #1

Updated by jortel@redhat.com over 5 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
Actions #2

Updated by rchan over 5 years ago

  • Sprint set to Sprint 42

this is ready to go and will be useful in pulp_rpm in the near term.

Actions #3

Updated by vdusek over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to vdusek
Actions #4

Updated by vdusek over 5 years ago

  • Status changed from ASSIGNED to POST
Actions #5

Updated by vdusek over 5 years ago

  • Related to Refactor #3945: Start using DeclarativeVersion again added
Actions #6

Updated by vdusek over 5 years ago

  • Status changed from POST to NEW
  • Assignee deleted (vdusek)
Actions #7

Updated by rchan over 5 years ago

  • Sprint changed from Sprint 42 to Sprint 43
Actions #8

Updated by bmbouter over 5 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 over 5 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.

fixes #3935 https://pulp.plan.io/issues/3935

Added by gmbnomis over 5 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.

fixes #3935 https://pulp.plan.io/issues/3935

Actions #9

Updated by gmbnomis over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to gmbnomis
Actions #10

Updated by gmbnomis over 5 years ago

PR with new approach is at https://github.com/pulp/pulp/pull/3664

Actions #11

Updated by gmbnomis over 5 years ago

  • Status changed from ASSIGNED to MODIFIED
  • % Done changed from 0 to 100
Actions #12

Updated by bmbouter over 5 years ago

  • Description updated (diff)
Actions #13

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #14

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #15

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF