Our team is still using 'postponed' results for unit tests, I've been reading through T9134 and realized that the only (sane) way to interact with phab from jenkins is via harbormaster.
- When arc diff happens, and we would like to run a set of jobs on jenkins based on the file-types that are changed as a part of that revision, so we could use a herald rule to kick off a harbormaster build plan and listen for progress/pass/fail message from jenkins -- Issue I have here is, how do I pass the knowledge about which jobs to run based on the files changed in the revision -- is there a way to pass a variable from herald to harbormaster?
- If, in fact there is no way to send variables from herald to harbormaster, Here is what I'm planning on doing:
- As soon as an arc diff happens, I would store metadata to the diff using differential.setdiffproperty which include info about the specific jobs needed to be run based on the files changed for that revision and use just one herald rule for the whole repository to call a build plan on harbormaster, which in turn calls a 'master' job on jenkins, which queries for that diff's properties and kicks off downstream jobs based on the metadata passed.
- Does that sound like a good approach? I would love to hear if there is a better/simpler approach to this problem.
- I have been trying to use harbormaster.sendmessage to interact with a test buildable I created via arc diff, following this format
echo '{ "buildTargetPHID": "PHID-HMBT-7rarhpdxgwgoqkdcptah", "type": "fail", "unit": [ { "name": "PassingTest", "result": "pass" } ] }' | arc call-conduit --conduit-uri http://phabricator.ybv.com/ --conduit-token <conduit-token> harbormaster.sendmessage
and the only response i seem to be getting is {"error":null,"errorMessage":null,"response":null}
with --trace
'... >>> [0] <conduit> user.whoami() <bytes = 117> >>> [1] <http> http://phabricator.ybv.com/api/user.whoami <<< [1] <http> 403,749 us <<< [0] <conduit> 405,462 us >>> [2] <conduit> harbormaster.sendmessage() <bytes = 292> >>> [3] <http> http://phabricator.ybv.com/api/harbormaster.sendmessage <<< [3] <http> 381,401 us <<< [2] <conduit> 381,642 us {"error":null,"errorMessage":null,"response":null}
Any idea on what's going on there?