- Overview
- Branches
- Release Labels
- Prerequisites
- Release the new version of OpenSearch Benchmark to PyPI, Docker, and ECR
- Error Handling
This document explains the release strategy for artifacts in this project.
OpenSearch Benchmark follows the semantic versioning convention. Currently, the project maintains the following active branches.
- main: The mainline branch where most development occurs and changes get merged in.
- 1.0, 1.1, 1.12, etc.: These are branches associated with released minor versions in the OSB 1.0 major version line, such as
1.0.0,1.1.0and1.12.0. In between minor releases, there may be occasional patch releases such as1.9.1, which like version1.9.0would also be released off the1.9branch. - 2.0: The branch associated with the next major version line of OSB, which is yet to be released.
Label PRs that you believe need to be backported with the target branch, such as 1.9 or 1.x. Backport PRs by checking out the versioned branch, cherry-picking changes and opening a PR against each target backport branch.
In general, branches in the authoritative repository are intended for the various versions of the project. Do not create feature branches, the exception being long-lived branches that require active collaboration from multiple developers. Name such branches feature/<FEATURE>. Once the feature branch is merged into main, please make sure the feature branch is deleted.
Releases are tagged with labels in the scheme vN.N.N, for instance v1.0.0, v1.1.0 and v2.0.0, as well as patch and backport. Use release labels to target an issue or a PR for a given release. See MAINTAINERS for more information on triaging issues.
The release process is standard across repositories in this open-source project and is run by a release manager volunteering from amongst the maintainers.
Add backport labels to PRs and commits so that changes can be added to main branch and other related major and minor version branches. For example, if a PR is published as a patch fix for OSB version 1.3.0, it should be labeled with a backport label called backport-1.3 so that it backports to 1.3 branch.
- Since releases are generally published on Thursdays, maintainers should try to ensure all changes are merged in by Tuesday.
- A week prior to the scheduled release, maintainers should announce the fact in the #performance channel within the OpenSearch Slack community.
- Ensure that documentation is appropriately updated with respect to incoming changes prior to the release.
-
Clone the official OpenSearch Benchmark git repository and change directory to it. This is where the following commands will be issued.
-
Ensure that version.txt matches the new release version before proceeding. If not, open a PR that updates the version in version.txt and merge it in before proceeding with the following steps. For example, if OSB is currently at version
1.3.0and we want to release the next version as1.4.0, updateversion.txtfrom1.3.0to1.4.0. -
Releases are published from a version branch, not directly from
main. In the above example, we would create the1.4branch and switch to it. For patch releases, such as1.3.1, the1.3branch will already exist and does not need to be created. -
Create a tag for the
1.4.0release.
git tag 1.4.0 1.4
- Push the tag. This triggers the publish-release.yml workflow which requires approval from reviewers configured in the
release-approvalGitHub environment before it proceeds. Once approved, the workflow builds and publishes OSB to PyPI using trusted publishers (OIDC authentication) and creates a GitHub release with auto-generated release notes.
git push origin 1.4.0
-
Check the progress of the release in the GitHub Actions tab of the repository.
- If failed, inspect the workflow logs.
-
Verify PyPI:
- Download the OSB distribution build from PyPI: https://pypi.org/project/opensearch-benchmark/#files. This is a
wheelfile with the extension.whl. - Install it with
pip install. - Run
opensearch-benchmark --versionto ensure that it is the correct version - Run
opensearch-benchmark --help - Run
opensearch-benchmark list workloads - Run a basic workload on Linux and MacOS:
opensearch-benchmark run --workload pmc --test-mode - If you are fastidious, you can check the installed source files at
`python3 -m site --user-site`/osbenchmarkto verify that a recent change is indeed present.
- Download the OSB distribution build from PyPI: https://pypi.org/project/opensearch-benchmark/#files. This is a
-
Verify Docker Hub Staging OSB Image Works:
- The staging images are at https://hub.docker.com/r/opensearchstaging/opensearch-benchmark/tags.
- Pull the latest image:
docker pull opensearchstaging/opensearch-benchmark:<VERSION> - Check the version of OSB:
docker run opensearchstaging/opensearch-benchmark:<VERSION> —version - Run any other commands listed on the Docker Hub overview tab.
-
Copy over the image from Docker Hub Staging to Docker Hub Production and ECR: Once you have verified that PyPI and Docker Hub staging image works, contact Admin team member. Admin team member will help promote the “copy-over” workflow, where Jenkins copies the Docker image from Docker Hub staging account to both Docker Hub prod account and ECR.
- Admin will need to invoke the copy-over four times:
- repository: opensearchstaging, image: opensearch-benchmark: → repository: opensearchproject, image: opensearch-benchmark:
- repository: opensearchstaging, image: opensearch-benchmark: → repository: opensearchproject, image: opensearch-benchmark:latest
- repository: opensearchstaging, image: opensearch-benchmark: → repository: public.ecr.aws/opensearchproject, image: opensearch-benchmark:
- repository: opensearchstaging, image: opensearch-benchmark: → repository: public.ecr.aws/opensearchproject, image: opensearch-benchmark:latest
- Admin will need to invoke the copy-over four times:
-
See if OpenSearch-Benchmark Tags is Published:
- Check that the version appears in GitHub (https://github.com/opensearch-project/opensearch-benchmark/releases) and is marked as the “latest” release. There should be an associated changelog as well. Clicking on the “Tags” tab should indicate the version number is one of the project’s tags and its timestamp should match that of the last commit. If there was an error that prevented the release from being published, but this was fixed manually, click on the edit button (pencil icon) next to the release. This will provide options to generate the release notes, publish the release and label it as the "latest" one.
- Check Docker Hub Production: https://hub.docker.com/r/opensearchproject/opensearch-benchmark. Both “latest” and the published release should appear on the page along with the appropriate publication timestamp.
- Check ECR: https://gallery.ecr.aws/opensearchproject/opensearch-benchmark. The dropdown box at the top should list both “latest” and the published release as entries. The publication time is also indicated.
-
Notify the Community: Create a message that introduces the newly released OpenSearch Benchmark version and includes a brief summary of changes, enhanacements, and bug fixes in the new version. The message may look something like the following:
@here OpenSearch Benchmark (OSB) 1.2.0 has just been released!
What’s changed?
* Read here: https://github.com/opensearch-project/opensearch-benchmark/releases/tag/1.2.0
* Documentation: https://opensearch.org/docs/latest/benchmark
Wow! Where can I get this?
* PyPI: https://pypi.org/project/opensearch-benchmark
* Docker Hub: https://hub.docker.com/r/opensearchproject/opensearch-benchmark/tags
* ECR: https://gallery.ecr.aws/opensearchproject/opensearch-benchmark
Send this message in the following channels in OpenSearch Community Slack:
- Ensure that we backport changes to other version branches as needed. See the guide for more information.
- Unless you released a major version, update main branch’s
version.txtto the next minor version. For instance, if1.1.0was just released, the file in themainbranch should be updated to1.2.0. - Update the
version.txtin the branch for the version that was just released with the current version but patch version incremented. For instance, if 1.1.0 was just released, the file in the1.1branch should be updated to1.1.1. - Previous minor version is now stale
- For patch releases only: Ensure that the
mainbranch will not need to have its version.txt updated since it's already pointing to the nexts major version. However, the branch with the major and minor version should have itsversion.txtfile updated. For example, if1.3.1patch was just released, we'll need to visit the1.3branch and update theversion.txtfile to now point to1.3.2. However, we won't need to updateversion.txtinmainbranch since it's already pointing to the next minor release, i.e.1.4.0.
- Unless you released a major version, update main branch’s
If an error occurs during build process and you need to retrigger the workflow, do the following:
- Delete the tag locally:
git tag -d <VERSION> - Delete the tag on GitHub:
git push --delete origin <VERSION> - Delete the draft release on GitHub
- Create the tag again and push it to re-initiate the release process.
If you published an incorrect tag name, then follow these steps:
- Run
git tag new_tag_name old_tag_nameto move old tag references to new tag alias - Run
git tag -d old_tag_nameto delete old tag locally - Ensure your remote is correct with
git remote -v. Rungit push origin :refs/tags/old_tag_nameto remove old tag references in remote repository - Run
git push origin --tagsto make remote tags look like local tags - Verify that the release draft is pointing to the new tag