Skip to content

ci(server): publish agent-control-server to PyPI#210

Open
abhinav-galileo wants to merge 3 commits intomainfrom
abhi/release-publish-server
Open

ci(server): publish agent-control-server to PyPI#210
abhinav-galileo wants to merge 3 commits intomainfrom
abhi/release-publish-server

Conversation

@abhinav-galileo
Copy link
Copy Markdown
Collaborator

Summary

The release workflow stages `server/dist/` and uploads it to GitHub release assets, but does not currently push the server wheel to PyPI. Models, evaluators, and the SDK are published; the server is not.

This change adds a `publish-server` job between `publish-evaluators` and `publish-sdk`, matching the pattern of the other publish jobs.

Scope

  • User-facing/API changes: `agent-control-server` becomes installable via `pip install agent-control-server` after the next release.
  • Internal changes: dependency chain in the workflow updated to evaluators -> server -> sdk (server depends on evaluators at runtime, so evaluators publishes first).
  • Out of scope: anything outside the release workflow.

Risk and Rollout

  • Risk level: low. New workflow job; failure to publish server doesn't affect previously published packages because `pypa/gh-action-pypi-publish` is per-job atomic.
  • Rollback plan: revert the workflow file.

Testing

  • Validated YAML structure locally.
  • Verified by the next `workflow_dispatch` release run.

Adds a publish-server job to the release workflow so the server wheel
(staged at release-dists/server/dist/) is pushed to PyPI alongside
models, evaluators, and the SDK. Slots between publish-evaluators and
publish-sdk to preserve dependency-correct ordering (server depends on
evaluators at runtime).
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@abhinav-galileo abhinav-galileo changed the title ci(release): publish agent-control-server to PyPI ci(server): publish agent-control-server to PyPI May 4, 2026
@abhinav-galileo abhinav-galileo marked this pull request as ready for review May 4, 2026 12:33
Comment thread .github/workflows/release.yaml Outdated
permissions:
id-token: write

steps:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

135-145:
This downloads the single release-dists artifact into the workspace root, then publishes from release-dists/server/dist/. Because the artifact was uploaded from release-dists/, its contents are rooted under server/dist after a direct download to ., so the publish step will likely look in a non-existent directory. Download to path: release-dists or change packages-dir to server/dist/.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 62d6b4e. I changed the download step to use path: release-dists for all publish/release-asset jobs, so the artifact is extracted under release-dists/ and packages-dir: release-dists/server/dist/ resolves consistently.

I kept the existing release-dists/<package>/dist/ publish paths rather than switching only the server job to server/dist/, so all publish jobs use the same layout.

always() &&
needs.release.outputs.released == 'true' &&
needs.publish-evaluators.result == 'success'
permissions:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PyPA’s trusted publishing flow requires id-token: write and no explicit username/password, so the current mix grants extra permission while still depending on PYPI_API_TOKEN.

Copy link
Copy Markdown
Collaborator Author

@abhinav-galileo abhinav-galileo May 6, 2026

Choose a reason for hiding this comment

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

Good point. This workflow is using PyPI token auth today, so id-token: write is unused unless we move to trusted publishing.

I left it unchanged here because the existing publish-models, publish-evaluators, and publish-sdk jobs already use the same pattern: id-token: write plus user: __token__ / PYPI_API_TOKEN. For this PR I want the new server publish job to mirror the existing release jobs rather than make one publish job differ from the rest.

I think the right follow-up is to clean this up consistently across all PyPI publish jobs: either remove id-token: write everywhere while staying on token auth, or migrate all packages to PyPI trusted publishing and remove the explicit username/password.

@lan17
Copy link
Copy Markdown
Contributor

lan17 commented May 6, 2026

Why do we need to publish this to pypi?

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