Our Development Workflow
engineering.zenpayroll.com
engineering.zenpayroll.com
"There’s no room for error."
and
"Someone on the product team will usually play with the feature on our staging environment trying their best to break things."
The first sentence seems to imply that they try to maintain the highest quality possible. Yet the second sentence does not really fit that idea. The article pretty much only lists the tools they use.
But on a scale from Random PHP site to NASA space shuttle software, where is zenpayroll located?
- Very strict coding guidelines
- Rigorous code review
- An extremely thorough test suite
- Multi-stage approval through a QA process involving many pairs of eyes and thorough, formally defined and scientifically rigorous test procedures
- Static analysis and possibly even algorithms proved correct in Coq
Simply playing with it in staging for a while and determining that everything looks good is NOT the kind of testing that you do when there's "no room for error."
These are substantially higher bars than "play with it for a while and see if you can break anything."
Staging = "ready to roll", not "still needs testing to see if things break". Things shouldn't break on staging.
Of course you can forgo manual QA if your automated testing is so perfect that staging is just a formality. I'm guessing ZenPayroll has that covered, given that they deploy to production "several times a week".
So I assume "trying their best to break things" is just a flippant description of final acceptance, not QA testing.
At my workplace we have branches for dev, staging, and production. We're working on feature branches. Now if my coworker merges feature A into dev, and I merge feature B into dev, and feature A is done and ready for release, but feature B needs more work, and my coworker checks out a new feature branch C from dev, he'll be unable to merge into production without merging in my unfinished feature B.
We branch off of production so this won't happen. Are we doing it wrong?
We merge feature into dev when we want to show a feature to a fellow developer.
We merge feature into staging when a feature is ready to be tested by non-developers and to be included in documentation.
We merge feature into production when it's ready for all users.
Has been working out well so far.
Wouldn't you just show them the feature branch?
In your example feature-B shouldn't have made it to dev.
For some projects though this is a bit overkill and if you don't think this is important chances are you can get away with something more akin to the branching model rorykoehein posted.
edit: spellign
It seems really odd to me to branch from master for a feature branch, then push that to master, then push the feature branch to staging, and then push the feature branch to production. Is that what you are doing?
In general code should be merged to the development branch as soon as it is working, tested and reviewed, even if not all the functionality of the feature is done.
At my company, we eschewed feature branches about a year ago. We have two branches - development and main, with a branch ("tag" in git speak, we use TFS) created for each release of our product (we're a software company, not a service company). Development happens in the development branch, and is merged up into the main branch after code freeze.
This does not preclude us from releasing often. With judicious use of feature toggles, it's simple to release with a feature that's not done.
Feature branches would just create a mess for us as there's necessarily many communicating parts between teams, and the number of feature branches required to keep them all in sync would be exponential.
Often the simplest thing may not work in the long run. But its better to err on the side of keeping things simple.
2. Code reviews + off mainline development is a potential disaster in waiting unless the review process is fast. The fastest review process I have seen is automated testing and pairing when someone is working on something that cannot be caught easily by automated tests like synchronization.
>> Often the simplest thing may not work in the long run. But its better to err on the side of keeping things simple.
IMO, the best reason for simplicity is that simple things can be torn out and replaced more easily than complex things. So the simplest thing isn't necessarily right, but you haven't wasted much resources by choosing it, so you've left your options open. You always want to have options.
Disclaimer: satisfied ZenPayroll user here.