Skip to content

Commit 3941a00

Browse files
Merge remote-tracking branch 'origin/main' into test/3954-migrate-features-drivers/matthewgrossman
Signed-off-by: Matthew Grossman <[email protected]>
2 parents 6e0ec21 + 8ed8bf0 commit 3941a00

41 files changed

Lines changed: 1115 additions & 606 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,18 @@ updating a Snap Store support track. Docs retain an
8383
immutable version and advance latest only for a newer version.
8484

8585
Watch the stable release run and report its result.
86+
87+
## PyPI publishing
88+
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.

‎.agents/skills/sync-agent-infra/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Run after adding, removing, or renaming a skill or crate; changing issue or PR c
2828
| TUI behavior | `tui-development` |
2929
| Release artifacts or smoke coverage | `test-release-canary` |
3030
| Release cadence, tagging, or qualification workflows | `release-captain` |
31+
| Release workflows or publishers | `release-openshell`, `release-captain`; keep the Release workflows table and the manual-trigger rule in `CI.md` current |
3132
| CI diagnostics | `watch-github-actions` |
3233
| Native Windows builds, runtime, or release branch guidance | `build-openshell-mxc-windows`; keep Windows implementation links on `windows` even in docs merged to `main` |
3334
| Gator supervision | `launch-openshell-gator` |

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

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,6 @@ jobs:
286286
id-token: write
287287
attestations: write
288288
artifact-metadata: write
289-
outputs:
290-
wheel_filenames: ${{ steps.wheel_filenames.outputs.wheel_filenames }}
291289
steps:
292290
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
293291

@@ -391,8 +389,7 @@ jobs:
391389
392390
ls -la release/
393391
394-
- name: Capture wheel filenames
395-
id: wheel_filenames
392+
- name: Verify wheel count
396393
run: |
397394
set -euo pipefail
398395
shopt -s nullglob
@@ -401,8 +398,6 @@ jobs:
401398
echo "expected exactly one Python wheel, found ${#wheels[@]}" >&2
402399
exit 1
403400
fi
404-
wheel_filename=$(basename "${wheels[0]}")
405-
echo "wheel_filenames=${wheel_filename}" >> "$GITHUB_OUTPUT"
406401
407402
- name: Generate checksums
408403
run: |
@@ -574,7 +569,7 @@ jobs:
574569

