The usual cycle to add a feature or fix a bug is:
Note that ramping up a new project is a bit specific since you can’t really follow a per-feature cycle until it has reached a certain state.
Every planned change to the code base of a project should start by adding a bug in Bugzilla. This is the central place where all discussions related to the changes, code reviews will happen.
Here’s an example: https://bugzilla.mozilla.org/show_bug.cgi?id=631233
Ideally, you should start to write a test that demonstrates the bug or the new feature. See Writing tests for more info on how to write tests.
For bugs, it’s fairly easy: you need to write a test that reproduces the exact same problem, then fix the code until the code passes. For new features, a test that demonstrates how it works needs to be written.
Running tests is done with the test target:
$ make test
It’s important to run all tests to make sure your changes are not breaking the code base elsewhere. You won’t be able to try out all possible execution environments of course, and that’s the job of the Jenkins CI server.
make test needs to include the tests from all the project dependencies. That’s the case when you start a fresh project with a template.
In Jenkins the tests are running in an environment built from scratch so the tests should not:
The test can use MySQL but the database should be configured to use sqlite rather than MySQL, since there is no MySQL server.
MemCached can be used and if you have a specific volatile backend, it can potentially be installed (Redis, etc.).
In any case, make sure you still have a fallback for those so anyone that checkouts a project can run the tests without having to install a third-party server.
Note that Mozilla production backends are specifically tested via the functional tests that call the dev and stage clusters.
The next steps are taken care of by Jenkins, who launch a test cycle to make sure that your change has not broken anything under every environment your code is used in. If it happens, an email is sent at services-builds.
In that case you need to fix the problem immediately, and if you can’t do it immediately, you need to revert all your changes.