Skip to content

Commit 6738fc5

Browse files
griwesbrycelelbach
authored andcommitted
Initial version of the branching strategy docs.
1 parent ac3eda9 commit 6738fc5

File tree

1 file changed

+123
-0
lines changed

1 file changed

+123
-0
lines changed

doc/branching.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Thrust Branching and Development Model
2+
3+
The following is a description of how the Thrust development teams approaches branching and release tagging. This
4+
is a living document that will evolve as our process evolves.
5+
6+
## Thrust Version
7+
8+
Thrust has historically had its own versioning system, independent of the versioning scheme of the CUDA Toolkit.
9+
Today, Thrust is released with the CUDA Toolkit, but we currently still maintain the double versioning scheme.
10+
11+
The following is a mapping from Thrust versions to CUDA Toolkit versions and vice versa. Note that some Thrust
12+
versions don't directly map to any CUDA Toolkit version.
13+
14+
| Thrust version | CUDA version |
15+
| ----------------- | ------------- |
16+
| v1.9.4 | 10.1 |
17+
| v1.9.3 | 10.0 |
18+
| v1.9.2 | 9.2 |
19+
| v1.9.1-2 | 9.1 |
20+
| v1.9.0-4 | 9.0 |
21+
| v1.8.3-2 | 8.0 |
22+
| v1.8.2 | 7.0 |
23+
| v1.8.1 | 7.0 |
24+
| v1.8.0 | N/A |
25+
| v1.7.2 | 6.5 |
26+
| v1.7.1 | 6.0 |
27+
| v1.7.0 | 5.5 |
28+
| v1.6.0 | N/A |
29+
| v1.5.3 | 5.0 |
30+
| v1.5.2 | 4.2 |
31+
| v1.5.1 | 4.1 |
32+
| v1.5.0 | N/A |
33+
| v1.4.0 | 4.0 |
34+
| v1.3.0 | 3.2 |
35+
| v1.2.1 | 3.1 |
36+
| v1.2.0 | N/A |
37+
| v1.1.1 | N/A |
38+
| v1.1.0 | N/A |
39+
| v1.0.0 | N/A |
40+
41+
## Repositories
42+
43+
As Thrust is developed both on GitHub and internally at NVIDIA, there's three main places where code lives:
44+
45+
* The [public Thrust repository](https://github.com/thrust/thrust), referred to as `github` later in this
46+
document.
47+
* An internal GitLab repository, referred to as `gitlab` later in this document.
48+
* An internal Perforce repository, referred to as `perforce` later in this document.
49+
50+
## Branches and Tags
51+
52+
The following tag names are used in the Thrust project:
53+
54+
* `github/cuda-X.Y`: the tag that directly corresponds to what has been shipped in the CUDA Toolkit release X.Y.
55+
* `github/vA.B.C`: the tag that directly corresponds to a Thrust version A.B.C.
56+
57+
The following branch names are used in the Thrust project:
58+
59+
* `github/master`: the Source of Truth development branch of Thrust.
60+
* `github/old-master`: the old Source of Truth branch, before unification of public and internal repositories.
61+
* `perforce/private`: mirrored github/master, plus files necessary for internal NVIDIA testing systems.
62+
* `gitlab/staging/cuda-X.Y`: the branch for a CUDA Toolkit release that has not been released yet. cuda-X.Y should
63+
be tagged on this branch after the final commit freeze (see "Release branches" below).
64+
* `github/maintenance/cuda-Z.W`: the continuation of gitlab/staging/cuda-Z.W, but after release of CUDA Z.W, plus
65+
post-release fixes if any are needed (see "Old release branches" below).
66+
* `gitlab/feature/<name>`: feature branch for internally developed features.
67+
* `gitlab/bug/<bug-system><bug-name>`: bug fix branch.
68+
* `gitlab/master`: same as `github/master`, but not yet published, during a freezing period (see "Feature freeze"
69+
below).
70+
71+
## Development Process Described
72+
73+
### Normal development
74+
75+
During regular parts of the development cycle, when we develop features on feature branches, and fix bugs on the
76+
main branch, we can:
77+
78+
1. Merge internal fixes to `github/master` and to `perforce/private`.
79+
2. Merge Github contributions to `github/master` and to `perforce/private`.
80+
81+
### Feature freeze
82+
83+
In case where we have a new feature for a CUDA Toolkit release: just before the CUDA Toolkit feature freeze for a
84+
new release branch, we should stop merging commits (including public contributions) to `github/master`, and move to
85+
development on `gitlab/master`, and merge the not yet public features there.
86+
87+
In those cases, we should wait until the new version of the toolkit is released before we push the new updated
88+
`gitlab/master` to `github/master`, roughly at the same time as we push from `gitlab/staging/cuda-X.Y` to
89+
`github/maintenance/cuda-X.Y` and tag `cuda-X.Y`, and the appropriate Thrust version tag.
90+
91+
If we don't have big, not-public-before-release features landing in X.Y, however, we can avoid having a feature
92+
freeze period.
93+
94+
The reason for having a freeze period at all is: `github/master` is supposed to be the Source of Truth. We want the
95+
history to follow the same order of commits in both Git and Perforce, and once a change is merged, we cannot rebase
96+
things that went into `perforce/internal` on top of it. Therefore: since we only really commit to Perforce but not
97+
`github/master` when we have a feature that is ready to be delivered, but is only a part of a new release and
98+
shouldn't/can't be public yet, we have to make sure that after it is merged to `gitlab/master` (and to `perforce/internal`),
99+
nothing new lands in `github/master` before we push the feature out.
100+
101+
To avoid situations like this with bug fixes, when we fix a bug at a not crazy point in the release cycle, we
102+
should develop it on git, merge/push it on Github, and then pull the new commit to Perforce.
103+
104+
### Release branches
105+
106+
These are the internal Git branches that map directly to internal CUDA release branches. These branches are primarily
107+
developed in Git, and commits applied to them are then pushed to Perforce.
108+
109+
After a CUDA Toolkit version is released, these transition to being old release branches.
110+
111+
### Old release branches
112+
113+
These branches represent a version that has landed in a CUDA Toolkit version, but with bugfixes for things that do
114+
deserve being fixed on a release branch. These shouldn't be groundbreaking; the following are an acceptable set of
115+
fixes to go into these branches, because they can remove annoyances, but shouldn't change behavior:
116+
117+
* Documentation fixes and updates.
118+
* Thrust build system changes.
119+
* Additional examples, fixes to examples and tests.
120+
* (Possibly:) Fixing missing headers. This one is slightly less obvious, because it makes it possible for users
121+
of standalone Thrust to write programs that won't compile with CUDA Thrust. Determinations will be made on a
122+
case by case basis.
123+

0 commit comments

Comments
 (0)