Merge lp://qastaging/~thomir-deactivatedaccount/core-result-checker/ci-result-checker-config into lp://qastaging/core-result-checker
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~thomir-deactivatedaccount/core-result-checker/ci-result-checker-config |
Merge into: | lp://qastaging/core-result-checker |
Diff against target: |
96 lines (+24/-9) 2 files modified
core-service.conf (+15/-1) core_result_checker/__init__.py (+9/-8) |
To merge this branch: | bzr merge lp://qastaging/~thomir-deactivatedaccount/core-result-checker/ci-result-checker-config |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Larson | Needs Fixing | ||
Review via email: mp+259452@code.qastaging.launchpad.net |
Description of the change
This branch is a proof-of-concept only. PLEASE DO NOT MERGE THIS YET.
This branch shows how we could use configuration values to change core-result-checker to be re-usable with different input and output queues.
* Please Comment on the trello card: https:/
I started by adding the queue it should listen to as a configuration item, then realised that it also needs to know what the test input queue should be (to retry tests). At that point, I though "screw it, why not make all the queue names configurable?".
This is different to the original proposal, which was to have the result and dead letter queues be part of the message payload, but the more I think about it, the more I think that was a bad idea (it was my bad idea), for a few different reasons:
I think we want multiple result-checker deployments for multiple test systems (one for snappy selftests, one for proposed-migration tests, for example). So while we may want the result checker to be re-usable (although that's up for debate as well), I don't think we want it to be dynamically configurable at runtime - i.e.- every payload should be processed in the same way for a given deployment.
I think that the way a component processes a payload should be constant between payloads, and that making the payload alter where messages get routed will make it much harder to reason about what the system is doing. I'd rather deploy N result checker components with slightly different configurations than one result-checker that does different things based on the payload contents.
There is, however a drawback: Currently we only ever deploy a single component with a single configuration. We'd need to tweak our deployment system so we could say "deploy this result checker here with this config and over here with this other config, and have it DTRT. I don't think that's possible with the current setup, but I might be wrong here.
I'm writing all this because I'd like agreement from the team that this is the best approach. If people want to see a MP that explores the other solution, I can do that as well.
Unmerged revisions
- 16. By Thomi Richards
-
Show proff-of-concept for a re-usable result checker that uses configuration values to determine which queues to use.
didn't mention this above - one reason to not merge this yet is that it doesn't actually post anything to the results queue yet :D