Skip to content

Commit ed52a89

Browse files
committed
Address review comments
Signed-off-by: Kemal Akkoyun <[email protected]>
1 parent abf357c commit ed52a89

File tree

1 file changed

+35
-24
lines changed

1 file changed

+35
-24
lines changed

RELEASE.md

+35-24
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Release
22

3-
The Prometheus Go client library follows a release process similar to the [Prometheus server](https://github.com/prometheus/prometheus/blob/main/RELEASE.md).
3+
The Prometheus Go client library does not follow a strict release schedule. Releases are made based on necessity and the current state of the project.
44

55
## Branch Management
66

77
We use [Semantic Versioning](https://semver.org/).
88

99
- Maintain separate `release-<major>.<minor>` branches
1010
- Branch protection enabled automatically for `release-*` branches
11-
- Bug fixes go to latest release branch, then merge to main
11+
- Bug fixes go to the latest release branch, then merge to main
1212
- Features and changes go to main branch
13-
- Older release branches maintained on best-effort basis
13+
- Non-latest minor release branches are maintained (e.g. bug and security fixes) on the best-effort basis
1414

1515
## Pre-Release Preparations
1616

1717
1. Review main branch state:
1818
- Expedite critical bug fixes
19-
- Hold back risky changes
20-
- Update dependencies via Dependabot PRs
19+
- Don't rush on risky changes, consider them for the next release if not ready
20+
- Update dependencies via Dependabot PRs or manually if needed
2121
- Check for security alerts
2222

2323
## Cutting a Minor Release
@@ -29,7 +29,7 @@ We use [Semantic Versioning](https://semver.org/).
2929
git push origin release-<major>.<minor>
3030
```
3131

32-
2. Create feature branch:
32+
2. Create a new branch on top of `release-<major>.<minor>`:
3333

3434
```bash
3535
git checkout -b <yourname>/cut-<major>.<minor>.0 release-<major>.<minor>
@@ -38,6 +38,7 @@ We use [Semantic Versioning](https://semver.org/).
3838
3. Update version and documentation:
3939
- Update `VERSION` file
4040
- Update `CHANGELOG.md` (user-impacting changes)
41+
- Each release documents the minimum required Go version
4142
- Order: [SECURITY], [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
4243
- For RCs, append `-rc.0`
4344

@@ -52,18 +53,17 @@ We use [Semantic Versioning](https://semver.org/).
5253
```
5354

5455
6. For Release Candidates:
55-
- Create PR against prometheus/prometheus using RC version
56-
- Create PR against kubernetes/kubernetes using RC version
56+
- Create PR against [prometheus/prometheus](https://github.com/prometheus/prometheus) using RC version
57+
- Create PR against [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) using RC version
5758
- Make sure the CI is green for the PRs
5859
- Allow 1-2 days for downstream testing
5960
- Fix any issues found before final release
6061
- Use `-rc.1`, `-rc.2` etc. for additional fixes
62+
- For RCs, ensure "pre-release" box is checked
6163

6264
7. For Final Release:
6365
- Wait for CI completion
64-
- Verify artifacts published
65-
- Click "Publish release"
66-
- For RCs, ensure "pre-release" box is checked
66+
- Click "Publish release"!
6767

6868
8. Announce release:
6969
@@ -86,8 +86,8 @@ We use [Semantic Versioning](https://semver.org/).
8686
```
8787

8888
2. Apply fixes:
89-
- Cherry-pick from main: `git cherry-pick <commit>`
90-
- Or add new fix commits
89+
- Commit the required fixes; avoid refactoring or otherwise risky changes (preferred)
90+
- Cherry-pick from main if fix was already merged there: `git cherry-pick <commit>`
9191

9292
3. Follow steps 3-9 from minor release process
9393

@@ -102,21 +102,30 @@ If conflicts occur merging to main:
102102

103103
## Note on Versioning
104104

105-
Go modules require strict semver. Because we don't commit to avoid breaking changes between minor releases, we use major version zero releases for libraries.
106-
107105
## Compatibility Guarantees
108106

109107
### Supported Go Versions
110108

111109
- Support provided only for the three most recent major Go releases
112-
- While the library may work with older versions, no fixes or support provided
110+
- While the library may work with older Go versions, support and fixes are best-effort for those.
113111
- Each release documents the minimum required Go version
114112

115113
### API Stability
116114

117-
The Prometheus Go client library aims to maintain backward compatibility within minor versions, similar to [Go 1 compatibility promises](https://golang.org/doc/go1compat). However, as indicated by the major version zero (v0):
115+
The Prometheus Go client library aims to maintain backward compatibility within minor versions, similar to [Go 1 compatibility promises](https://golang.org/doc/go1compat):
118116

119-
- API signatures may change between minor versions
117+
118+
## Minor Version Changes
119+
- API signatures are `stable` within a **minor** version
120+
- No breaking changes are introduced
121+
- Methods may be added, but not removed
122+
- Arguments may NOT be removed or added (unless varargs)
123+
- Return types may NOT be changed
124+
- Types may be modified or relocated
125+
- Default behaviors might be altered (unfortunately, this has happened in the past)
126+
127+
## Major Version Changes
128+
- API signatures may change between **major** versions
120129
- Types may be modified or relocated
121130
- Default behaviors might be altered
122131
- Feature removal/deprecation can occur with minor version bump
@@ -128,25 +137,27 @@ Before each release:
128137
1. **Internal Testing**:
129138
- Full test suite must pass
130139
- Integration tests with latest Prometheus server
131-
- Benchmark comparisons with previous version
140+
- (optional) Benchmark comparisons with previous version
141+
> There is no facility for running benchmarks in CI, so this is best-effort.
132142
133143
2. **External Validation**:
134-
- Testing with prometheus/prometheus master branch
135-
- Testing with kubernetes/kubernetes master branch
144+
145+
Test against bigger users, especially looking for broken tests or builds. This will give us awareness of a potential accidental breaking changes, or if there were intentional ones, the potential damage radius of them.
146+
147+
- Testing with [prometheus/prometheus](https://github.com/prometheus/prometheus) `main` branch
148+
- Testing with [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) `main` branch
136149
- Breaking changes must be documented in CHANGELOG.md
137150

138151
### Version Policy
139152

140153
- Bug fixes increment patch version (e.g., v0.9.1)
141154
- New features increment minor version (e.g., v0.10.0)
142155
- Breaking changes increment minor version with clear documentation
143-
- Major version remains at 0 to indicate potential instability
144156

145157
### Deprecation Policy
146158

147159
1. Features may be deprecated in any minor release
148160
2. Deprecated features:
149161
- Will be documented in CHANGELOG.md
150162
- Will emit warnings when used (when possible)
151-
- May be removed in next minor version
152-
- Must have migration path documented
163+

0 commit comments

Comments
 (0)