21
21
changes will go into an semi-immediate patch or minor release
22
22
23
23
- Please * try* to avoid breaking changes when you can. They make users
24
- face difficult decisions (when do I go through the pain of upgrading),
25
- and make life hard for maintainers and contributors (dealing with
26
- differences on stable branches).
24
+ face difficult decisions (" when do I go through the pain of
25
+ upgrading?"), and make life hard for maintainers and contributors
26
+ (dealing with differences on stable branches).
27
27
28
28
### Mantainers
29
29
@@ -65,20 +65,18 @@ greatest code, including breaking changes, happens on master.
65
65
66
66
The * release-X* branches contain stable, backwards compatible code. Every
67
67
major (X) release, a new such branch is created. It is from these
68
- branches that minor and patch releases are tagged.
68
+ branches that minor and patch releases are tagged. If some cases, it may
69
+ be neccessary open PRs for bugfixes directly against stable branches, but
70
+ this should generally not be the case.
69
71
70
72
The maintainers are responsible for updating the contents of this branch;
71
73
generally, this is done just before a release using release tooling that
72
74
filters and checks for changes tagged as breaking (see below).
73
75
74
76
### Tooling
75
77
76
- * [ gen-release-notes.sh] ( hack/gen-release-notes.sh ) : generate release
77
- notes for a range of commits, and check for next version type
78
- (*** TODO*** )
79
-
80
- * [ cherrypick-minor-version.sh] ( hack/cherrypick-minor-version.sh ) : update
81
- a stable branch with appropriate commits from the master (*** TODO*** ).
78
+ * [ release-notes.sh] ( hack/release-notes.sh ) : generate release notes
79
+ for a range of commits, and check for next version type (*** TODO*** )
82
80
83
81
* [ verify-commit-messages.sh] ( hack/verify-commit-messages.sh ) : check that
84
82
your PR and/or commit messages have the right versioning icon
95
93
- Docs: :book : (` :book: ` )
96
94
- Infra/Tests/Other: :running : (` :running: ` )
97
95
98
- Individual commits may be tagged separately, but will generally be assumed
99
- to match the PR. For instance, if you have a bugfix in with a breaking
100
- change, it's generally encouraged to submit the bugfix separately, but if
101
- you must put them in one PR, mark the commit separately.
96
+ You can also use the equivalent emoji directly, since GitHub doesn't
97
+ render the ` :xyz: ` aliases in PR titles.
102
98
103
- * Commits marked separately will be treated similiarly to a distinct PR by
104
- the cherrypick scripts* . Therefore, only use them if you want the given
105
- commit to be considered separately.
99
+ Individual commits should not be tagged separately, but will generally be
100
+ assumed to match the PR. For instance, if you have a bugfix in with
101
+ a breaking change, it's generally encouraged to submit the bugfix
102
+ separately, but if you must put them in one PR, mark the commit
103
+ separately.
106
104
107
105
### Commands and Workflow
108
106
@@ -124,21 +122,44 @@ a command reference.
124
122
Minor and patch releases are generally done immediately after a feature or
125
123
bugfix is landed, or sometimes a series of features tied together.
126
124
127
- Major releases are done once a sufficient amount of breaking changes are
128
- accrued. Since we don't intend to have a ton of these, the maintainers
129
- will evaluate when to do a major release as it comes up.
125
+ Minor releases will only be tagged on the * most recent* major release
126
+ branch, except in exceptional circumstances. Patches will be backported
127
+ to maintained stable versions, as needed.
128
+
129
+ Major releases are done shortly after a breaking change is merged -- once
130
+ a breaking change is merged, the next release * must* be a major revison.
131
+ We don't intend to have a lot of these, so we may put off merging breaking
132
+ PRs until a later date.
130
133
131
134
### Exact Steps
132
135
133
- 1 . (* if doing a minor or patch release* ) Update the release-X branch with
134
- the latest set of changes using the cherrypick tooling (*** TODO*** )
136
+ Follow the release-specific steps below, then follow the general steps
137
+ after that.
138
+
139
+ #### Minor and patch releases
140
+
141
+ 1 . Update the release-X branch with the latest set of changes by calling
142
+ ` git rebase master ` from the release branch.
143
+
144
+ #### Major releases
135
145
136
- 2 . Generate release notes using the release note tooling (*** TODO*** )
146
+ 1 . Create a new release branch named ` release-X ` (where ` X ` is the new
147
+ version) off of master.
148
+
149
+ #### General
150
+
151
+ 2 . Generate release notes using the release note tooling.
137
152
138
153
3 . Add a release for controller-runtime on GitHub, using those release
139
154
notes, with a title of ` vX.Y.Z ` .
155
+
156
+ 4 . Do a similar process for
157
+ [ controller-tools] ( https://github.com/kubernetes-sigs/controller-tools )
140
158
141
- 4 . Announce the release in ` #kubebuilder ` on Slack with a pinned message.
159
+ 5 . Announce the release in ` #kubebuilder ` on Slack with a pinned message.
160
+
161
+ 6 . Potentially update
162
+ [ kubebuilder] ( https://github.com/kubernetes-sigs/kubebuilder ) as well.
142
163
143
164
### Breaking Changes
144
165
@@ -148,8 +169,11 @@ maintainers/contributors, who have to deal with differences between master
148
169
and stable branches.
149
170
150
171
That being said, we'll occaisonally want to make breaking changes. They'll
151
- be merged onto master, but won't make it into a release immediately (see
152
- [ Release Proccess] ( #release-process ) ).
172
+ be merged onto master, and will then trigger a major release (see [ Release
173
+ Proccess] ( #release-process ) ). Because breaking changes induce a major
174
+ revision, the maintainers may delay a particular breaking change until
175
+ a later date when they are ready to make a major revision with a few
176
+ breaking changes.
153
177
154
178
If you're going to make a breaking change, please make sure to explain in
155
179
detail why it's helpful. Is it necessary to cleanly resolve an issue?
@@ -158,6 +182,11 @@ Does it improve API ergonomics?
158
182
Maintainers should treat breaking changes with caution, and evaluate
159
183
potential non-breaking solutions (see below).
160
184
185
+ Note that API breakage in public APIs due to dependencies will trigger
186
+ a major revision, so you may occaisonally need to have a major release
187
+ anyway, due to changes in libraries like ` k8s.io/client-go ` or
188
+ ` k8s.io/apimachinery ` .
189
+
161
190
* NB* : Pre-1.0 releases treat breaking changes a bit more lightly. We'll
162
191
still consider carefully, but the pre-1.0 timeframe is useful for
163
192
converging on a ergonomic API.
0 commit comments