Updated: Comment #7
Problem/Motivation
There is potentially a lot of possible duplicated code for modules trying to interact with versioncontrol at hook_versioncontrol_code_arrival()
.
Proposed resolution
Create a new plugin type event_processor, which abstracts most of non-specific code and configuration, so implementing a plugin of that type is easier.
Remaining tasks
- To use a queue instead of directly executing the plugins.
- Support per repository configuration for event processor plugins. Maybe on another issue, per backend seems to be good enough to start. Also, the right UI to present this is a little tricky. Suggestions are welcome.
User interface changes
Probably add a configuration UI, but it can be also added later. Pending to decide.
API changes
New repository plugin slot event_processors, which has a list of event_processor plugin type plugins to use during hook_versioncontrol_code_arrival()
.
Original report by @marvil07
The main idea behind this is to help the interaction with hook_versioncontrol_code_arrival(), and to be able to add any number of plugins to a repository that will be executed on code arrival success.
Comment | File | Size | Author |
---|---|---|---|
#13 | event-processors-20140309_1205.patch | 32.41 KB | marvil07 |
#13 | interdiff.txt | 3.15 KB | marvil07 |
Comments
Comment #1
YesCT CreditAttribution: YesCT commented#443000: When viewing an issue, display a list of commits that reference that issue # might be postponed on this issue.
It's not clear why this is postponed, or what it's waiting for.
What is blocking moving this forward?
Comment #2
marvil07 CreditAttribution: marvil07 commented@YesCT: This is decided to be on the next major version of versioncontrol (tagged vc-next, so not yet sure if it wil happen on D7 or D8).
Comment #3
marvil07 CreditAttribution: marvil07 commentedUn-postponing after a quick conversation with sdboyer.
Comment #4
marvil07 CreditAttribution: marvil07 commentedMention I'm working on this.
Comment #5
marvil07 CreditAttribution: marvil07 commentedA start patch, still needs lots of work, NR for bot.
Comment #6
marvil07 CreditAttribution: marvil07 commentedIt still needs more work, i.e. to handle per plugin configuration.
Comment #7
marvil07 CreditAttribution: marvil07 commentedFinally, something that is working.
NR for testbot.
What is new on this patch:
General note: the way we are handling different plugins is not consistent, or at least can be a lot more consistent, but that's kind of unrelated.
Still pending:
Comment #8
marvil07 CreditAttribution: marvil07 commentedUpdated issue summary.
Comment #9
marvil07 CreditAttribution: marvil07 commentedComment #10
marvil07 CreditAttribution: marvil07 commentedWhat is new in this patch:
I think now it is ready a real review before adding it upstream.
Comment #11
drummThis looks good on reading the code.
Comment #12
marvil07 CreditAttribution: marvil07 commentedI made an extra change:
I have opened a follow-up #2214173: Per repository configuration for event processor plugins, and after testbot agrees I will be adding this to upstream.
Comment #13
marvil07 CreditAttribution: marvil07 commentedComment #14
marvil07 CreditAttribution: marvil07 commentedAdded to 7.x-1.x.
Comment #15
marvil07 CreditAttribution: marvil07 commentedOne follow-up: