-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: Add RELEASE.md for the release process #1690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
# Release | ||
|
||
The Prometheus Go client library follows a release process similar to the [Prometheus server](https://github.com/prometheus/prometheus/blob/main/RELEASE.md). | ||
|
||
## Branch Management | ||
|
||
We use [Semantic Versioning](https://semver.org/). | ||
|
||
- Maintain separate `release-<major>.<minor>` branches | ||
- Branch protection enabled automatically for `release-*` branches | ||
- Bug fixes go to latest release branch, then merge to main | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Features and changes go to main branch | ||
- Older release branches maintained on best-effort basis | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Pre-Release Preparations | ||
|
||
1. Review main branch state: | ||
- Expedite critical bug fixes | ||
- Hold back risky changes | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Update dependencies via Dependabot PRs | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Check for security alerts | ||
|
||
## Cutting a Minor Release | ||
|
||
1. Create release branch: | ||
|
||
```bash | ||
git checkout -b release-<major>.<minor> main | ||
git push origin release-<major>.<minor> | ||
``` | ||
|
||
2. Create feature branch: | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```bash | ||
git checkout -b <yourname>/cut-<major>.<minor>.0 release-<major>.<minor> | ||
``` | ||
|
||
3. Update version and documentation: | ||
- Update `VERSION` file | ||
- Update `CHANGELOG.md` (user-impacting changes) | ||
- Order: [SECURITY], [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX] | ||
- For RCs, append `-rc.0` | ||
|
||
4. Create PR and get review | ||
|
||
5. After merge, create tags: | ||
|
||
```bash | ||
tag="v$(< VERSION)" | ||
git tag -s "${tag}" -m "${tag}" | ||
git push origin "${tag}" | ||
``` | ||
|
||
6. For Release Candidates: | ||
- Create PR against prometheus/prometheus using RC version | ||
- Create PR against kubernetes/kubernetes using RC version | ||
- Make sure the CI is green for the PRs | ||
- Allow 1-2 days for downstream testing | ||
- Fix any issues found before final release | ||
- Use `-rc.1`, `-rc.2` etc. for additional fixes | ||
|
||
7. For Final Release: | ||
- Wait for CI completion | ||
- Verify artifacts published | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Click "Publish release" | ||
- For RCs, ensure "pre-release" box is checked | ||
|
||
8. Announce release: | ||
- <[email protected]> | ||
- Slack | ||
- x.com/BlueSky | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
9. Merge release branch to main: | ||
|
||
```bash | ||
git checkout main | ||
git merge --no-ff release-<major>.<minor> | ||
``` | ||
|
||
## Cutting a Patch Release | ||
|
||
1. Create branch from release branch: | ||
|
||
```bash | ||
git checkout -b <yourname>/cut-<major>.<minor>.<patch> release-<major>.<minor> | ||
``` | ||
|
||
2. Apply fixes: | ||
- Cherry-pick from main: `git cherry-pick <commit>` | ||
- Or add new fix commits | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
3. Follow steps 3-9 from minor release process | ||
|
||
## Handling Merge Conflicts | ||
|
||
If conflicts occur merging to main: | ||
|
||
1. Create branch: `<yourname>/resolve-conflicts` | ||
2. Fix conflicts there | ||
3. PR into main | ||
4. Leave release branch unchanged | ||
|
||
## Note on Versioning | ||
|
||
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. | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Compatibility Guarantees | ||
|
||
### Supported Go Versions | ||
|
||
- Support provided only for the three most recent major Go releases | ||
- While the library may work with older versions, no fixes or support provided | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Each release documents the minimum required Go version | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### API Stability | ||
|
||
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): | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- API signatures may change between minor versions | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Types may be modified or relocated | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Default behaviors might be altered | ||
- Feature removal/deprecation can occur with minor version bump | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Compatibility Testing | ||
|
||
Before each release: | ||
|
||
1. **Internal Testing**: | ||
- Full test suite must pass | ||
- Integration tests with latest Prometheus server | ||
- Benchmark comparisons with previous version | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
2. **External Validation**: | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Testing with prometheus/prometheus master branch | ||
- Testing with kubernetes/kubernetes master branch | ||
bwplotka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Breaking changes must be documented in CHANGELOG.md | ||
|
||
### Version Policy | ||
|
||
- Bug fixes increment patch version (e.g., v0.9.1) | ||
- New features increment minor version (e.g., v0.10.0) | ||
- Breaking changes increment minor version with clear documentation | ||
- Major version remains at 0 to indicate potential instability | ||
kakkoyun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Deprecation Policy | ||
|
||
1. Features may be deprecated in any minor release | ||
2. Deprecated features: | ||
- Will be documented in CHANGELOG.md | ||
- Will emit warnings when used (when possible) | ||
- May be removed in next minor version | ||
- Must have migration path documented | ||
bwplotka marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.