Hey guys, I've been in a conversation with zzak from CircleCI because CircleCI sends everyone on my team notifications about every Harbormaster-triggered build failure.
The advice given to me by CircleCI is actually to disable notifications on a per-build basis. Here's a curl request that was provided to be by zzak:
curl --user ${CIRCLE_TOKEN}: --request POST --form revision=${REVISION} --form notify=false https://circleci.com/api/v1.1/project/github/<your-org-id>/<your-project-name>/tree/${BRANCH}
I can't think of a reason why anybody would want both Harbormaster failure notifications as well as CircleCI failure notifications, so I think turning this on for all CircleCI builds triggered from Harbormaster seems reasonable. It looks like HarbormasterCircleCIBuildStepImplementation would be the right place to add this behavior.
Since bug reports MUST include reproduction steps:
Steps to reproduce:
- I set my notification settings to "branch I've push to fails"
- A coworker pushes a diff to Phabricator (therefore arcanist triggers a push to a github tag and Harbormaster notifies CircleCI to run build)
- The build fails
Expected result:
- I do not receive any notification about the build failure, because I have not pushed to the branch
Actual result:
- I receive a build failure notification
Extra context: CircleCI seems to be treating all tags as one contiguous branch, which means that we also get misleading "fixed" emails when a completely unrelated commit happens to follow one that doesn't pass the tests.
Version information:
- phabricator d39758ca7cacf1dd68cb1f5ae35a75b200cee338 (Wed, May 10)
- arcanist 3c4735795a2963c5ddff6dceaf60122d01ca3dc0 (Wed, May 3)
- phutil a900d7b63e954e221efe140f0f33d3d701524aae (Sun, Apr 23)