Skip to content
Aleksey Midenkov edited this page Nov 8, 2017 · 64 revisions

Development Guidelines

Development branches

Trunk

Branch name: trunk

Main development branch. All development is accumulated into this branch.

Trunk base

Branch name: base

Upstream branch on which trunk is based. Updated when upstream commits are merged to trunk.

Upstream fixes

Branch name: upstream

General fixes compatible with upstream should be merged into this branch from where upstream developers can easily pick them.

Misc features

Branch name: misc

All minor features not related to time-related SQL (f.ex. new option to a script) should be merged into this branch where they are left to upstream developer's consideration to accept or reject.

Temporary ajustments

Branch name: undo

Adjustments that should be reverted back on upstream merge. F.ex. disabled tests.

Release branches

Each release, i.e the version publicly used should have its own branch to go through the stabilizing process (accumulate bug fixes, new features are generally prohibited). Release branches are named like this:

release/1.0
release/2.0
...

Bugfix releases are defined inside release branches as tags with minor version counter:

versioning-0.1.0 (same as release/1.0)
versioning-0.1.1
versioning-0.1.2
...

Developer branches

Developer branches are named by this scheme:

//comment

Upon the task completion before merging branch into trunk these conditions must be met:

  • branch is compilable;
  • main test suite completes without errors.

Before merging the task into trunk multiple commits should be united into single commit (see git merge --squash). This single commit can be put into another local branch from where pull request will be issued.

Before merging the task into trunk the author may consider asking for code review from another developer. Though, this is not obligatory and is left to the author's sole discretion, it is good manners to do so if changes are done to another's code.

Naming convention

System versioning prefix

All global functions or common class methods as well as global variables or common class data members that are used exclusively for system versioning begin with prefix vers_. Exception is done for names that contain explicit notion of system versioning, f.ex.: versioned().

Commit messages

Don't tell what you did (f.ex. with verbs 'made', 'coded', 'created', etc.), tell what is in commit. Be specific (f.ex. 'disable warning' tell what warning). If commit is related to a task, commit message should duplicate task name (in some shorter way if task name is long). Segmentation fault, assertion failures are shortened to appropriate signal names (like in kill -l): SIGSEGV, SIGABRT. If C++ exception name is known, it should be used instead.

Commit message must start with capital letter and must not end with period. For multi-line messages leave second line blank.

General commit message format:

PREFICES: Message [task refs]

Example:

SQL: SIGSEGV in push_warning() [fixes #99]

The following prefices should be used in commit messages:

SQL:

For modifications on SQL layer.

IB:

For modifications on InnoDB layer.

Scripts:

When modification is done on scripts only. Configuration files also fall to this category.

Style:

When modification is done on style only (formatting, renaming, etc.).

Tests:

When modification is done on tests only.

Merge:

Fixes after upstream merge.

Misc: , Cleanup: , etc.

Any miscellaneous prefix that will help to identify commit topic quickly.

New version issuing

1. create tag base-V from natsys/base

git tag base-V natsys/base

2. create branch natsys/V from natsys/trunk

git co -b natsys/V natsys/trunk
git push -u origin natsys/V

3. create release info here

4. create tag versioning-V.0 from natsys/V

git tag -a versioning-V.0 natsys/V

Fill message with modified info:

  • heading # characters removed;
  • version marker removed from header;
  • very long info text is shortened.

Info examples may be viewed with command:

git tag -n30

5. push tags

git push --tags

6. create release on GitHub from tag versioning-V.0

7. close milestone

Misc

When developing a new feature contribute tests for that feature too. But put feature and tests in different commits. So, PR should consist of two patches.

Coding guidelines

All code committed to trunk should conform to MySQL General Development Guidelines.

Bug report template:

### Reproduce
SQL code with **or replace**, without result output. 

### Result
Result output or textual description.

### Expected
Result output or textual description.

### Notes
If any, additional description is here.

Links