Project

Profile

Help

Story #3935

As a plugin writer, I can inject stages into DeclarativeVersion

Added by bmbouter over 1 year ago. Updated 8 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
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 again CLOSED - DUPLICATE Actions

Associated revisions

Revision cca37a0a View on GitHub
Added by gmbnomis about 1 year 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 about 1 year 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 over 1 year ago

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

#2 Updated by rchan over 1 year 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 over 1 year ago

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

#4 Updated by vdusek over 1 year ago

  • Status changed from ASSIGNED to POST

#5 Updated by vdusek over 1 year ago

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

#6 Updated by vdusek about 1 year ago

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

#7 Updated by rchan about 1 year ago

  • Sprint changed from Sprint 42 to Sprint 43

#8 Updated by bmbouter about 1 year 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 about 1 year ago

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

#10 Updated by gmbnomis about 1 year ago

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

#11 Updated by gmbnomis about 1 year ago

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

#12 Updated by bmbouter about 1 year ago

  • Description updated (diff)

#13 Updated by daviddavis 8 months ago

  • Sprint/Milestone set to 3.0

#14 Updated by bmbouter 8 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF