-
Notifications
You must be signed in to change notification settings - Fork 155
Development Process Explained
Stormpath uses a number of the built-in features of Github as well as waffle.io to manage our development process internally. Our repo, and thus all our issues and pull requests are public. Our waffle.io page is public as well, which makes it easy to see what's in the hopper for development and who is working on what.
The rest of this page outlines the basic rules we follow to get from the backlog to done and release.
Here's the flow of issues through the process:
backlog -> milestone -> ready -> in progress -> needs review -> done
-
An issue gets into the
backlog
simply by virtue of it being defined in github. -
A
milestone
defines a unit of work to be released. Allissues
assigned to the milestone will be included in the release. -
Once a
milestone
is defined andissues
added to it, theready
label can be applied. This indicates that theseissues
are ready to be worked on. Note: there should only ever beissues
in the samemilestone
with theready
label. -
A developer can "pick up" an
issue
to work on by applying thein progress
label to it. Anyissue
with thein progress
label should also have a developer assigned to it. -
When an
issue
is ready to be reviewed, the developer who worked on it should create a Pull Request (PR
) for it. The title or the description of the PR should reference theissue
number with the pound sign (#) in front of it (description example:resolves #444
). Theissue
should have thein progress
label removed and theneeds review
label applied.
Note: There should be no more than 3 issues
with the needs review
label applied. If you are ready to have an issue reviewed and there are already 3 issues
with the needs review
label applied, you should pick up one of those issue by assigning the associated PR
to yourself. If all three issues
are already assigned, then you should see which issue you can 'dogpile' on to get it reviewed and approved sooner.
-
Any developer, other than the one who worked on the
issue
, can "pick up" the PR and become the reviewer. This is done by the reviewer assigning the PR to themselves. If there is feedback on the PR, the reviewer will assign it back to the developer for update. Once the developer has addressed the comments from the reviewer, the developer will assign the PR back to the reviewer. This continues until the reviewer approves the PR and assigns it back to the developer a final time. -
Once a reviewer has approved a PR and assigned it back to the developer, AND the CI build is successful, the developer will merge the PR, close the
issue
and delete the branch. This will automatically remove the "needs review" label. Note: If the last commit message includes one of the keywords that Github uses for automatic closure and references the issue, the issue will be closed automatically.
Working with the labels as described in the previous section, will automatically cause the issues to flow through the waffle.io columns.
Alternatively, developers can work directly in waffle.io. Dragging an issue from the Ready
column to the In Progress
column automatically removes the ready
label and applies the in progress
label to the issue in Github.
There are two things that github.com has the waffle.io does not yet:
- The results of the CI build (travis)
- The milestone view, which shows % complete
[![ready][1]][1] [1]: images/dev_process/ready.png
[![in progress][2]][2] [2]: images/dev_process/in_progress.png
[![needs review][3]][3] [3]: images/dev_process/needs_review.png
-
We follow a roughly Kanban approach. This means that the right most columns take precedence over the ones further to the left. If you are ready to pick up new work, you should first check to see if there are any
issues
with theneeds review
label applied. If so, then look at the associatedPR
and assign it to yourself if not already assigned. -
All
issues
with theready
label applied should have amilestone
assigned AND it should be the samemilestone
. -
Only
issues
with the currentmilestone
should ever have thein progress
label applied. -
Any
issue
with thein progress
label applied should have adeveloper
assigned. -
When the assigned
developer
completes work on anissue
, thatdeveloper
will: -
create a pull request (
PR
) that references theissue
number in the title or description -
remove the
in progress
label from theissue
-
apply the
needs review
label to theissue
-
Another
developer
will assign themselves to thePR
, thus becoming thereviewer
. -
If the
reviewer
has comments/requests on thePR
, thereviewer
assigns thePR
back to the `developer -
When the
developer
resolves the comments from thereviewer
, thedeveloper
assigns thePR
back to thereviewer
-
repeat 1 and 2 as needed
-
The
reviewer
adds a comment to thePR
indicating that it is approved and assigns thePR
to thedeveloper
-
The
developer
merges thePR
, closes theissue
and deletes the github branch/
An issue should only be considered ready to be reviewed if all the following requirements are met:
-
Javadoc: All new classes and methods in the API module have complete and detailed javadocs. For those in other modules (servlet, spring, impl, etc) we should add documentation for complex algorithms/behaviors/cases. New classes and methods must contain the
@since
tag (e.g@since 1.0.RC9
) -
Testing: Make sure there are tests (ITs preferably) that verify most (if not all) the possible flows of the new functionality
-
Copyright: New files have the Copyright header
-
Imports: Check there are no unused imports
-
Pre-existent References: Do a deep search for the exact github issue that you are working on right now. For example if you are working on issue 502 then do do a search within our project with the text
https://github.com/stormpath/stormpath-sdk-java/issues/502
. There might be some pieces of code referencing it for some reason and we need to be sure that we are addressing those comments as well. For example, there might be a test that is disabled waiting for a particular issue to be solved. If that is the case then this test should be enabled as part of the implementation of502
. -
Add Comment Referencing Issue: If a bug fix has a localized implementation (like a few lines of code inside and if statement) make sure to add a reference the issue that originated that change. For instance,
//This fixes https://github.com/stormpath/stormpath-sdk-java/issues/XXX
-
CI: Make sure Travis passes
-
UAT: The implementer describes the specific things the reviewer needs to validate. If steps are complex then the implementer should also add instructions for the reviewer.
-
TCK: The implementer must clarify in the PR which are the specific TCK tests that are supposed to succeed in this particular feature.
-
Documentation: If the PR is for a new feature there must always be documentation about it in our Product Guide. If the documentation has not yet been written then at least there must be an issue in Github in order to remember to do so soon. IMPORTANT NOTE: The documentation must never be released before the actual feature.
In short this is the way we handle code changes during specific versions:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality/new features in a backwards-compatible manner
- PATCH version when you make backwards-compatible bug fixes ( ie. I can downgrade from 1.0.9 to 1.0.3 without changing any of my code)
We always stick to this versioning scheme and by no means we will relax it.
See http://semver.org/ for a more detailed explanation.