Skip to content

ci(release): migrate google-benchmark PyPI publishing to OSS Exit Gate - #2388

Merged
dmah42 merged 2 commits into
google:mainfrom
alonsopf89:oss-exit-gate-pypi-migration
Nov 20, 2026
Merged

dmah42 merged 2 commits into
google:mainfrom
alonsopf89:oss-exit-gate-pypi-migration

Conversation

@alonsopf89

Copy link
Copy Markdown
Contributor

Summary

Migrates .github/workflows/wheels.yml PyPI publishing (google-benchmark) to Google OSS Exit Gate (benchmark/pypi) via keyless Workload Identity Federation (OIDC):

  • Authenticates via SHA-pinned google-github-actions/auth and google-github-actions/setup-gcloud (no static PyPI secrets).
  • Performs safe, version-scoped cleanup of any failed staging attempt for the exact version being built (gcloud artifacts versions delete).
  • Stages built distributions to https://us-python.pkg.dev/oss-exit-gate-prod/benchmark--pypi/ via twine and uploads the release manifest to gs://oss-exit-gate-prod-projects-bucket/benchmark/pypi/manifests/.

One-time PyPI Trusted Publisher setup (before next release)

Add benchmark-py@oss-exit-gate-prod.iam.gserviceaccount.com as a Google Cloud Trusted Publisher on PyPI (https://pypi.org/manage/project/google-benchmark/settings/publishing/).

Verification

  • Internal Exit Gate onboarding config (http://cl/1024943651) is submitted in #head and staging resources are provisioned.
  • End-to-end Step 8 smoke test (publish_all: false) passed against benchmark--pypi and staged test artifacts were cleaned up.

Internal Reference (for Google maintainers):

  • Documentation & Migration Guide: http://go/oss-exit-gate (internal to google3; there is no public repo under github.com/google)
  • Buganizer Tracking Issue: http://b/576673325 (Parent Epic: http://b/576673325)
  • Internal Onboarding CL: http://cl/1024943651

@LebedevRI

Copy link
Copy Markdown
Collaborator

I would expect such a change to be coming from someone whose github account is clearly associated
with either python or google org. How do we know this isn't a phishing change?

@alonsopf89

Copy link
Copy Markdown
Contributor Author

Hi @LebedevRI — completely fair question, thanks for being cautious!

I'm working with Google's Open Source Security / OSS Exit Gate team (fernandoalonso@google.com, verified by cla/google: SUCCESS on this PR) and coordinated internally with @dmah42 before opening this PR.

Any Google maintainer on google/benchmark can verify the onboarding internally via:

  • Internal docs: http://go/oss-exit-gate (currently google3-only)
  • Internal onboarding CL: http://cl/1024943651
  • Internal tracking bug: http://b/576673325

Also note that us-python.pkg.dev/oss-exit-gate-prod/benchmark--pypi/ is Google-owned Artifact Registry staging infrastructure, and PyPI will not accept releases from Exit Gate unless the google-benchmark PyPI maintainers explicitly authorize benchmark-py@oss-exit-gate-prod.iam.gserviceaccount.com as a Trusted Publisher.

@dmah42

dmah42 commented Nov 20, 2026

Copy link
Copy Markdown
Member

i can confirm this is legit

@dmah42
dmah42 merged commit 3a62735 into google:main Nov 20, 2026
108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants