Skip to content

Commit 99825b0

Browse files
committed
Update to reflect new branching policy
1 parent 2d63efb commit 99825b0

File tree

2 files changed

+98
-54
lines changed

2 files changed

+98
-54
lines changed

Diff for: wiki/contributing.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@ we're saying here are just common sense and none of them is hard to follow.
1818
With this in mind, please try to observe the following guidelines when
1919
submitting patches.
2020

21+
## Common Repository Format and Git Branches
22+
23+
All Cloud Haskell repositories should conform to a common structure, with the
24+
exception of website and/or documentation projects. The structure is basically
25+
that of a cabal library or executable project, with a couple of additional files.
26+
27+
```
28+
- project-name
29+
- project-name.cabal
30+
- Makefile
31+
- LICENCE
32+
- README.md
33+
- src/
34+
- tests/
35+
- benchmarks/
36+
- examples/
37+
- regressions/
38+
```
39+
40+
All repositories must use the same git branch structure:
41+
42+
* ongoing development takes place on the `master` branch
43+
* the code that goes into a release must be tagged as soon as it is uploaded to hackage
44+
* each release tag must then get its own release-x.y.z branch, branched from the tagged commit
45+
* after a release, the *release branch* is not merged back into `master`
46+
* patches can be submitted via branches off `master`, or from a `release-x.y.z` branch
47+
* features and bug-fixes that are compatible with `master` can be merged in directly
48+
* interim bug-fixes we **don't** want included (i.e., bug-fix only releases)
49+
* are merged into a new release-x.y.z branch (taken from the prior release branch) instead
50+
* these can, but do not have to be, merged into `master`
51+
2152
### __1. Check to see if your patch is likely to be accepted__
2253

2354
We have a rather full backlog, so your help will be most welcome assisting
@@ -92,8 +123,8 @@ contain multitudinous compiler warnings will take longer to QA.
92123
Please be aware of whether or not your changes are actually a bugfix or a new
93124
feature, and branch from the right place accordingly. The general rule is:
94125

95-
* new features must branch off `development`
96-
* bug fixes must branch off `master` (which is the stable, production branch)
126+
* new features should branch off `master`
127+
* bug fixes can branch off `master` or a `release-x.y.z` branch
97128

98129
If you branch from the wrong place then you will be asked to rework your changes
99130
so try to get this right in the first place. If you're unsure whether a patch

Diff for: wiki/maintainers.md

+65-52
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,29 @@ wiki: Maintainers
66

77
### Maintainers
88

9-
This part of the guide is specifically for maintainers, and
10-
outlines the development process and in particular, the branching
11-
strategy. We also point out Cloud Haskell's various bits of
12-
infrastructure as they stand at the moment.
9+
This part of the guide is specifically for maintainers, and outlines the development
10+
process and in particular, the branching strategy. We also point out Cloud Haskell's
11+
various bits of infrastructure as they stand at the moment.
1312

14-
Perhaps the most important thing to do as a maintainer, is to
15-
make other developers aware of what you're working on by assigning
16-
the Jira issue to yourself!
13+
Perhaps the most important thing to do as a maintainer, is to make other developers
14+
aware of what you're working on by assigning the Jira issue to yourself!
1715

1816
----
1917
#### Releases
2018

2119
All releases are published to [hackage][3]. At some point we may start to
22-
make *nightly builds* available on this website.
20+
make *nightly builds* available on this website. We need some help setting that
21+
up though.
2322

2423
----
2524

2625
#### Community
2726

28-
We keep in touch through the [parallel-haskell google group][7],
29-
and once you've joined the group, by posting to the mailing list address:
30-
[email protected]. This is a group for **all** things related
31-
to concurrent and parallel Haskell. There is also a maintainer/developer
32-
centric [cloud-haskell-developers google group][9], which is more for
33-
in-depth questions about contributing to or maintaining Cloud Haskell.
27+
We keep in touch through the [parallel-haskell google group][7], and once you've
28+
joined the group, by posting to the mailing list address: [email protected].
29+
This is a group for **all** things related to concurrent and parallel Haskell. There is
30+
also a maintainer/developer centric [cloud-haskell-developers google group][9], which is
31+
more for in-depth questions about contributing to or maintaining Cloud Haskell.
3432

3533
You might also find some of us hanging out at #haskell-distributed on
3634
freenode from time to time.
@@ -59,52 +57,66 @@ the timescales yet.
5957

6058
### Branching/Merging Policy
6159

62-
The master branch is the **stable** branch, and should always be
63-
in a *releasable* state. This means that on the whole, only small
64-
self contained commits or topic branch merges should be applied
65-
to master, and tagged releases should always be made against it.
60+
The master branch is the *active development* branch. Small changes can be committed
61+
directly to `master`, or committed to a branche before getting merged. When we're
62+
ready to release, the project is tagged using the format `vX.Y.Z` once it has been
63+
published. Each release then gets its own `release-x.y.z` branch, created from the
64+
tagged commit. These can be used to produce interim/bug-fix releases if necessary.
6665

67-
#### Tagging Releases
66+
A release tag should be of the form `x.y.z` and should **not** be prefixed with the
67+
repository name. Older tags use the latter form as they date from a time when all the
68+
Cloud Haskell source code lived under one git repository.
6869

69-
A release tag should be of the form `x.y.z` and should **not**
70-
be prefixed with the repository name. Older tags use the latter
71-
form as they date from a time when all the Cloud Haskell source
72-
code lived under one git repository.
70+
Patches should be made against `master` **unless** they represent an interim bug-fix
71+
to a given `release-x-y-z` branch. The latter should be created against the branch
72+
they intend to fix.
7373

