Rename distro to dash0-opentelemetry and publish each package to PyPI from its own environment - #44
Closed
ocelotl wants to merge 2 commits into
Closed
Rename distro to dash0-opentelemetry and publish each package to PyPI from its own environment#44ocelotl wants to merge 2 commits into
ocelotl wants to merge 2 commits into
Conversation
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.
What this does
A single, self-contained change that:
dash0-opentelemetry-distro→dash0-opentelemetry(for parity with Rubydash0-opentelemetryand JS@dash0/opentelemetry; see Rename main package todash0-opentelemetry#41). This is Michele's rename commit from chore: rename distro to dash0-opentelemetry and add PyPI trusted publishing #42, carried here unchanged.release.yml: on a tagged release, every package built that run is uploaded to public PyPI via Trusted Publishing (OIDC), each from its own GitHub environment.It supersedes #42 (same rename) + #43 (the publishing mechanism), combined so the rename and the correct publishing land together.
Why one environment per package (load-bearing)
A PyPI pending trusted publisher is unique on
(owner, repo, workflow, environment)— only one may exist per tuple, and a second for a different project name is rejected. So a single sharedpypienvironment could authorize only one of our names. Giving each package its own environment (named after its PyPI project name) makes each tuple distinct, which is what lets this one workflow publish all five. Refs: warehouse #16920, PyPI trusted-publisher docs.How the publishing works
buildjob now outputspackages: the JSON array of PyPI project names actually built this run (from the existing workspace-derivedto_build— already-indexed filenames are skipped, so nothing is re-published).publish-pypijob fans out withstrategy.matrix.packageover that array. Each leg:environment: <package name>(so the OIDC token carries that environment claim),dash0_opentelemetry-*vsdash0_opentelemetry_pyproto-*is unambiguous after filename normalization),pypa/gh-action-pypi-publish, SHA-pinned todc37677(v1.14.2) — resolving the unpinned-action TODO, consistent with this repo's "third-party actions are SHA-pinned" posture.buildsucceeded, and skipped entirely when nothing was built (packages == '[]').[project].name— no hardcoded list to drift.Prerequisites before this can run (not in this PR)
On PyPI — one pending (later active) trusted publisher per package, each bound to repo
dash0hq/opentelemetry-python-distribution, workflowrelease.yml, and environment = the package's project name:dash0-opentelemetrydash0-opentelemetry-pyprotodash0-opentelemetry-exporter-otlp-pyproto-commondash0-opentelemetry-exporter-otlp-pyproto-httpdash0-opentelemetry-exporter-otlp-pyproto-grpc(Delete the current single
dash0-opentelemetry/pypipending publisher and recreate the five above with these distinct environments.)On GitHub — those five environments must exist (Settings → Environments) with whatever reviewer/branch protections are desired. Reviewer gates apply per environment, so a release pauses for approval once per package.
Notes