2121 changes will go into an semi-immediate patch or minor release
2222
2323- 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).
2727
2828### Mantainers
2929
@@ -65,20 +65,18 @@ greatest code, including breaking changes, happens on master.
6565
6666The * release-X* branches contain stable, backwards compatible code. Every
6767major (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.
6971
7072The maintainers are responsible for updating the contents of this branch;
7173generally, this is done just before a release using release tooling that
7274filters and checks for changes tagged as breaking (see below).
7375
7476### Tooling
7577
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*** )
8280
8381* [ verify-commit-messages.sh] ( hack/verify-commit-messages.sh ) : check that
8482 your PR and/or commit messages have the right versioning icon
9593- Docs: :book : (` :book: ` )
9694- Infra/Tests/Other: :running : (` :running: ` )
9795
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.
10298
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.
106104
107105### Commands and Workflow
108106
@@ -124,21 +122,44 @@ a command reference.
124122Minor and patch releases are generally done immediately after a feature or
125123bugfix is landed, or sometimes a series of features tied together.
126124
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.
130133
131134### Exact Steps
132135
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
135145
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.
137152
1381533 . Add a release for controller-runtime on GitHub, using those release
139154 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 )
140158
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.
142163
143164### Breaking Changes
144165
@@ -148,8 +169,11 @@ maintainers/contributors, who have to deal with differences between master
148169and stable branches.
149170
150171That 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.
153177
154178If you're going to make a breaking change, please make sure to explain in
155179detail why it's helpful. Is it necessary to cleanly resolve an issue?
@@ -158,6 +182,11 @@ Does it improve API ergonomics?
158182Maintainers should treat breaking changes with caution, and evaluate
159183potential non-breaking solutions (see below).
160184
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+
161190* NB* : Pre-1.0 releases treat breaking changes a bit more lightly. We'll
162191still consider carefully, but the pre-1.0 timeframe is useful for
163192converging on a ergonomic API.
0 commit comments