This project uses the multimod
releaser
tool
to manage releases. This document will walk you through how to perform a
release using this tool for this repository.
Before releasing, it is important to verify that the changes in the upstream go.opentelemetry.io/otel packages are compatible with the contrib repository.
Follow the following steps to verify the changes.
-
Pick the GIT SHA on the main branch that you want to verify.
-
Run the following command to update the OTel dependencies with the GIT SHA picked in step 1.
export GITSHA=<the GIT SHA you want to verify> make update-all-otel-deps make go-mod-tidy
-
Verify the changes.
git diff
This should have changed the version for all OTel modules to be the GIT SHA picked in step 1.
-
Run the lint and tests to verify that the changes are compatible with the contrib repository.
make precommit
This command should be passed without any errors.
First, decide which module sets will have their versions changed and what those versions will be. If you are making a release to upgrade the upstream go.opentelemetry.io/otel packages, all module sets will likely need to be released.
You can run make gorelease
that runs gorelease
to ensure that there are no unwanted changes done in the public API.
You can check/report problems with gorelease
here.
Update the versions of the module sets you have identified in versions.yaml
.
Commit this change to a new release branch.
If the upstream go.opentelemetry.io/otel project has made a release, this project needs to be upgraded to use that release.
make sync-core COREPATH=<path to go.opentelemetry.io/otel repository>
This will use multimod
to upgrade all go.opentelemetry.io/otel packages to
the latest tag found in the local copy of the project. Be sure to have this
project up to date.
Commit these changes to your release branch.
Set the version for all the module sets you have identified to be released.
make prerelease MODSET=<module set>
This will use multimod
to upgrade the module's versions and create a new
"prerelease" branch for the changes. Verify the changes that were made.
git diff HEAD..prerelease_<module set>_<version>
Fix any issues if they exist in that prerelease branch, and when ready, merge it into your release branch.
git merge prerelease_<module set>_<version>
Update the Changelog. Make sure only changes relevant to this release are included and the changes are communicated in language that non-contributors to the project can understand.
Double check there is no change missing by looking directly at the commits since the last release tag.
git --no-pager log --pretty=oneline "<last tag>..HEAD"
Make sure the new released section is under the comment for released section,
like <!-- Released section -->
, so it is protected from being overwritten in the future.
Be sure to update all the appropriate links at the bottom of the file.
Finally, commit this change to your release branch.
Push your release branch and create a pull request for the changes. Be sure to include the curated changes your included in the changelog in the description. Especially include the change PR references, as this will help show viewers of the repository looking at these PRs that they are included in the release.
Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit.
IMPORTANT: It is critical you use the same tag that you used in the
Pre-Release step! Failure to do so will leave things in a broken state. As long
as you do not change versions.yaml
between pre-release and this step, things
should be fine.
-
For each module set that will be released, run the
add-tags
make target using the<commit-hash>
of the commit on the main branch for the merged Pull Request.make add-tags MODSET=<module set> COMMIT=<commit hash>
It should only be necessary to provide an explicit
COMMIT
value if the currentHEAD
of your working directory is not the correct commit. -
Push tags to the upstream remote (not your fork:
github.com/open-telemetry/opentelemetry-go-contrib.git
). Make sure you push all sub-modules as well.export VERSION="<version>" for t in $( git tag -l | grep "$VERSION" ); do git push upstream "$t"; done
Finally create a Release on GitHub. If you are release multiple versions for
different module sets, be sure to use the stable release tag but be sure to
include each version in the release title (i.e. Release v1.0.0/v0.25.0
). The
release body should include all the curated changes from the Changelog for this
release.