Skip to content

Commit 7004281

Browse files
committed
ci(release): stop building and publishing the Python wheel
The Python SDK now releases from ai-openshell/sdk-python, and its first release there is openshell 0.1.8. PyPI never accepts a version twice, so core must not publish 0.1.8 when it tags v0.1.8. openshell 0.1.7 stays the last core-built wheel. Stable and prerelease releases no longer build the wheel, attach it to the GitHub Release, include it in the checksums and attestations, or publish it to PyPI. wheel-publish.yml and the publish-pypi job are removed, along with the python-version plumbing that only fed them. The rolling dev release keeps its wheel, and PR checks still build the SDK, until the SDK sources leave core. Refs #5287 Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent 53bf840 commit 7004281

8 files changed

Lines changed: 9 additions & 198 deletions

File tree

‎.agents/skills/release-captain/SKILL.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ git worktree remove --force "$wt"
169169
```
170170

171171
4. **Watch and verify.** Check that `Select Qualified Prerelease` names the
172-
approved candidate, the GitHub Release has assets, no job failed, and the
173-
wheel reached PyPI:
172+
approved candidate, the GitHub Release has assets and no job failed:
174173

175174
```shell
176175
gh run watch <run-id> --exit-status

‎.agents/skills/release-openshell/SKILL.md‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Release creates `vX.Y.Z` at that exact commit, then rebuilds and publishes all
3333
stable artifacts without rerunning qualification. Embedded versions change, so
3434
stable artifacts are not byte-identical to the qualified prerelease. An existing
3535
stable tag may be retried only if it already points to the selected commit. A retry
36-
publishes only missing artifacts; published images, charts, release assets, npm,
37-
and PyPI versions are kept, while the snap is uploaded again.
36+
publishes only missing artifacts; published images, charts, release assets, and
37+
npm versions are kept, while the snap is uploaded again.
3838
Stable images are saved as OCI archives during the build and pushed under the
3939
stable version tags during publication. Their SBOMs are verified before updating
4040
`latest`; the qualified prerelease's commit-SHA image tags remain unchanged.
@@ -84,17 +84,6 @@ immutable version and advance latest only for a newer version.
8484

8585
Watch the stable release run and report its result.
8686

87-
## PyPI publishing
87+
## Python SDK
8888

