Release Strategy
The project maintains multiple release branches corresponding to OpenShift versions:main- Active development, latest featuresv4.11- OpenShift 4.11 compatible releasesv4.12- OpenShift 4.12 compatible releasesv4.13- OpenShift 4.13 compatible releases- etc.
Prerequisites
GitHub Token
Export your GitHub personal access token:reposcope for creating releaseswrite:packagesscope if publishing packages
Install release-it
Install release-it and the bumper plugin:Creating a Release
Release from Main
To create a release from the main branch:- Select version: Choose patch, minor, or major version bump
- Review changes: Confirm the changelog and version updates
- Publish: Confirm publishing to GitHub and PyPI
Release from Version Branch
To create a release for a specific OpenShift version (e.g., 4.11):Always create releases from the branch you want to release, not from main.
Semantic Versioning
The project follows Semantic Versioning (MAJOR.MINOR.PATCH):Version Bump Guidelines
MAJOR version (x.0.0) - Incompatible API changes:- Breaking changes to existing APIs
- Removal of deprecated features
- Major refactoring affecting compatibility
- New resource support
- New features and enhancements
- Deprecations (but not removals)
- Bug fixes
- Documentation updates
- Internal improvements
Examples
4.11.1→4.11.2(patch): Bug fix release4.11.2→4.12.0(minor): New features added4.12.5→5.0.0(major): Breaking changes
Release Workflow
1. Prepare the Release
Before runningrelease-it:
-
Ensure all tests pass:
-
Run pre-commit checks:
-
Review merged PRs since last release:
- Update documentation if needed
2. Run release-it
- Prompt for version bump (patch/minor/major)
- Generate changelog from git commits
- Update version in
pyproject.tomland other files - Create a git tag
- Push changes and tag to GitHub
- Create a GitHub release
- Publish to PyPI (if configured)
3. Verify the Release
After releasing:-
Check GitHub releases:
- Visit https://github.com/RedHatQE/openshift-python-wrapper/releases
- Verify release notes and attached assets
-
Check PyPI:
- Visit https://pypi.org/project/openshift-python-wrapper/
- Verify new version is published
-
Test installation:
Cherry-picking to Release Branches
When a fix needs to be included in a released version:Automated Cherry-pick
-
After your PR is merged to main, add a comment:
-
This creates a new PR targeting the
v4.11branch - Review and merge the cherry-pick PR
-
Create a patch release from the version branch:
Manual Cherry-pick
If automated cherry-pick fails:Release Configuration
The project uses.release-it.json for release configuration. Common settings include:
PyPI Publishing
Automated Publishing
If configured,release-it can automatically publish to PyPI:
Manual Publishing
To manually publish to PyPI:TestPyPI
Test releases on TestPyPI first:Post-Release Tasks
Update Documentation
After releasing:- Update installation docs with new version
- Update changelog on ReadTheDocs
- Announce release in relevant channels
Documentation Hosting
Documentation is hosted on ReadTheDocs:- Automatically builds on new releases
- Maintains docs for each version
- Serves latest stable version by default
Hotfix Releases
For critical bugs requiring immediate release:-
Create hotfix branch from version branch:
-
Apply the fix:
-
Merge to version branch:
-
Create patch release:
-
Backport to main if needed:
Rollback a Release
If a release has critical issues:Delete GitHub Release
- Go to Releases page
- Click on the problematic release
- Click “Delete release”
- Delete the corresponding git tag:
Yank from PyPI
You cannot delete packages from PyPI, but you can yank them:- Go to PyPI project page
- Select the version
- Click “Options” → “Yank release”
- Provide a reason
Troubleshooting
release-it Command Not Found
Ensure release-it is installed globally:Authentication Failed
Check your GitHub token:Version Bump Failed
Ensure working directory is clean:PyPI Upload Failed
Verify PyPI credentials:Best Practices
- Always release from clean working directory
- Test thoroughly before releasing
- Review changelog before confirming
- Announce major releases to users
- Maintain version branches for supported releases
- Cherry-pick critical fixes to active version branches
- Document breaking changes clearly
- Use semantic versioning consistently
- Test on TestPyPI before production release
- Monitor issues after release for problems