Skip to content

4. Dev Guidelines

Deden Bangkit edited this page Feb 7, 2022 · 6 revisions

Project

Before you start working on an issue, please move the card in the project page to in-progress.

Branch

Feature Branch

Main and Develop Branch

We mainly use two branches: main and develop. All the feature branches should always be updated with develop before creating pull-request. The main branch is for a test server, force merge and push are only available for Admin. Those who have access to Akvo DevOps Infra should be able to promote the main branch to production with a git tag, CLI will be available soon.

Screen Shot 2022-01-20 at 22 52 45

Commit and Pull Request

  • Always include the issue number in your commit message so we could always track the progress of the assigned issue.
  • Doing a commit and then pull while working in a team, always lead to merging conflicts. So make sure your branch is updated by doing git pull before making a commit.
  • I did git commit and found that my local branch, how to justify it? If you merge your local branch into the origin branch, there will be only a single commit reported on the origin branch you've merged even if your local branch has multiple commits, regardless of whether you use a plain git pull or --squash merge. You should always do git pull --rebase instead of merge.
  • Develop branch is the place where you create your pull-request
  • Before creating pull-request, make sure you have merged or rebase develop branch to your branch

View in Github Issue

Screen Shot 2022-01-20 at 21 31 06

View in Zulip

Screen Shot 2022-01-20 at 21 50 05

Why did the build fail?

Become friends with your broken builds. So, your build fails… what exactly does that mean? You can always check the pipeline build from https://akvo.semaphoreci.com/projects/rtmis. Checking the job output should point you to a failing test. There are several reasons:

  • Build or Deploy code is an error, DevOps to blame.
  • Network test is error. Meaning that there are missing URLs or the network/proxy is misconfigured.
  • Backend or Frontend test is Failed
  • Code Quality (Flake, ESLint, or Prettier) warning

Example Error

Screen Shot 2022-01-20 at 21 58 10

But Note that we shouldn't be afraid of this. We just need to fix it together!


Database Schema

We use https://dbdocs.io/docs/ci-integration, push a commit to the develop and the main branch will trigger dbml generation from the Django migration schema and sending an update to dbdocs.io page.