I briefly mentioned arcanist in a previous article. It is a command line tool that wraps around git, hg, and svn and provides some handy features for working on a shared codebase. It is meant to be used in conjunction with phabricator, and all my examples assume that situation. As I mentioned previously, a typical workflow while using arc might look something like this: Create a local branch git checkout -b mygreatfeature hack on that branch Run arc lint to run your changes through several possible code linters Run arc unit to run the unit tests that are associated with your changes Run arc diff to submit your patch for review (Note: just running arc diff will call both the lint and the unit test steps if you have them configured)
I’ve started implementing code review before commit/push on my team. We theoretically had a code review system in place before this, but it went something like this: Write code Commit code Push code Roll a d20 If die came up greater than 2, no one will review your code. Otherwise, someone tries to retroactively review a billion commits in 30 minutes. That process wasn’t really the best didn’t work.
So, in a previous post, Continuous Integration I gave a quick overview of our continuous integration setup, and mentioned that I’d like to explore allowing jenkins to push our deploys for us. That work is now done. The basic workflow is now: Developer develops new feature Developer runs unit tests locally Developer submits patch for code review via Phabricator Code is approved by another person on the team Developer lands (pushes to master) changes Jenkins initiates a build, and if all tests pass, promotes the build automatically to the integration server.