Recommend way to run pre-commit test before `arc land`

Our team want to enforce run a series of tests on external CI system like Jenkins when anyone run arc land and block the landing if test failed. The main workflow looks like run arc land–> launch test in Jenkins --> land if test passed or stop if test failed.

I had searched several approaches while none of them looks perfect solve our workflow.

  1. Herlad commit hook doesn’t have the action to run a build plan.
  2. Using server side hooks https://secure.phabricator.com/book/phabricator/article/diffusion_hooks/ seems a good solution, while we want to have the ability to force landing in case CI system is down. arc land seems doesn’t provide option to skip server side commit hooks.
  3. Phabricator server side landing https://secure.phabricator.com/book/phabricator/article/differential_land/ is marked as prototype and can’t be customized.
  4. https://secure.phabricator.com/book/phabricator/article/events/, using events can solve our issue while the docs said it’s strongly discouraged.

I’m wondering is there a recommended way to run pre-commit tests in arc land workflow?

What are you expecting the user to do while Jenkins is building their change? Are they sitting at their console waiting for Jenkins to finish, or free to continue work (with the implication that something will push their change for them after the builds pass)?

Are they sitting at their console waiting for Jenkins to finish,

This is the ideal way, since users would like to keep such workflow as in the old system.

or free to continue work (with the implication that something will push their change for them after the builds pass)?

This approach also looks good if arc land can submit a Jenkins job, print the link to console and exit, then user can go to Jenkins console and check the landing result.

I also investigate mozilla’s approach to add a link at code review page which redirect user to a landing service. But this approach seems doesn’t work for jenkins, as jenkins requires a HTTP POST to create a job.