You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combines:
* A merge of `main` into `release/cuttlefish`
* A bump of the version in the docker file
* The content of `v1.3.0.1`
To be merged into `release/cuttlefish` for preparation of `v1.3.0.1`.
> * Please read our [Contributing Guidelines](https://github.com/radixdlt/babylon-node/blob/main/CONTRIBUTING.md) before opening a PR.
4
-
> * Before creating your PR, please ensure you have used the _correct base branch_ as per the [branching strategy](https://github.com/radixdlt/babylon-node/blob/main/docs/branching-strategy.md), both for branching from, and in the PR UI above.
5
-
> * For most code changes, this is `develop`.
6
-
> * For stand-alone docs changes, this is `main`.
7
-
> * For workflow changes, this is the oldest supported `release/*` branch.
8
-
> * Please remove these sections as you fill out your PR.
3
+
> * Please read our [Contributing Guidelines](/CONTRIBUTING.md) before opening a PR.
4
+
> * Before creating your PR, please ensure you read the [branching strategy](/docs/branching-strategy.md). The end result after completing the merge actions should be that `main <= release/XXX <= develop`, where `XXX` is the latest released protocol version. This ensures that we minimise merge conflicts, and that work doesn't go missing.
5
+
> * As per the branching strategy, **you must ensure you select the _correct base branch_**, both for branching from, and in the PR UI above. The following process can be used to decide the base branch:
6
+
> * For code changes which can wait until the next protocol update to be released, use `develop`. This should be the default for code changes.
7
+
> * For code changes which need to go out as a fully-interoperable update to the node at the current protocol version, use `release/XXX`.
8
+
> * Such changes must be tested and reviewed more carefully to mitigate the risk of regression.
9
+
> * Once the change is merged, it is the merger's responsibility to ensure `release/XXX` is merged into the `develop` branch.
10
+
> * For github workflow changes, use `main`.
11
+
> * Once the change is merged, it is the merger's responsibility to ensure `main` is merged into both `release/XXX` and `develop`, so that the changes also apply to hotfixes, and to current development.
12
+
> * For changes to README files, use `main`.
13
+
> * Once the change is merged, it is the merger's responsibility to ensure `main` is merged into both `release/XXX` and `develop`, so that the changes also apply on these branches.
9
14
>
15
+
> _Please remove this section once you confirm you follow its guidance._
10
16
11
17
## Summary
12
18
19
+
<!--
13
20
> [!TIP]
14
21
>
15
22
> Start with the context of your PR. Why are you making this change? What does it address? Link back to an issue if relevant.
16
23
>
17
-
> Then summarise the changes that were made. Bullet points are fine.
18
-
19
-
## Details
20
-
21
-
> [!TIP]
22
-
>
23
-
> This section is optional. Go into more detail about the changes that were made, or the thinking behind the changes.
24
+
> Then summarise the changes that were made.
25
+
> * Bullet points are fine.
26
+
> * Feel free to add additional subheadings (using ###) with more information if required.
27
+
-->
24
28
25
29
## Testing
26
30
31
+
<!--
27
32
> [!TIP]
28
33
>
29
34
> Explain what testing / verification is done, including manual testing or automated testing.
Copy file name to clipboardExpand all lines: docs/branching-strategy.md
+37-50Lines changed: 37 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,67 +3,62 @@
3
3
4
4
Once you have read the [contributing guide](../CONTRIBUTING.md), if you want to start development, you will need to know which branches to use.
5
5
6
-
> [!NOTE]
7
-
> Supported base branches:
8
-
> *`develop` - The primary development branch for upcoming features and enhancements
9
-
> *`release/*` - Various past and future releases
10
-
> *`main` - A mirror of the latest release
11
-
>
12
-
> When clicking merge on a PR to one of these branches, it is your duty to ensure that PRs are raised to merge that branch into all later/downstream supported base branches.
13
-
14
-
## Summary of approach
15
-
16
-
### The base branches
17
-
18
6
We use a variant of `git-flow`, where there are three types of base branches: the `main`, `develop`, and `release/*` branches.
19
7
20
-
* The `main` branch is the public-facing base branch and **represents the last official release**. It's also used for docs.
21
-
* The `develop` branch is the primary integration branch, for work targeting the next protocol version.
22
-
* The `release/*` branches are for all named protocol versions (i.e. each 1.X in the naming scheme. Typically patch releases should re-use same branch). A subset of release branches are **currently supported** - typically these are those currently on a live environment, or under development.
23
-
24
-
At any given time, there is a strict ordering on the supported base branches, where the process aims to guarantee all work on previous branches is in the later/downstream branches. This order (from earliest/most upstream to latest/most downstream) is as follows:
25
-
26
-
* Released `release/*` branches still compatibile with a mainnet network
27
-
*`main`
28
-
* Unreleased `release/*` branches
29
-
*`develop`
30
-
31
-
The latest ordering is at the top of this document.
8
+
> [!IMPORTANT]
9
+
> The currently supported base branches are as follows:
10
+
> *`develop` - The primary development branch for features and enhancements to be released at the next protocol version.
11
+
> *`release/XXX` = `release/cuttlefish` - The latest published protocol version. This is used for hotfixes or low-risk protocol-compatible changes which will be released as an optional node update.
12
+
> *`main` - The public-facing base branch, which represents the docs and code for the latest official release.
13
+
>
14
+
> This list is ordered by "each branch should contain every change in each branch below it". When clicking merge on a PR to one of these base branches `B`, it is your duty to ensure that a new PR is raised to merge `B` into all branches above `B` in the list. This ensures that work ends up in the right place, we minimise merge conflicts, and that work doesn't go missing. See the [Development and Merge Process](#developmentmerge-process) section for more information.
32
15
33
-
###Development process
16
+
## Development/Merge process
34
17
35
18
When working on changes:
36
-
* You will first need to select the correct base branch to create your feature branch from. For some epics, it is acceptable to choose a long running `feature/*` or `epic/*` branch as your base, to break up the work into separate reviews.
19
+
* You will first need to select the correct base branch to create your feature branch from. For some epics, it is acceptable to choose a long running `feature/*` or `epic/*` branch as your base, to break up the work into separate reviews, but to merge it atomically once it's been properly tested.
37
20
* Your branch should start `feature/*`, or variants on naming such as `hotfix/*`, `tweak/*`, `docs/*` are permitted. The specific name should be prefixed by a JIRA ticket or Github issue reference where appropriate, e.g. `feature/NODE-123-my-feature` for JIRA tickets or `feature/gh-1235-my-feature` for github issues.
38
21
* When you raise a PR, you will need to ensure you select the appropriate base branch before creating the PR. **The default, `main` is typically not correct!**
39
22
40
-
> [!IMPORTANT]
41
-
>
42
-
> Finally, when a PR is merged, it is **the PR merger's responsibility** to ensure that the _base branch_ that was merged into is then merged into _all downstream base branches_ (ideally one by one, like a waterfall).
43
-
>
44
-
> If there is a merge conflict, this should be handled by creating a special `conflict/X-into-Y-DATE` branch (for branches `X`, `Y` and `DATE`) from `X`, and putting in a PR with a merge target of `Y`.
45
-
>
46
-
> But if this process is properly followed, such merge conflicts will be rare.
23
+
Finally, when a PR is merged, it is **the PR merger's responsibility** to ensure that the _base branch_ that was merged into is then merged into _all downstream base branches_. If there is a merge conflict, this should be handled by creating a special `conflict/X-into-Y-DATE` branch (for branches `X`, `Y` and `DATE`) from `X`, and putting in a PR with a merge target of `Y`. If this process is properly followed, such merge conflicts will be rare.
47
24
48
-
## Which base branch should I use for X?
25
+
## Which base branch should I use for my change?
49
26
50
27
### Code changes
51
28
52
-
Features branches usually branch from`develop`, unless they need to target the current/previous protocol version, in which case, they will need to target the appropriate `release/*` branch.
29
+
For most code changes, choose`develop`. Code against the `develop` branch will be released at the next protocol update.
53
30
54
-
### Stand-alone doc changes
31
+
For code changes which need to go out as a fully-interoperable update to the node at the current protocol version, use the current `release/XXX` branch. Such changes will be reviewed more carefully to mitigate the risk of regression. Once the change is merged, it is the merger's responsibility to ensure `release/XXX` is merged into the develop branch.
55
32
56
-
Public facing docs change unrelated to another ticket should use a base branch of `main` - as this is the branch which is first visible when someone looks at the repository.
33
+
### Stand-alone README changes
34
+
35
+
Public facing docs change unrelated to another ticket should use a base branch of `main` - as this is the branch which is first visible when someone looks at the repository. Once the change is merged, it is the merger's responsibility to ensure `main` is merged into both `release/XXX` and `develop` branches to avoid merge conflicts or confusion.
57
36
58
37
### Workflow / CI changes
59
38
60
-
Workflow changes should branch from the _most upstream_ (earliest) supported branch. Typically this is a `release/*` branch.
39
+
For github workflow changes, start by branching off of and merging to the current `main` branch.
40
+
41
+
Once the change is merged, it is the merger's responsibility to ensure `main` is merged into both `release/XXX` and `develop`, so that the changes also apply for current development, and for any hotfixes which need to be built and release.
42
+
43
+
## Base branch change process
61
44
62
-
Once the post-merge process is followed, this change will find itself on all later/downstream base branches too.
45
+
* When a release is published, as part of the release process, `release/XXX` will get merged into `main`, which should effectively set `main == release/XXX`.
46
+
* When a new protocol update is about to be published, late in the process:
47
+
* A `release/YYY` branch will be created from `develop`
48
+
* Any existing PRs will be reviewed and either have their base branch adjusted to `release/YYY` or kept against `develop`
49
+
* The active branch at the top of this file will be updated to `release/YYY`
63
50
64
-
This ensures that these changes are on all supported branches, so builds can be built on `develop` or on all supported branches.
51
+
## Background Detail
65
52
66
-
## Merge or Rebase/Cherry-pick?
53
+
### Diagram
54
+
55
+
The following demonstrates a possible branch structure under this strategy, under the hypothetical scenario where `bottlenose` is the current live protocol version, and `cuttlefish` is being prepared but not yet live.
56
+
57
+
Admittedly, this isn't particularly easy to follow. The key with this strategy is following the rules. If the rules are followed, you don't need to visualize the structure.
58
+
59
+

60
+
61
+
### Merge or Rebase/Cherry-pick?
67
62
68
63
This strategy relies on the fact that we always merge.
69
64
@@ -77,15 +72,7 @@ We acknowledge the weakness of merging that this can make the git history messie
77
72
78
73
At merge time, it is acceptable but not recommended to squash-merge. We encourage developers to instead squash commits before asking for a review. This results in a better record of the review / iteration process.
79
74
80
-
## Diagram
81
-
82
-
The following demonstrates a possible branch structure under this strategy, under the hypothetical scenario where `bottlenose` is the current live protocol version, and `cuttlefish` is being prepared but not yet live.
83
-
84
-
Admittedly, this isn't particularly easy to follow. The key with this strategy is following the rules. If the rules are followed, you don't need to visualize the structure.
85
-
86
-

87
-
88
-
## Why do we follow this model?
75
+
### Why do we follow this model?
89
76
90
77
In order to support a network built upon deterministic execution of the radix engine, we need to have a very clear policy of what is compatible with what. This is where the protocol version strategy comes in. And this maps to git via the `release/*` branch strategy.
0 commit comments