Midas Developer's Guide

From MIDAS Wiki

Jump to: navigation, search

Contents

Mantis-based Workflow

In order to facilitate rapid development while still allowing for a stable product, the Midas team uses a workflow that is heavily guided by our issue-tracking system, Mantis. In this scheme, issues are addressed through the steps listed below:

  • New (Wishlist)
    • This is where issues start. Any issue that is added to the tracker starts out as new and is moved to the project backlog if the issue is decided to be valid or not a duplicate of another issue.
  • Project Backlog
    • These are issues that have been deemed valid and important to the team
  • Current Sprint
    • These are issues that are assigned to you during the current sprint, but you are not actively coding
  • Active Development
    • Issues that developers are actively coding (right now!).
  • Midas QA
    • These issues have been deemed done by developers and merged into the next branch. A second developer is then assigned the issue to QA it in the form of smoke testing and Code Review. A lot of times issues go back and forth between MidasQA and Active Development, before they are considered good enough for merging into master
  • To-Be-Merged
    • These issues have been deemed finished by the team member who provided the quality assurance oversight. A team member with push privileges on the master branch are then assigned to merge the topic branch in question into master. It is the merger's responsibility to ensure that there are no bugs introduced into master by the merge
  • Resolved
    • Once an issue is merged into master without any problems. The issue is marked as resolved.

Git Branchy Workflow

Create a Topic

All new work must be committed on topic branches. Name topics in the form <issue num>-<name>-<user name> A reader should have a general idea of the feature or fix to be developed given just the branch name.

To start a new topic branch:

$ git fetch origin
$ git checkout -b my-topic origin/master
(If you are fixing a bug in the latest release then substitute origin/release for origin/master.)

git help fetch
git help checkout


Pro Git: Basic Branching

Edit files and create commits (repeat as needed):

$ edit file1 file2 file3
$ git add file1 file2 file3
$ git commit

git help add
git help commit
Pro Git: Recording Changes

Share a Topic

When a topic is ready for review and possible inclusion, share it by merging the issue into next

Checkout the topic if it is not your current branch:

$ git checkout my-topic

git help checkout

Push commits in your topic branch for review by the community:

$ git checkout next && git merge --log --no-ff "my-topic" && git push origin next

git help merge
(push git help push)

Let other developers know using Mantis.

Revise a Topic

If a topic is approved during Midas QA, skip to the next step. If the topic was sent back to active development, then it needs to be edited as instructed and merged back into next

Checkout the topic if it is not your current branch:

$ git checkout my-topic

git help checkout

$ "edit and commit"
$ git checkout next && git merge "my-topic" && git push origin next

Merge a Topic

After a topic has been reviewed and approved in Mantis, merge it into master Only authorized developers with push access may perform this step.

Checkout the topic if it is not your current branch:

$ git checkout my-topic

git help checkout

Merge the topic:

$ git checkout master && git merge my-topic && git push

(If the topic does not merge cleanly instructions will be printed.)

$ git help merge
$ git help push

Delete a Topic

After a topic has been merged upstream, delete your local branch for the topic.

Checkout and update the master branch:

$ git checkout master
$ git pull

git help checkout
(pull and submodule update)

Delete the local topic branch:

$ git branch -d my-topic

git help branch

The branch -d command works only when the topic branch has been correctly merged. Use -D instead of -d to force the deletion of an unmerged topic branch (warning - you could lose commits).

Personal tools