Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/release/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"traceai": "the PyPI name traceai belongs to another publisher; the package has no registry name yet",
"futureagi-hermes-plugin": "Hermes plugin dependency manifest, explicitly not a buildable distribution"
},
"_pypi_bootstrap_comment": "PyPI allows only three pending trusted publishers per organization, so these first-time projects are created by their first upload with the PYPI_BOOTSTRAP_TOKEN secret instead. Only a package in this list that has never been published uses the token. After the first release: add each project to the futureagi organization, add its trusted publisher (release.yml, blank environment), delete the token on PyPI and the secret, and empty this list.",
"_pypi_bootstrap_comment": "PyPI allows only three pending trusted publishers per organization, so these projects are created by their first upload with the PYPI_BOOTSTRAP_TOKEN secret instead, and keep uploading with it: an upload that switches to trusted publishing before the project has a trusted publisher is rejected (403). To move a project to trusted publishing: add it to the futureagi organization, add its trusted publisher (release.yml, blank environment), then remove it from this list. Once the list is empty, delete the token on PyPI and the secret.",
"pypi_bootstrap_token": [
"traceAI-ag2",
"traceAI-agentscope",
Expand Down
2 changes: 1 addition & 1 deletion .github/release/release_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def plan(packages: list[dict], config: dict, *, offline: bool = False, only: set
continue
p = {**p, "first_release": have is None, "registry_published": published}
if p["ecosystem"] == "python":
p["pypi_bootstrap"] = have is None and p["name"] in set(config.get("pypi_bootstrap_token", []))
p["pypi_bootstrap"] = p["name"] in set(config.get("pypi_bootstrap_token", []))
out[p["ecosystem"]].append({k: v for k, v in p.items() if k not in ("declared", "ecosystem")})
for eco in ECOSYSTEMS:
out[eco].sort(key=lambda e: (not e["core"], e["name"].lower()))
Expand Down
8 changes: 5 additions & 3 deletions .github/release/test_release_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ def test_plan_skips_published_versions(self):
self.assertEqual([(e["name"], e["first_release"]) for e in p["typescript"]], [("@traceai/openai", True)])
self.assertEqual(p["skipped"], [{"name": "traceAI-openai", "reason": "0.1.10 is already published"}])

def test_bootstrap_token_only_for_listed_projects_never_published(self):
def test_bootstrap_token_for_listed_projects_including_after_their_first_release(self):
# A project the token created has no trusted publisher until someone adds one, so its
# next upload must still use the token; only removing it from the list switches it over.
have = {"traceai-agno": None, "traceAI-openai": None, "fi-instrumentation-otel": {"1.0.0"}}
cfg = {"skip": {}, "pypi_bootstrap_token": ["traceai-agno", "fi-instrumentation-otel"]}
with patch.object(release_plan, 'published_versions', side_effect=lambda p: have.get(p["name"], set())):
with patch.object(release_plan, 'published_versions', side_effect=lambda p, **kw: have.get(p["name"], set())):
p = release_plan.plan(self.packages, cfg, only={"traceai-agno", "traceAI-openai", "fi-instrumentation-otel"})
self.assertEqual({e["name"]: e["pypi_bootstrap"] for e in p["python"]},
{"fi-instrumentation-otel": False, "traceai-agno": True, "traceAI-openai": False})
{"fi-instrumentation-otel": True, "traceai-agno": True, "traceAI-openai": False})

def test_check_mode_exit_codes(self):
self.assertEqual(release_plan.main(["--check", "--root", str(self.repo.root)]), 0)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:
jobs:
reactor:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
with:
packages-dir: ${{ runner.temp }}/dist
# First-time projects listed in config.json pypi_bootstrap_token upload with the bootstrap token; everything else uses trusted publishing.
# Projects listed in config.json pypi_bootstrap_token upload with the bootstrap token until they have a trusted publisher; everything else uses trusted publishing.
password: ${{ matrix.pypi_bootstrap && secrets.PYPI_BOOTSTRAP_TOKEN || secrets.PYPI_API_TOKEN }}
print-hash: true
- name: Verify public registry availability
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
with:
packages-dir: ${{ runner.temp }}/dist
# First-time projects listed in config.json pypi_bootstrap_token upload with the bootstrap token; everything else uses trusted publishing.
# Projects listed in config.json pypi_bootstrap_token upload with the bootstrap token until they have a trusted publisher; everything else uses trusted publishing.
password: ${{ matrix.pypi_bootstrap && secrets.PYPI_BOOTSTRAP_TOKEN || secrets.PYPI_API_TOKEN }}
print-hash: true
- name: Verify public registry availability
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This is a checklist, not something the workflow changes for you. Never paste sec
- [ ] For **each first-time project**, add an organization **pending** publisher (futureagi organization → Publishing) with the same owner, repository and workflow, and environment **`pypi-<project name>`** exactly as the release plan spells the name (for example `pypi-traceAI-ag2`). PyPI accepts only one pending publisher per (repository, workflow, environment), so each new project needs its own environment; the `Publish python` job runs in `pypi-${{ matrix.name }}`.
- [ ] Set repository **variable** **`PYPI_TRUSTED_PUBLISHING=true`** after all intended project entries exist. No PyPI secret is needed for this mode.
- [ ] Important correction to #300: the trusted publisher filename is **`release.yml`, not `release-python.yml`**. The pinned PyPI action explicitly does not support Trusted Publishing inside reusable workflows. `release-python.yml` now only builds/checks/uploads artifacts with read-only repository access. OIDC upload jobs live in the top-level `release.yml`.
- [x] **First-release bootstrap (set up 2026-10-29).** PyPI allows only three pending trusted publishers per organization. `traceAI-a2a`, `traceAI-ag2-classic` and `traceAI-agent-framework` have org pending publishers. The other 16 first-time projects are listed in `.github/release/config.json` `pypi_bootstrap_token` and their first upload uses the **`PYPI_BOOTSTRAP_TOKEN`** secret (an account-scoped token, because only those can create projects). Nothing else uses it. **After the first release that creates them:** add each of the 16 projects to the futureagi organization, add its trusted publisher (owner `future-agi`, repository `traceAI`, workflow `release.yml`, blank environment), revoke the token on PyPI, delete the `PYPI_BOOTSTRAP_TOKEN` secret, and empty the list.
- [x] **First-release bootstrap (set up 2026-10-29).** PyPI allows only three pending trusted publishers per organization. `traceAI-a2a`, `traceAI-ag2-classic` and `traceAI-agent-framework` have org pending publishers. The other 16 first-time projects are listed in `.github/release/config.json` `pypi_bootstrap_token` and they upload with the **`PYPI_BOOTSTRAP_TOKEN`** secret (an account-scoped token, because only those can create projects) for as long as they stay listed, since an upload to a project without a trusted publisher is rejected (403). Nothing else uses it. **After the first release that creates a project:** add it to the futureagi organization, add its trusted publisher (owner `future-agi`, repository `traceAI`, workflow `release.yml`, blank environment), and remove it from the list. Once the list is empty, revoke the token on PyPI and delete the `PYPI_BOOTSTRAP_TOKEN` secret.
- [ ] Token fallback only: add secret **`PYPI_API_TOKEN`** with upload rights for the intended projects. The publisher uses it when present. Account-scoped tokens can create new projects; project-scoped tokens cannot create another project. Remove the fallback token once trusted publishing is working.

Sources: [PyPI publisher setup](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) and [pinned PyPI action's reusable-workflow restriction](https://github.com/pypa/gh-action-pypi-publish/blob/7245906fb61fa33a13554f9d5fb856fe61758086/README.md#trusted-publishing).
Expand Down
2 changes: 2 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
<!-- Central can take over the default 30 minutes to publish a full reactor bundle. -->
<waitMaxTime>3600</waitMaxTime>
</configuration>
</plugin>
</plugins>
Expand Down
Loading