Fixes T114
Details
run fedmsg-hub according to instructions in readme.rst
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
jobtriggers/triggers.py | ||
---|---|---|
49 | (I thought I left this comment earlier, but I must not have hit submit...) This line lead to some confusion. Say a user puts type = Wat in the config file. Taskotron will load and start without an error message, and the user will actually get a StreamTrigger. (More realistically, imagine that the user has put type = BuildBotTrigger. That's a typo where they actually meant BuildbotTrigger). Perhaps this should raise a KeyError if the exact trigger name is not found. Something like return _triggers[trigger_type]() |
jobtriggers/triggers.py | ||
---|---|---|
49 | TaskotronConfigError might be suitable for this. |
jobtriggers/triggers.py | ||
---|---|---|
49 | Good point. Does taskotron-trigger make sense without having libtaskotron installed? Won't it call runtask eventually? |
Yeah, but do we want to pull libtaskotron as dependency just so we can use TaskotronConfigError? I don't know how much code of libtaskotron will be needed in the trigger in future though. @tflink?
I've thought about that myself and I don't really see a reason to depend on libtaskotron here unless we want to support some sort of local execution engine (ie, buildbot replacement). Even if we did that, we can add the dep later and avoid the linking for now.
Good point. Does taskotron-trigger make sense without having libtaskotron installed? Won't it call runtask eventually?
In a very roundabout way, sure. It sends data to buildbot which schedules a job which eventually calls runtask. However, that's far enough removed that I don't think it makes sense for trigger to depend on libtaskotron right now.
(I thought I left this comment earlier, but I must not have hit submit...)
This line lead to some confusion.
Say a user puts type = Wat in the config file. Taskotron will load and start without an error message, and the user will actually get a StreamTrigger. (More realistically, imagine that the user has put type = BuildBotTrigger. That's a typo where they actually meant BuildbotTrigger).
Perhaps this should raise a KeyError if the exact trigger name is not found. Something like