-
Notifications
You must be signed in to change notification settings - Fork 11
build(sdk): register arcbox (Python) as a release-please component #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/sdk-python
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| { | ||
| ".": "0.6.2", | ||
| "fleet": "0.1.3" | ||
| "fleet": "0.1.3", | ||
| "sdk/python": "0.1.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ | |
| } | ||
| ], | ||
| "changelog-path": "CHANGELOG.md", | ||
| "exclude-paths": ["fleet"] | ||
| "exclude-paths": ["fleet", "sdk/python"] | ||
| }, | ||
| "fleet": { | ||
| "component": "fleet-agent", | ||
|
|
@@ -39,6 +39,12 @@ | |
| } | ||
| ], | ||
| "changelog-path": "CHANGELOG.md" | ||
| }, | ||
| "sdk/python": { | ||
| "release-type": "python", | ||
| "component": "sdk-python", | ||
| "include-component-in-tag": true, | ||
| "changelog-path": "CHANGELOG.md" | ||
|
Comment on lines
+43
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this configuration reaches Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,9 +116,9 @@ ARCBOX_SDK_E2E=1 uv run pytest tests/test_e2e.py | |
| ## Toolchain notes | ||
|
|
||
| - **uv** is the package/project manager (`uv_build` backend, `uv.lock` | ||
| committed). Publishing: `uv build && uv publish` (credentials via | ||
| `UV_PUBLISH_TOKEN`; TestPyPI first via a `[[tool.uv.index]]` entry if | ||
| desired). | ||
| committed). Publishing is CI-only: `uv build && uv publish` under | ||
| PyPI trusted publishing (OIDC) — see [Releasing](#releasing); no | ||
| `UV_PUBLISH_TOKEN` anywhere. | ||
| - **ruff** is both linter and formatter (`E,F,W,I,UP,B,SIM,RUF`). | ||
| - **pyright** (strict) is the authoritative type checker. Evaluated | ||
| alternatives (2026-08): **ty** 0.0.65 reports 16 false positives here | ||
|
|
@@ -141,6 +141,43 @@ TODO(CI): wire the gates above into `.github/workflows` as an | |
| `sdk-python` job (follow-up; workflow changes are intentionally not part | ||
| of this branch). | ||
|
|
||
| ## Releasing | ||
|
|
||
| The SDK is a release-please component (`sdk-python` in | ||
| `release-please-config.json`), released on its own cadence, independent | ||
| of the main arcbox release train: | ||
|
|
||
| 1. Conventional commits touching `sdk/python` accumulate on `master`. | ||
| 2. release-please maintains a dedicated release PR for the component | ||
| (separate from the root, fleet-agent, and sdk-typescript PRs) that | ||
| bumps the `pyproject.toml` version and updates `CHANGELOG.md`. | ||
| 3. Merging that PR creates the GitHub release and the tag | ||
| `sdk-python-vX.Y.Z` (same convention as `sdk-typescript-vX.Y.Z`). | ||
| 4. The tag triggers the PyPI publish workflow | ||
| (`release-sdk-python.yml`), which checks out the tag's tree, re-runs | ||
| the full gate suite (`ruff check`, `ruff format --check`, `pyright`, | ||
| `pytest`, `gen_sync.py --check`), builds with `uv build`, and | ||
| publishes with `uv publish` via [trusted | ||
| publishing](https://docs.pypi.org/trusted-publishers/) (OIDC) — | ||
| tokenless: the job's `id-token: write` permission is exchanged for a | ||
| short-lived PyPI credential. The job skips cleanly if the version is | ||
| already on PyPI, so a re-dispatch never fails on an | ||
| already-published release. | ||
|
|
||
| One-time bootstrap — unlike npm, PyPI supports [pending | ||
| publishers](https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/): | ||
| the trusted publisher is registered *before* the first upload and CI | ||
| does the first publish, so there is no local bootstrap publish and no | ||
| API token at any point: | ||
|
|
||
| 1. On pypi.org → account → Publishing → "Add a new pending publisher" | ||
| (GitHub): PyPI project name `arcbox`, owner `arcboxlabs`, repository | ||
| `arcbox`, workflow filename `release-sdk-python.yml`, environment | ||
| left empty. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PyPI's own docs call the environment field "optional but strongly recommended" — leaving it empty binds the trusted publisher to repo + workflow filename only, so any run of |
||
| 2. The first tag-triggered run then creates the `arcbox` project on | ||
| PyPI as it publishes, and the pending publisher becomes the | ||
| project's regular trusted publisher. Nothing else to configure. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A pending publisher does not reserve the name: per PyPI, it "does not create a project or reserve a project's name until it is actually used to publish," and if someone else registers |
||
|
|
||
| ## Status | ||
|
|
||
| Phase 1 of CORE-58 — the hello-world closed loop: `Sandbox` / | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a maintainer merges the first generated
sdk/pythonrelease PR, release-please creates thesdk-python-vX.Y.Ztag, but no checked-in workflow handles that tag or publishes the package, causing the GitHub release to complete without a corresponding PyPI release.