7474
#### Development Branches
7575

76-
Ongoing work can either be merged into master when complete or
77-
merged into development. Development is effectively an integration
78-
branch, to make sure ongoing changes and new features play nicely
79-
with one another. On the other hand, master is a 'stable' branch
80-
and therefore you should only merge into it if the result will be
81-
releasable.
82-
83-
In general, we try to merge changes that belong to a major version
84-
upgrade into development, whereas changes that will go into the
85-
next minor version upgrade can be merged into master.
76+
Development should usually take place on a `feature-X` or `bugfix-Y` branch. The
77+
old `development` branch is defunct and will be removed at some point in the future.
78+
79+
#### Interim and bug-fix only releases
80+
81+
The complexity around *interim* releases is necessary to deal with situations where we
82+
need to patch a release, but `master` has already moved on, making the patch irrelevant
83+
for the next major release. For example, assuming a project is at version 1.2.3 and we
84+
find a bug in module `Foo.hs`. Users who're on v1.2.3 will want the fix asap for any
85+
production deployments, yet `Foo.hs` has been completely re-written/replaced on `master`
86+
and the bugfix isn't needed there. To support user's who do not wish to wait for v2.0.0
87+
to be released, we create a `release-1.2.4` branch and merge the bugfix into that, but
88+
we do **not** merge this back into master, since the patch won't apply.
89+
This way, subsequent bug fixes to the 1.2.x series can also continue in parallel with
90+
changes to `master` if necessary.
91+
92+
What happens if we have a patch for `release-1.2.3` that *is* applicable to master, but
93+
won't apply cleanly due to changes since the release was tagged? In this situation, we
94+
create a bug-fix release branch as usual, into which the patch is merged. A maintainer
95+
will then have to retro-fit the patch so that it can be applied to `master`. This is
96+
a somewhat ugly, since if we wish to create subsequent bug-fixes and create another
97+
1.2.5 branch (viz the example above), we'll may have to manually transplant some changes
98+
from `master` in the process.
8699

87100
#### Keeping History
88101

89-
Try to make only clean commits, so that bisect will continue to work.
90-
At the same time, it's best to avoid making destructive updates. If
91-
you're planning on doing lots of squashing, then work in a branch
92-
and don't commit directly to development - and **definitely** not to
93-
master.
102+
Try to make only clean commits, so that bisect will continue to work. At the same time,
103+
it can be helpful to avoid making destructive updates. If you're planning on doing lots
104+
of squashes, then work in a branch and don't commit directly to `master` until you're
105+
finished and ready to QA and merge.
94106

95107
#### Committing without triggering CI builds
96108

97-
Whilst we're on travis-ci, you can do this by putting the text
98-
`[ci skip]` anywhere in the commit message. Please, please
99-
**do not** put this on the first line of the commit message.
109+
Whilst we're on travis-ci, you can do this by putting the text `[ci skip]` anywhere in
110+
the commit message. Please, please **do not** put this on the first line of the commit
111+
message.
100112

101113
Once we migrate to Bamboo, this may change.
102114

103115
#### Changing Jira bugs/issues via commit messages
104116

105-
You can make complex changes to one or more Jira issues with a single
106-
commit message. As with skipping CI builds, please **do not** put this
107-
messy text into the first line of your commit messages.
117+
You can make complex changes to one or more Jira issues with a single commit message.
118+
As with skipping CI builds, please **do not** put this messy text into the first line
119+
of your commit messages.
108120

109121
Details of the format/syntax required to do this can be found on
110122
[this Jira documentation page](https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages)
@@ -125,11 +137,10 @@ See https://cloud-haskell.atlassian.net/browse/INFRA-1 for details.
125137

126138
### Release Process
127139

128-
First of all, a few prior warnings. **Do not** tag any projects
129-
until *after* you've finished the release. If you build and tag
130-
three projects, only to find that a subsequent dependent package
131-
needs a bit of last minute surgery, you'll be sorry you didn't
132-
wait. With that in mind....
140+
First of all, a few prior warnings. **Do not** tag any projects until *after*
141+
you've finished and uploaded the release. If you build and tag three projects,
142+
only to find that a subsequent dependent package needs a bit of last minute
143+
surgery, you'll be sorry you didn't wait. With that in mind....
133144

134145
Before releasing any source code, make sure that all the jira tickets
135146
added to the release are either resolved or remove them from the
@@ -156,11 +167,13 @@ too!
156167

157168
**Now** you should tag all the projects with the relevant version number.
158169
Since moving to individual git repositories, the tagging scheme is now
159-
`x.y.z` and *not* `<project>-x.y.z`.
170+
`x.y.z` and *not* `<project>-x.y.z`. Once you've tagged the release, create
171+
a branch named `release-x.y.z` and push both the newly created tag(s) and the
172+
branch(es).
160173

161174
Once the release is out, you should go to [JIRA](https://cloud-haskell.atlassian.net)
162-
and close all the tickets for the release. Jira has a nice 'bulk change'
163-
feature that makes this very easy.
175+
and close all the tickets for the release. Jira has a nice 'bulk change' feature
176+
that makes this very easy.
164177

165178
After that, it's time to tweet about the release, post to the parallel-haskell
166179
mailing list, blog etc. Spread the word.

0 commit comments

Comments
 (0)