89-
Stable releases publish the Python wheel to PyPI from `wheel-publish.yml`, which the `publish-pypi` job in `release-publish.yml` calls after the GitHub Release is created. The workflow downloads the wheel from the stable GitHub Release, not a run's build artifact, and checks the stable tag's source commit and the wheel's release checksum. It uses Trusted Publishing with the `pypi` GitHub environment. PyPI matches the workflow file that contains the publishing job, so configure the `openshell` PyPI project's GitHub publisher with owner `NVIDIA`, repository `OpenShell`, workflow `wheel-publish.yml`, and environment `pypi`. No PyPI API token or GitLab trigger credentials are required.
90-
91-
The environment must allow the branch used to dispatch Release or `wheel-publish.yml`. For a support release, explicitly allow its support branch before dispatching. Required reviewers, if configured, must approve the PyPI job. An existing wheel on PyPI is skipped; PyPI does not allow replacing a published wheel.
92-
93-
If a stable release did not reach PyPI, publish the wheel without rerunning Release:
94-
95-
```shell
96-
gh workflow run wheel-publish.yml -R NVIDIA/OpenShell --ref main \
97-
-f release-tag=vX.Y.Z -f source-sha=<tag commit> -f python-version=X.Y.Z
98-
```
99-
100-
Development and prerelease wheels remain GitHub Release assets and do not publish to PyPI.
89+
Core no longer builds or publishes the Python SDK for releases. Stable and prerelease GitHub Releases carry no wheel, and nothing in core publishes to PyPI. `openshell` `0.1.7` is the last core-built wheel. From `0.1.8` on, [ai-openshell/sdk-python](https://github.com/ai-openshell/sdk-python) publishes `openshell` on the same day as each stable core release, once its update PR for the core tag merges. The rolling `dev` release still attaches a development wheel until the SDK sources leave core (NVIDIA/OpenShell#5287).

‎.github/workflows/release-build.yml‎

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ on:
2020
required: true
2121
type: boolean
2222
outputs:
23-
python_version:
24-
description: Python package version
25-
value: ${{ jobs.compute-versions.outputs.python_version }}
2623
npm_version:
2724
description: TypeScript package version
2825
value: ${{ jobs.compute-versions.outputs.npm_version }}
@@ -56,7 +53,6 @@ jobs:
5653
run:
5754
shell: nix develop -c bash -euo pipefail {0}
5855
outputs:
59-
python_version: ${{ steps.v.outputs.python }}
6056
cargo_version: ${{ steps.v.outputs.cargo }}
6157
npm_version: ${{ steps.v.outputs.npm }}
6258
deb_version: ${{ steps.v.outputs.deb }}
@@ -106,7 +102,6 @@ jobs:
106102
fi
107103
{
108104
echo "is_prerelease=${is_prerelease}"
109-
echo "python=$(uv run --no-project python tasks/scripts/release.py get-version --python)"
110105
echo "cargo=$(uv run --no-project python tasks/scripts/release.py get-version --cargo)"
111106
echo "npm=$(uv run --no-project python tasks/scripts/release.py get-version --npm)"
112107
echo "deb=$(uv run --no-project python tasks/scripts/release.py get-version --deb)"
@@ -160,46 +155,6 @@ jobs:
160155
push-images: ${{ inputs.is-prerelease }}
161156
checkout-ref: ${{ needs.compute-versions.outputs.source_sha }}
162157

163-
build-python-wheel:
164-
name: Build Python Wheel
165-
needs: [compute-versions]
166-
runs-on: linux-amd64-cpu8
167-
timeout-minutes: 20
168-
defaults:
169-
run:
170-
shell: nix develop -c bash -euo pipefail {0}
171-
env:
172-
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL: ${{ needs.compute-versions.outputs.python_version }}
173-
steps:
174-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
175-
with:
176-
fetch-depth: 0
177-
persist-credentials: false
178-
ref: ${{ needs.compute-versions.outputs.source_sha }}
179-
180-
- uses: ./.github/actions/setup-nix
181-
with:
182-
prepare-shell: "true"
183-
184-
- name: Sync Python dependencies
185-
run: uv sync --frozen
186-
187-
- name: Build Python wheel
188-
run: |
189-
set -euo pipefail
190-
uv run --frozen python tasks/scripts/generate_python_proto.py
191-
uv build --wheel --out-dir target/wheels
192-
uv run --no-project python tasks/scripts/verify-python-wheel.py target/wheels \
193-
--expected-version "${SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL}"
194-
ls -la target/wheels/*.whl
195-
196-
- name: Upload wheel artifact
197-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
198-
with:
199-
name: python-wheel
200-
path: target/wheels/*.whl
201-
retention-days: 5
202-
203158
build-deb:
204159
name: Build Debian Packages
205160
needs: [compute-versions, build-binaries, build-vm-driver]

‎.github/workflows/release-prerelease.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
release-tag: ${{ needs.resolve.outputs.tag }}
125125
source-sha: ${{ needs.build.outputs.source_sha }}
126126
semver: ${{ needs.build.outputs.semver }}
127-
python-version: ${{ needs.build.outputs.python_version }}
128127
npm-version: ${{ needs.build.outputs.npm_version }}
129128
is-prerelease: true
130129
secrets:

‎.github/workflows/release-publish.yml‎

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ on:
2727
description: Release version without the v prefix
2828
required: true
2929
type: string
30-
python-version:
31-
description: Python package version
32-
required: true
33-
type: string
3430
npm-version:
3531
description: TypeScript package version
3632
required: true
@@ -116,12 +112,6 @@ jobs:
116112
name: prover-checksums
117113
path: release/
118114

119-
- name: Download wheel artifact
120-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
121-
with:
122-
name: python-wheel
123-
path: release/
124-
125115
- name: Download Debian package artifacts
126116
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
127117
with:
@@ -143,16 +133,6 @@ jobs:
143133
path: release/
144134
merge-multiple: true
145135

146-
- name: Verify wheel count
147-
run: |
148-
set -euo pipefail
149-
shopt -s nullglob
150-
wheels=(release/*.whl)
151-
if [ "${#wheels[@]}" -ne 1 ]; then
152-
echo "expected exactly one Python wheel, found ${#wheels[@]}" >&2
153-
exit 1
154-
fi
155-
156136
- name: Generate checksums
157137
run: |
158138
set -euo pipefail
@@ -165,8 +145,7 @@ jobs:
165145
openshell-driver-vm-aarch64-unknown-linux-gnu.tar.gz \
166146
openshell-driver-vm-aarch64-apple-darwin.tar.gz \
167147
openshell_*.deb \
168-
openshell-*.rpm \
169-
*.whl > openshell-checksums-sha256.txt
148+
openshell-*.rpm > openshell-checksums-sha256.txt
170149
cat openshell-checksums-sha256.txt
171150
sha256sum -- \
172151
openshell-gateway-x86_64-unknown-linux-gnu.tar.gz \
@@ -199,7 +178,6 @@ jobs:
199178
release/*.tar.gz
200179
release/*.deb
201180
release/*.rpm
202-
release/*.whl
203181
204182
- name: Upload assembled release assets
205183
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
@@ -428,7 +406,6 @@ jobs:
428406
release/openshell-prover-x86_64-unknown-linux-musl.tar.gz
429407
release/openshell-prover-aarch64-unknown-linux-musl.tar.gz
430408
release/openshell-prover-aarch64-apple-darwin.tar.gz
431-
release/*.whl
432409
release/openshell.rb
433410
release/openshell-checksums-sha256.txt
434411
release/openshell-gateway-checksums-sha256.txt
@@ -522,19 +499,6 @@ jobs:
522499
buf push proto --label "${RELEASE_TAG}" \
523500
--source-control-url "${SOURCE_CONTROL_URL}"
524501
525-
publish-pypi:
526-
name: Publish Python Wheel
527-
needs: release
528-
if: ${{ !inputs.is-prerelease }}
529-
permissions:
530-
contents: read
531-
id-token: write
532-
uses: ./.github/workflows/wheel-publish.yml
533-
with:
534-
release-tag: ${{ inputs.release-tag }}
535-
source-sha: ${{ inputs.source-sha }}
536-
python-version: ${{ inputs.python-version }}
537-
538502
publish-snap:
539503
name: Publish Snap
540504
needs: release
@@ -600,7 +564,6 @@ jobs:
600564
- tag-ghcr-release
601565
- release-helm
602566
- release
603-
- publish-pypi
604567
- publish-snap
605568
- publish-prerelease-snap
606569
- publish-sdk-typescript
@@ -620,7 +583,7 @@ jobs:
620583
if [[ "${IS_PRERELEASE}" == "true" ]]; then
621584
expected+=(publish-prerelease-snap)
622585
else
623-
expected+=(publish-pypi publish-sdk-typescript tag-sdk-go)
586+
expected+=(publish-sdk-typescript tag-sdk-go)
624587
if [[ "${MAKE_LATEST}" == "true" ]]; then
625588
expected+=(publish-snap)
626589
fi

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ jobs:
153153
release-tag: ${{ needs.promote.outputs.tag }}
154154
source-sha: ${{ needs.build.outputs.source_sha }}
155155
semver: ${{ needs.build.outputs.semver }}
156-
python-version: ${{ needs.build.outputs.python_version }}
157156
npm-version: ${{ needs.build.outputs.npm_version }}
158157
is-prerelease: false
159158
make-latest: ${{ needs.promote.outputs.make-latest == 'true' }}

‎.github/workflows/wheel-publish.yml‎

Lines changed: 0 additions & 92 deletions
This file was deleted.

‎CI.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ without rerunning qualification. These artifacts have different embedded version
440440
from the qualified prerelease. Existing stable tags are never moved; a retry must
441441
resolve to the same qualified candidate. A retry rebuilds, then publishes only what
442442
is missing: it keeps published GHCR version tags, Helm charts, GitHub Release assets,
443-
npm versions, and PyPI versions. Snap uploads are not skipped.
443+
and npm versions. Snap uploads are not skipped.
444444

445445
Stable image builds save multi-platform OCI archives as workflow artifacts without
446446
pushing to GHCR. Publication copies those archives, including their attestations,
@@ -725,14 +725,13 @@ Each step that publishes to an external registry, store, or site lives in its ow
725725
| `.github/workflows/release-auto-tag.yml` | Weekdays at 14:00 Europe/Zurich, tags the next `-pre.N` on `main` when commits landed since the latest one, then dispatches Pre-release. It skips when the train has no `-pre.1` or its version is already stable, so push each train's `-pre.1` tag by hand. |
726726
| `.github/workflows/release-prerelease.yml` | Pre-release orchestrator, triggered by prerelease tag pushes or dispatched by Release Auto-Tag or manually. A tagless dispatch creates the next candidate on its branch; explicit tags select existing candidates. Builds, then publishes and qualifies in parallel. Qualification failure fails the run and sends the failure notification; published artifacts remain available. |
727727
| `.github/workflows/release-build.yml` | Shared version computation, binary and image builds, and package builds. Validates that the tag matches the caller's release kind. |
728-
| `.github/workflows/release-publish.yml` | Shared artifact assembly, OCI image tags and Helm chart publication, and package publication. Stable releases also publish release-labeled public schemas to Buf (`BUF_TOKEN` required) and GitHub Releases, and call the PyPI, snap, npm, and Go SDK publishers. |
728+
| `.github/workflows/release-publish.yml` | Shared artifact assembly, OCI image tags and Helm chart publication, and package publication. Stable releases also publish release-labeled public schemas to Buf (`BUF_TOKEN` required) and GitHub Releases, and call the snap, npm, and Go SDK publishers. The Python SDK is released from [ai-openshell/sdk-python](https://github.com/ai-openshell/sdk-python), so stable and prerelease GitHub Releases carry no wheel. |
729729
| `.github/workflows/release-notes.yml` | Shared prompt-driven release notes generation through Inference Hub, used by prerelease previews, notes-only previews, and stable releases. Stable releases reuse the promoted prerelease's preview when available. |
730730
| `.github/workflows/release-qualification.yml` | Reusable qualification suites and result aggregation. Runs security scans, conformance and feature integration, Docker and VM E2E, protobuf compatibility, and advisory compatibility review. |
731731
| `.github/workflows/snap-package.yml` | Builds snap and component artifacts for Release Dev, Release, and Pre-release without Store credentials or publication. |
732732
| `.github/workflows/snap-publish.yml` | Uploads existing snap and component artifacts directly to a Store channel without rebuilding. Release Dev uses `latest/edge`, Pre-release uses `latest/beta`, and Release uses `latest/stable` for the stable rebuild. Uploads queue per channel and architecture, so tagged beta and stable jobs recheck repository tags after earlier publication finishes and before updating their floating channels. Manual dispatch uploads the `snap-linux-*` artifacts from `artifact-run-id`. |
733733
| `.github/workflows/sdk-typescript-publish.yml` | Publishes the TypeScript SDK to GitHub Packages. Called by stable Release; manual dispatch publishes a given tag and npm version. |
734734
| `.github/workflows/sdk-go-tag.yml` | Creates the `sdk/go/vX.Y.Z` tag and asks the Go module proxy to fetch it. Called by stable Release; manual dispatch tags a given version and commit. |
735-
| `.github/workflows/wheel-publish.yml` | Publishes the wheel attached to a stable GitHub Release to PyPI with Trusted Publishing in the `pypi` environment. Called by stable Release; manual dispatch publishes a given tag. |
736735
| `.github/workflows/release-canary.yml` | Smoke-tests published dev artifacts in the `macos`, `ubuntu-deb`, `ubuntu-snap-system-docker`, `fedora`, and `kubernetes` (kind + Helm) jobs. Each job reaches its gateway and creates, exercises, and deletes a sandbox. The `ubuntu-snap-system-docker` job verifies a compatible system Docker lifecycle, while `ubuntu-snap-docker-preflight` tests fail-fast behavior when Docker is absent or supplied by the Docker snap. The positive snap lane also runs a local policy containment check with the packaged prover. It runs automatically after `Release Dev` succeeds and supports manual dispatch (`gh workflow run release-canary.yml --ref <branch>`). See the `test-release-canary` skill for the playbook and local kind reproduction. |
737736

738737
## Required status contexts

0 commit comments

Comments
 (0)