ci: port package release workflows from contrib#20
Open
MikeGoldsmith wants to merge 10 commits into
Open
Conversation
Documents the per-package independent release model used by this repo, the manual end-to-end release steps with the existing build scripts, and the towncrier-based changelog flow. Calls out missing pieces explicitly: PyPI names are still TBD per package, and contrib's automated release workflows haven't been ported yet. Both tracked in the bootstrap issue. Assisted-by: Claude Opus 4.7 (1M context)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds release-process documentation for the repository’s independent per-package release model, including manual release steps while automated release workflows are still pending.
Changes:
- Adds
RELEASING.mdwith publishable package list and release flow. - Documents changelog, version bump, tagging/building, PyPI upload, GitHub release, and next-dev-version steps.
- Captures missing release infrastructure tracked by #15.
Comments suppressed due to low confidence (3)
RELEASING.md:98
- The release-notes extraction command does not extract the release body. In awk range patterns, the end pattern
^##also matches the starting## Version <version>line, so the range ends on the same line andsed '$d'removes the only line. Maintainers following this command would create a GitHub release with empty notes.
--notes-file <(awk '/^## Version <version>/,/^## /{print}' <package>/CHANGELOG.md | sed '$d')
RELEASING.md:76
- This uses
<pypi-name>asPACKAGE_NAME, butscripts/build_a_package.shusesPACKAGE_NAMEto locate**/$pkg_name/pyproject.toml. The document also says the PyPI names will differ from the current package directories, so the documented command will fail unless the directory/project name matches the PyPI name or the build script is updated.
PACKAGE_NAME=<pypi-name> VERSION=<version> ./scripts/build_a_package.sh
RELEASING.md:120
- The stated unstable version pattern does not match several current package versions (for example, anthropic/langchain/weaviate use
2.0b0.dev, google-genai uses2.5b0.dev, and openai-agents-v2 uses0.2.0.dev). Following this section as written could cause maintainers to bump releases to the wrong version scheme.
- **Unstable components** (everything currently in this repo): versions look
like `0.Yb0.dev` on `main`, `0.Yb0` at release time, then bump to
`0.{Y+1}b0.dev`.
Addresses Copilot review feedback: the changelog steps depend on open-telemetry#16 (towncrier setup) which hasn't merged yet. Make the dependency explicit at the top of the doc so it's obvious to any reviewer. Assisted-by: Claude Opus 4.7 (1M context)
The note belongs in the PR description as a merge-ordering signal, not in the doc itself where it would have to be removed once open-telemetry#16 lands. Assisted-by: Claude Opus 4.7 (1M context)
lmolkova
reviewed
May 18, 2026
Replaces the manual-release documentation that was originally on this branch with the contrib release workflows for independently released packages. Every publishable package in this repo is independent, so only the per-package workflows apply (no coordinated bulk-release flow). Workflows ported: - [Package] Prepare release: cuts the release branch package-release/<pkg>/v<X>.<Y>.x; opens PRs to bump version and build the changelog via towncrier on both the release branch and main. - [Package] Prepare patch release: opens a patch-bump PR against an existing package release branch. - [Package] Release: publishes the built wheel to PyPI, creates the GitHub release, opens a back-merge PR copying the changelog to main. Supporting scripts ported: - scripts/generate_release_notes.sh - scripts/merge_changelog_to_main.sh - .github/scripts/use-cla-approved-github-bot.sh Adaptations from contrib: - Workflow package dropdowns list the 8 publishable packages in this repo. - backport.yml not ported; no release branches exist yet, will revisit when one does. - PyPI publishing uses a token (secrets.pypi_password), matching contrib. Tracked in open-telemetry#15 to migrate to PyPI trusted publishing once package names are decided and per-package publishers can be set up. RELEASING.md rewritten as a thin doc pointing at the workflows, listing the otelbot / PyPI / branch protection prerequisites, and documenting the pre-existing static "## Unreleased" entries that need manual folding on the first towncrier release per package. Assisted-by: Claude Opus 4.7 (1M context)
Discussions are not enabled on the opentelemetry-python-genai repo, and there is no `announcements` category, so the flag would cause `gh release create` to fail. Drop it for now; can be re-added in a follow-up if/when Discussions is enabled and an announcements category is created. Picked up from JWinermaSplunk's review on PR open-telemetry#20. Assisted-by: Claude Opus 4.7 (1M context)
Member
Author
|
I think this is ready for another review please @lmolkova @JWinermaSplunk 👍🏻 |
JWinermaSplunk
approved these changes
Jun 3, 2026
JWinermaSplunk
left a comment
There was a problem hiding this comment.
Apologies if I am wrong, but I rechecked
scripts/build_a_package.shand it callsuv runanduv buildnotpython3 -m build. Is this expected?
Unsure about this, but looks good otherwise!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Repurposes the original RELEASING.md PR per @lmolkova's feedback ("can we just port them? I don't think we should ever release manually"). Ports the per-package release workflows from
opentelemetry-python-contribinstead of documenting a manual flow. Now that #16 (towncrier) has landed, the workflows' changelog steps work as-is.Every publishable package in this repo is independent (per
eachdist.ini[exclude_release]), so only the per-package contrib workflows apply.What's in this PR
Workflows under
.github/workflows/:package-prepare-release.yml— cutspackage-release/<pkg>/v<X>.<Y>.x, opens two PRs (release branch + main).package-prepare-patch-release.yml— opens a patch-bump PR against an existing release branch.package-release.yml— builds the wheel, publishes to PyPI, creates the GitHub release, back-merges the changelog to main.Scripts under
scripts/and.github/scripts/:generate_release_notes.shmerge_changelog_to_main.sh.github/scripts/use-cla-approved-github-bot.shRELEASING.mdrewritten as a thin doc pointing at the workflows, with sections for: prerequisites, minor/major flow, patch flow, the static## Unreleasedfolding caveat, and troubleshooting.Adaptations from contrib
backport.ymlnot ported — no release branches exist yet; will revisit when one does. Tracked in Bootstrap opentelemetry-python-genai repo #15.secrets.pypi_password), matching contrib. Tracked in Bootstrap opentelemetry-python-genai repo #15 to migrate to PyPI trusted publishing once package names are decided.Prerequisites (not blocking this PR, but blocking actual use)
OTELBOT_APP_IDvariable +OTELBOT_PRIVATE_KEYsecret — configured by maintainers.pypi_passwordsecret — needs a PyPI token once PyPI package names are decided.package-release/*/v*branches.All called out in
RELEASING.md.Verification
opentelemetry-python-contrib, contrib'srelease/v*-0.*bx, contrib package names) across the new files — clean.eachdist.py find-package --package <name>andeachdist.py version --package <name>both work for all 8 packages.X.YbN.devandX.Y.Z.dev).Workflow execution can't be exercised end-to-end until otelbot + PyPI auth are configured. That's a maintainer setup task, out of scope here.
Notes
Skip Changeloglabel applied (CI/tooling change).CI failures unrelated to this PR
misc / typecheckand severalinstrumentation-{anthropic,openai-v2}-latestjobs are red on this PR, but the failures are pre-existing onmain:typecheck: pyright flags existing# pyright: ignoreandcast()calls inutil/opentelemetry-util-genai/src/opentelemetry/util/genai/completion_hook.pyas unnecessary. Same root cause as the contrib issue fixed in opentelemetry-util-genai: fix typecheck after importlib metadata shim changes opentelemetry-python-contrib#4585; the genai equivalent hasn't been done. Worth opening a separate fix PR.instrumentation-*-latest tests:ModuleNotFoundError: No module named 'opentelemetry.exporter'duringtest_conformance.pycollection. Likely a missing test dep introduced after the last green main run.This PR only touches
.github/workflows/package-*.yml,.github/scripts/use-cla-approved-github-bot.sh,scripts/{generate_release_notes,merge_changelog_to_main}.sh, andRELEASING.md— none of which can affect those CI jobs.