575570
publish-fern-docs:
576571
name: Sync and Publish Fern Docs
577-
needs: [compute-versions, release-dev, release-helm, trigger-wheel-publish]
572+
needs: [compute-versions, release-dev, release-helm]
578573
permissions:
579574
contents: write
580575
uses: ./.github/workflows/sync-docs.yml
@@ -587,40 +582,3 @@ jobs:
587582
publish: true
588583
secrets:
589584
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
590-
591-
trigger-wheel-publish:
592-
name: Trigger Wheel Publish
593-
needs: [compute-versions, release-dev]
594-
runs-on: [self-hosted, nv]
595-
timeout-minutes: 10
596-
steps:
597-
- name: Trigger GitLab CI
598-
env:
599-
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
600-
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
601-
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
602-
WHEEL_FILENAMES: ${{ needs.release-dev.outputs.wheel_filenames }}
603-
run: |
604-
set -euo pipefail
605-
if [ -z "${WHEEL_FILENAMES}" ]; then
606-
echo "No wheel filenames provided by build job" >&2
607-
exit 1
608-
fi
609-
610-
response=$(curl -X POST \
611-
--fail \
612-
--silent \
613-
--show-error \
614-
-F "token=${GITLAB_CI_TRIGGER_TOKEN}" \
615-
-F "ref=main" \
616-
-F "variables[PIPELINE_ACTION]=publish_wheels" \
617-
-F "variables[GITHUB_REPOSITORY]=${GITHUB_REPOSITORY}" \
618-
-F "variables[COMMIT_SHA]=${GITHUB_SHA}" \
619-
-F "variables[RELEASE_TAG]=dev" \
620-
-F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \
621-
-F "variables[RELEASE_KIND]=dev" \
622-
-F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \
623-
"${GITLAB_CI_TRIGGER_URL}")
624-
pipeline_id=$(printf '%s' "$response" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p')
625-
pipeline_status=$(printf '%s' "$response" | sed -n 's/.*"status":"\([^"]*\)".*/\1/p')
626-
echo "Triggered GitLab pipeline ${pipeline_id:-unknown} with status=${pipeline_status:-unknown}"

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

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ on:
4040
required: false
4141
SNAPCRAFT_STORE_CREDENTIALS:
4242
required: false
43-
FERN_TOKEN:
44-
required: false
45-
GITLAB_CI_TRIGGER_TOKEN:
46-
required: false
47-
GITLAB_CI_TRIGGER_URL:
48-
required: false
4943

5044
permissions:
5145
contents: read
@@ -68,8 +62,6 @@ jobs:
6862
id-token: write
6963
attestations: write
7064
artifact-metadata: write
71-
outputs:
72-
wheel_filenames: ${{ steps.wheel_filenames.outputs.wheel_filenames }}
7365
steps:
7466
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7567
with:
@@ -151,8 +143,7 @@ jobs:
151143
path: release/
152144
merge-multiple: true
153145

154-
- name: Capture wheel filenames
155-
id: wheel_filenames
146+
- name: Verify wheel count
156147
run: |
157148
set -euo pipefail
158149
shopt -s nullglob
@@ -161,8 +152,6 @@ jobs:
161152
echo "expected exactly one Python wheel, found ${#wheels[@]}" >&2
162153
exit 1
163154
fi
164-
wheel_filename=$(basename "${wheels[0]}")
165-
echo "wheel_filenames=${wheel_filename}" >> "$GITHUB_OUTPUT"
166155
167156
- name: Generate checksums
168157
run: |
@@ -354,8 +343,6 @@ jobs:
354343
timeout-minutes: 10
355344
permissions:
356345
contents: write
357-
outputs:
358-
wheel_filenames: ${{ needs.assemble.outputs.wheel_filenames }}
359346
steps:
360347
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
361348
if: ${{ !inputs.is-prerelease && inputs.make-latest }}
@@ -535,6 +522,19 @@ jobs:
535522
buf push proto --label "${RELEASE_TAG}" \
536523
--source-control-url "${SOURCE_CONTROL_URL}"
537524
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+
538538
publish-snap:
539539
name: Publish Snap
540540
needs: release
@@ -590,38 +590,6 @@ jobs:
590590
version: ${{ inputs.semver }}
591591
source-sha: ${{ inputs.source-sha }}
592592

593-
trigger-wheel-publish:
594-
name: Trigger Wheel Publish
595-
needs: release
596-
if: ${{ !inputs.is-prerelease }}
597-
uses: ./.github/workflows/wheel-publish.yml
598-
with:
599-
release-tag: ${{ inputs.release-tag }}
600-
source-sha: ${{ inputs.source-sha }}
601-
python-version: ${{ inputs.python-version }}
602-
wheel-filenames: ${{ needs.release.outputs.wheel_filenames }}
603-
secrets:
604-
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
605-
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
606-
607-
publish-fern-docs:
608-
name: Sync and Publish Fern Docs
609-
needs: [release, publish-sdk-typescript, trigger-wheel-publish]
610-
if: ${{ !inputs.is-prerelease }}
611-
permissions:
612-
contents: write
613-
uses: ./.github/workflows/sync-docs.yml
614-
with:
615-
operation: sync
616-
channel: stable
617-
source_ref: ${{ inputs.source-sha }}
618-
release_version: ${{ inputs.semver }}
619-
version_slug: v${{ inputs.semver }}
620-
display_name: Latest (v${{ inputs.semver }})
621-
publish: true
622-
secrets:
623-
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
624-
625593
# GitHub treats skipped jobs as passing, so a publisher that never ran would
626594
# leave the run green. Fail when any publisher expected for this release kind
627595
# did not succeed, so callers' failure notifications fire.
@@ -632,12 +600,11 @@ jobs:
632600
- tag-ghcr-release
633601
- release-helm
634602
- release
603+
- publish-pypi
635604
- publish-snap
636605
- publish-prerelease-snap
637606
- publish-sdk-typescript
638607
- tag-sdk-go
639-
- trigger-wheel-publish
640-
- publish-fern-docs
641608
if: always()
642609
runs-on: ubuntu-latest
643610
timeout-minutes: 2
@@ -653,7 +620,7 @@ jobs:
653620
if [[ "${IS_PRERELEASE}" == "true" ]]; then
654621
expected+=(publish-prerelease-snap)
655622
else
656-
expected+=(publish-sdk-typescript tag-sdk-go trigger-wheel-publish publish-fern-docs)
623+
expected+=(publish-pypi publish-sdk-typescript tag-sdk-go)
657624
if [[ "${MAKE_LATEST}" == "true" ]]; then
658625
expected+=(publish-snap)
659626
fi

‎.github/workflows/release.yml‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,43 @@ jobs:
160160
secrets:
161161
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
162162
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
163+
164+
publish-fern-docs:
165+
name: Sync and Publish Fern Docs
166+
needs: [build, publish]
167+
permissions:
168+
contents: write
169+
uses: ./.github/workflows/sync-docs.yml
170+
with:
171+
operation: sync
172+
channel: stable
173+
source_ref: ${{ needs.build.outputs.source_sha }}
174+
release_version: ${{ needs.build.outputs.semver }}
175+
version_slug: v${{ needs.build.outputs.semver }}
176+
display_name: Latest (v${{ needs.build.outputs.semver }})
177+
publish: true
178+
secrets:
163179
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
164-
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
165-
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
180+
181+
check-publication:
182+
name: Check Stable Publication
183+
needs: [promote, build, release-notes, publish, publish-fern-docs]
184+
if: ${{ always() && !inputs.notes-only }}
185+
runs-on: ubuntu-latest
186+
timeout-minutes: 2
187+
permissions: {}
188+
steps:
189+
- name: Require every stable publisher to succeed
190+
shell: bash
191+
env:
192+
NEEDS: ${{ toJSON(needs) }}
193+
run: |
194+
set -euo pipefail
195+
jq -e 'all(.[]; .result == "success")' <<<"${NEEDS}"
166196
167197
notify-release-failure:
168198
name: Notify Release Failure
169-
needs: [promote, build, release-notes, publish]
199+
needs: [promote, build, release-notes, publish, publish-fern-docs, check-publication]
170200
if: failure()
171201
runs-on: ubuntu-latest
172202
timeout-minutes: 2

0 commit comments

Comments
 (0)