Skip to content

ci: port package release workflows from contrib#20

Open
MikeGoldsmith wants to merge 10 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/releasing-docs
Open

ci: port package release workflows from contrib#20
MikeGoldsmith wants to merge 10 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/releasing-docs

Conversation

@MikeGoldsmith
Copy link
Copy Markdown
Member

@MikeGoldsmith MikeGoldsmith commented May 15, 2026

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-contrib instead 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 — cuts package-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.sh
  • merge_changelog_to_main.sh
  • .github/scripts/use-cla-approved-github-bot.sh

RELEASING.md rewritten as a thin doc pointing at the workflows, with sections for: prerequisites, minor/major flow, patch flow, the static ## Unreleased folding caveat, and troubleshooting.

Adaptations from contrib

Prerequisites (not blocking this PR, but blocking actual use)

  • OTELBOT_APP_ID variable + OTELBOT_PRIVATE_KEY secret — configured by maintainers.
  • pypi_password secret — needs a PyPI token once PyPI package names are decided.
  • Branch protection on package-release/*/v* branches.

All called out in RELEASING.md.

Verification

  • Grepped for contrib-specific strings (opentelemetry-python-contrib, contrib's release/v*-0.*bx, contrib package names) across the new files — clean.
  • Confirmed eachdist.py find-package --package <name> and eachdist.py version --package <name> both work for all 8 packages.
  • Confirmed every package's current version matches the regex patterns used in the workflows (mix of X.YbN.dev and X.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 Changelog label applied (CI/tooling change).
  • @lmolkova — pinging since this is the response to your earlier review feedback.

CI failures unrelated to this PR

misc / typecheck and several instrumentation-{anthropic,openai-v2}-latest jobs are red on this PR, but the failures are pre-existing on main:

  • typecheck: pyright flags existing # pyright: ignore and cast() calls in util/opentelemetry-util-genai/src/opentelemetry/util/genai/completion_hook.py as 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' during test_conformance.py collection. 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, and RELEASING.md — none of which can affect those CI jobs.

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)
Copilot AI review requested due to automatic review settings May 15, 2026 12:32
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner May 15, 2026 12:32
@MikeGoldsmith MikeGoldsmith added the Skip Changelog PR does not require a changelog entry label May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md with 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 and sed '$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> as PACKAGE_NAME, but scripts/build_a_package.sh uses PACKAGE_NAME to 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 uses 2.5b0.dev, and openai-agents-v2 uses 0.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`.

Comment thread RELEASING.md Outdated
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)
@MikeGoldsmith MikeGoldsmith marked this pull request as draft May 15, 2026 12:45
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)
Comment thread RELEASING.md Outdated
@MikeGoldsmith MikeGoldsmith marked this pull request as ready for review May 19, 2026 08:40
@MikeGoldsmith MikeGoldsmith moved this to Ready for review in Python PR digest May 19, 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)
@MikeGoldsmith MikeGoldsmith changed the title docs: add RELEASING.md ci: port package release workflows from contrib May 19, 2026
Comment thread .github/workflows/package-release.yml
Comment thread .github/workflows/package-release.yml Outdated
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)
@MikeGoldsmith
Copy link
Copy Markdown
Member Author

I think this is ready for another review please @lmolkova @JWinermaSplunk 👍🏻

Copy link
Copy Markdown

@JWinermaSplunk JWinermaSplunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies if I am wrong, but I rechecked scripts/build_a_package.sh and it calls uv run and uv build not python3 -m build. Is this expected?

Unsure about this, but looks good otherwise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

4 participants