Skip to content

fix(ci): pause agent PyPI publishing until Agent Hub is ready (+ OIDC test fix) - #1576

Merged
kovtcharov-amd merged 2 commits into
mainfrom
tmi/fix-pypi-publish-test-oidc
Jun 10, 2026
Merged

kovtcharov-amd merged 2 commits into
mainfrom
tmi/fix-pypi-publish-test-oidc

Conversation

@itomek

@itomek itomek commented Jun 10, 2026 •

Copy link
Copy Markdown
Collaborator

Why this matters

The agent-wheel publish path (#1179) is armed but not ready: a v* release tag would fire the publish job — behind a manual gate, against gaia-agent-* PyPI projects that don't exist yet — before the Agent Hub distribution design is settled. This pauses publishing until we're ready, while keeping the per-PR wheel build + twine check so agent wheels stay well-formed.

It also unblocks CI repo-wide: the OIDC migration (#1570) left test_agent_pypi_publish asserting a stored token the workflow no longer uses, turning main's Unit Tests red for every PR touching src/ or tests/. This PR fixes that assertion (OIDC) and disables the premature publish path.

How publishing is disabled (both clearly commented for one-line re-enable):

  • the push: tags: ['v*'] trigger is removed, so a release tag no longer fires the workflow;
  • the approve-publish and publish jobs are hard-gated with if: false && ….

Re-enable = restore the tag trigger + drop the two false && guards.

Test plan

  • python -c "import yaml; yaml.safe_load(open('.github/workflows/publish_agents.yml'))" parses
  • pytest tests/unit/test_agent_pypi_publish.py → 10 passed (OIDC assertions hold against the disabled workflow; no skips)
  • Unit Tests green on this PR
  • Confirm the workflow shows no publish/approve-publish jobs running on a dispatched run

#1570 migrated publish_agents.yml to OIDC trusted publishing and removed the
PYPI_API_TOKEN secret, but test_publish_workflow_exists_and_uses_pypi_action
still asserted "secrets.PYPI_API_TOKEN" in the workflow — so the test fails on
main and on every open PR current with it. Assert "id-token: write" (the OIDC
marker) instead, matching how the workflow actually authenticates now.
@github-actions github-actions Bot added the tests Test changes label Jun 10, 2026
@kovtcharov-amd
kovtcharov-amd marked this pull request as ready for review June 10, 2026 20:04
@kovtcharov-amd
kovtcharov-amd self-requested a review as a code owner June 10, 2026 20:04
@github-actions

Copy link
Copy Markdown
Contributor

Approve. This is a correct, minimal CI fix — it realigns a unit test with the OIDC trusted-publishing migration from #1570, restoring green on main. Verified against the actual workflow: the swapped assertions match .github/workflows/publish_agents.yml exactly.

Summary

main was red because test_publish_workflow_exists_and_uses_pypi_action still asserted "secrets.PYPI_API_TOKEN" in the workflow, but #1570 removed that secret and switched to OIDC. This PR drops the stale token assertion and replaces it with id-token: write — the marker the workflow now actually carries. The single most important thing: the change faithfully tracks the source it's testing, so the test now fails for the right reasons and passes for the right ones.

I confirmed each assertion against publish_agents.yml:

  • id-token: write present (line 156)
  • pypa/gh-action-pypi-publish present (line 168)
  • skip-existing: true present (line 172)
  • PYPI_API_TOKEN no longer appears anywhere in the workflow

Issues Found

None.

Strengths

  • Test now asserts the real auth mechanism, not a removed secret. Swapping secrets.PYPI_API_TOKEN → id-token: write ties the test to OIDC trusted publishing — the thing that actually gates a successful publish.
  • The WHY comment earns its place (test_agent_pypi_publish.py:90-91): it names the mechanism and cites fix(ci): publish agent wheels via OIDC trusted publishing (#1568) #1570 in one line, matching the repo's "short WHY, link the issue" comment convention.
  • Scope-clean and well-documented. 4/−2 lines, one logical change, with a test plan showing 10 passed and a clean black/isort check.

Verdict

Approve — no blocking issues, ready to merge.

…finalized

The agent-wheel publish path (#1179) is armed: a v* release tag would fire the
publish job (behind a manual gate, against PyPI projects that don't exist yet)
before the Agent Hub distribution design is settled. Disable it rather than ship
a half-finished release path: remove the v* tag trigger and hard-skip the
approve/publish jobs (both commented for one-line re-enable). PR build +
twine-check still run so agent wheels stay well-formed.

The OIDC test fix in this PR stands as-is — the asserted workflow strings
(id-token: write, tag gate, skip-existing, matrix) are all still present.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Jun 10, 2026
@kovtcharov-amd kovtcharov-amd changed the title fix(ci): update publish-agents test to OIDC trusted publishing fix(ci): pause agent PyPI publishing until Agent Hub is ready (+ OIDC test fix) Jun 10, 2026
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit 65a1035 Jun 10, 2026
44 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the tmi/fix-pypi-publish-test-oidc branch June 10, 2026 20:54
itomek added a commit that referenced this pull request Jun 10, 2026
Catch up with main (eval cost/TTFT harness #1546, OIDC publish-test fix #1576,
PyPI publish idempotency #1563). No conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants