Project

Profile

Help

Story #3935

As a plugin writer, I can inject stages into DeclarativeVersion

Added by bmbouter almost 2 years ago. Updated 7 months 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:

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

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision cca37a0a View on GitHub
Added by gmbnomis almost 2 years ago

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

Revision cca37a0a View on GitHub
Added by gmbnomis almost 2 years ago

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

History

#1 Updated by jortel@redhat.com almost 2 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#2 Updated by rchan almost 2 years ago

  • Sprint set to Sprint 42

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

#3 Updated by vdusek almost 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to vdusek

#4 Updated by vdusek almost 2 years ago

  • Status changed from ASSIGNED to POST

#5 Updated by vdusek almost 2 years ago

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

#6 Updated by vdusek almost 2 years ago

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

#7 Updated by rchan almost 2 years ago

  • Sprint changed from Sprint 42 to Sprint 43

#8 Updated by bmbouter almost 2 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

#9 Updated by gmbnomis almost 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to gmbnomis

#10 Updated by gmbnomis almost 2 years ago

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

#11 Updated by gmbnomis almost 2 years ago

  • Status changed from ASSIGNED to MODIFIED
  • % Done changed from 0 to 100

#12 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

#13 Updated by daviddavis about 1 year ago

  • Sprint/Milestone set to 3.0.0

#14 Updated by bmbouter about 1 year ago

  • Tags deleted (Pulp 3)

#15 Updated by bmbouter 7 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF