Bug 1276367 - [RFE] Add priority for each plugin hook
Summary: [RFE] Add priority for each plugin hook
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-29 14:32 UTC by Ray Logel
Modified: 2020-03-17 04:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Add priority for each plugin hook Reason: Control order plugins are triggered Result: Allow the user to define order.
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
Potential way to add priority ordering to plugin hooks (1.10 KB, patch)
2015-10-29 14:32 UTC, Ray Logel
no flags Details | Diff

Description Ray Logel 2015-10-29 14:32:39 UTC
Created attachment 1087563 [details]
Potential way to add priority ordering to plugin hooks

There isn't any way to control the order that plugins execute.  I created a plugin which was triggered using the 'postinit' hook.  I wanted it to be trigger before the root_cache plugin so that my changes can also be cached.  Unfortunately the plugin just stores an array of hooks with no way to control the order they are run.

Attached is a possible solution it could be further extended so that the priority was configurable via the config file.  But if all the existing hooks had a priority of 0, then a new hook could be added with -1 to make sure it went before them or +1 to make sure it when after.

Comment 1 Fedora Admin XMLRPC Client 2020-03-17 04:43:24 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.


Note You need to log in before you can comment on or make changes to this bug.