From 3038d07369abbbe0838c5610d5c280235f2ac5bc Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 19 Nov 2026 10:22:20 -0600 Subject: [PATCH 1/2] ci(publish): poll for the new version in the verify smoke test PyPI's simple index lags the upload, so the v0.14.0 verify job failed 5s after a successful publish. pip --retries only covers network errors. --- .github/workflows/publish_python.yml | 15 ++++++++++++++- docs/release_playbook.md | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_python.yml b/.github/workflows/publish_python.yml index 842b7c51f..5ab3f435e 100644 --- a/.github/workflows/publish_python.yml +++ b/.github/workflows/publish_python.yml @@ -118,5 +118,18 @@ jobs: TAG: ${{ github.ref_name }} run: | VERSION="${TAG#v}" - pip install --retries 10 "genkit==${VERSION}" + # PyPI's simple index lags the upload by up to a few minutes, and + # pip's --retries only covers network errors, not "no matching + # distribution". Poll until the new version resolves. + for attempt in $(seq 1 20); do + if pip install --no-cache-dir "genkit==${VERSION}"; then + break + fi + if [ "$attempt" -eq 20 ]; then + echo "genkit==${VERSION} still not installable after 10 minutes" >&2 + exit 1 + fi + echo "genkit==${VERSION} not on the index yet, retrying in 30s ($attempt/20)" + sleep 30 + done python -c "from genkit import Genkit; Genkit(); print('ok')" diff --git a/docs/release_playbook.md b/docs/release_playbook.md index 93e27caf4..41f857205 100644 --- a/docs/release_playbook.md +++ b/docs/release_playbook.md @@ -72,7 +72,7 @@ Resolvers skip yanked versions unless pinned with `==`, so existing exact pins k **Two jobs:** publish → verify - **publish**: Builds all packages with `uv build`, then uploads to PyPI via `pypa/gh-action-pypi-publish`. All-or-nothing — if any build fails, the job fails. -- **verify**: `pip install genkit==` + import test. +- **verify**: `pip install genkit==` + import test. It polls for up to 10 minutes, since PyPI's index can lag the upload. ## Auth From 43add1637e33ba7834923503f1ba2d62ed949faa Mon Sep 17 00:00:00 2001 From: Jeff Huang Date: Thu, 19 Nov 2026 10:25:37 -0600 Subject: [PATCH 2/2] docs(release): drop the publish approval step pypi_github_publishing has no required reviewers, so the tag push uploads to PyPI immediately. Say so in the playbook and create_release output. --- bin/create_release | 4 ++-- docs/release_playbook.md | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/create_release b/bin/create_release index fbfd3fc96..6e155912c 100755 --- a/bin/create_release +++ b/bin/create_release @@ -181,5 +181,5 @@ fi echo " ✓ Published https://github.com/$REPO/releases/tag/$TAG" echo "" -echo "Next: approve the PyPI publish at https://github.com/$REPO/actions/workflows/publish_python.yml" -echo "Then verify with: pip index versions genkit" +echo "The tag push started the PyPI publish: https://github.com/$REPO/actions/workflows/publish_python.yml" +echo "Verify with: pip index versions genkit" diff --git a/docs/release_playbook.md b/docs/release_playbook.md index 41f857205..12f36356a 100644 --- a/docs/release_playbook.md +++ b/docs/release_playbook.md @@ -28,9 +28,8 @@ There is one path. `create_release` refuses to run unless every step below was f 1. `bin/bump_version X.Y.Z` on a branch from main. It bumps every `pyproject.toml` and `uv.lock`. 2. Open a PR to main titled `chore: release vX.Y.Z` or `chore(py): release Python SDK vX.Y.Z`. Its description is the release notes, published word for word. 3. Get it approved and merged. -4. `bin/create_release X.Y.Z --dry-run`, then without `--dry-run`. -5. Approve the publish at . The tag push already started it; don't run it by hand. -6. `pip index versions genkit` shows X.Y.Z. +4. `bin/create_release X.Y.Z --dry-run`, then without `--dry-run`. The tag push starts the [publish workflow](https://github.com/genkit-ai/genkit-python/actions/workflows/publish_python.yml), which uploads to PyPI with no approval step. Don't run it by hand. +5. `pip index versions genkit` shows X.Y.Z. `create_release` runs every check before it changes anything and prints a fix for each failure: