Skip to content

Conversation

@cdoern
Copy link
Collaborator

@cdoern cdoern commented Jan 28, 2026

What does this PR do?

Consolidate all llama-stack package publishing into a single workflow with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and llama-stack-api on schedule and release. If we truly want to move away from llama-stack-ops, we need to add client building+publishing as well

Key changes:

  • Add workflow_dispatch trigger with configurable inputs:

    • dry_run: test-pypi (default), build-only, or off (production)
    • version: optional version override for RC builds
    • packages: all, llama-stack-only, or clients-only
    • client_ref: git ref for external client repos
  • Extend build matrix to include external client packages:

    • llama-stack-client-python (from llamastack/llama-stack-client-python)
    • llama-stack-client-typescript (from llamastack/llama-stack-client-typescript)
  • Merge publish-test-pypi and publish-pypi into single publish-packages job

    • Dynamically selects target registry based on dry_run and event type
    • Maintains max-parallel: 1 for correct dependency ordering
    • npm packages use npm pack for dry-run, npm publish for production
  • Add graceful degradation for missing secrets (NPM_TOKEN)

    • Errors on npm production publish if NPM_TOKEN not configured
  • Add comprehensive header documentation explaining:

    • Required secrets and how to create them
    • All workflow inputs and their purposes
    • Publish flow and dependencies

Publish behavior by trigger:

  • push/PR: build + test only
  • schedule: build + test + test.pypi.org
  • release: published: build + test + pypi.org + npm
  • workflow_dispatch: configurable via dry_run input

Test Plan

once merged, test dry-run workflow dispatch.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 28, 2026
Consolidate all llama-stack package publishing into a single workflow
with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and llama-stack-api on schedule and release. If we truly want to move away from llama-stack-ops, we need to add client building+publishing as well

Key changes:
- Add workflow_dispatch trigger with configurable inputs:
  - dry_run: test-pypi (default), build-only, or off (production)
  - version: optional version override for RC builds
  - packages: all, llama-stack-only, or clients-only
  - client_ref: git ref for external client repos

- Extend build matrix to include external client packages:
  - llama-stack-client-python (from llamastack/llama-stack-client-python)
  - llama-stack-client-typescript (from llamastack/llama-stack-client-typescript)

- Merge publish-test-pypi and publish-pypi into single publish-packages job
  - Dynamically selects target registry based on dry_run and event type
  - Maintains max-parallel: 1 for correct dependency ordering
  - npm packages use npm pack for dry-run, npm publish for production

- Add graceful degradation for missing secrets (RELEASE_PAT, NPM_TOKEN)
  - Warns and skips external packages if RELEASE_PAT not configured
  - Errors on npm production publish if NPM_TOKEN not configured

- Add comprehensive header documentation explaining:
  - Required secrets and how to create them
  - All workflow inputs and their purposes
  - Publish flow and dependencies

Publish behavior by trigger:
- push/PR: build + test only
- schedule: build + test + test.pypi.org
- release: published: build + test + pypi.org + npm
- workflow_dispatch: configurable via dry_run input

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@cdoern cdoern force-pushed the new-release-changes branch from 45900e7 to 869cf3e Compare January 29, 2026 19:40
@cdoern cdoern marked this pull request as ready for review January 29, 2026 19:40
options:
- 'test-pypi' # Publish to test.pypi.org (default for testing)
- 'build-only' # Build and validate only, no publishing anywhere
- 'off' # Production publish (use with caution!)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

GITHUB_TOKEN should be fine, the client repos are public

Signed-off-by: Charlie Doern <cdoern@redhat.com>
the typescript client doesnt have the proper files to use ci, use install

Signed-off-by: Charlie Doern <cdoern@redhat.com>
and add explicit permissions to build-package job to satisfy code scanning, read only

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@cdoern cdoern force-pushed the new-release-changes branch from de21290 to 1706f6e Compare January 30, 2026 00:30
Add setuptools-scm to both pyproject.toml files with a fallback_version
for environments without git (Docker, CI). Compute the publish version
explicitly in the pypi workflow since version tags live on release
branches, not main: nightlies get date-based dev versions, releases
use the tag or manual input.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@cdoern cdoern force-pushed the new-release-changes branch from 1706f6e to 6a5de07 Compare January 30, 2026 00:55
@cdoern
Copy link
Collaborator Author

cdoern commented Jan 30, 2026

found some weird issues with our version tagging, I will fix it by properly tagging upon the next release using this action. We then can use setup tools auto versioning but until then we need the workflow in the most recent commit on this PR.

Release events should always target production pypi.org and npm,
not test.pypi.org. Remove the dry_run default that was overriding
the release event logic.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@cdoern cdoern merged commit a840629 into llamastack:main Jan 30, 2026
95 checks passed
@cdoern
Copy link
Collaborator Author

cdoern commented Jan 30, 2026

@Mergifyio backport release-0.4.x

@mergify
Copy link

mergify bot commented Jan 30, 2026

backport release-0.4.x

✅ Backports have been created

Details

Cherry-pick of a840629 has failed:

On branch mergify/bp/release-0.4.x/pr-4774
Your branch is up to date with 'origin/release-0.4.x'.

You are currently cherry-picking commit a8406295.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .github/workflows/pypi.yml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .github/workflows/README.md
	both modified:   pyproject.toml
	both modified:   src/llama_stack_api/pyproject.toml
	both modified:   uv.lock

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Jan 30, 2026
# What does this PR do?

Consolidate all llama-stack package publishing into a single workflow
with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and
llama-stack-api on schedule and release. If we truly want to move away
from llama-stack-ops, we need to add client building+publishing as well

Key changes:
- Add workflow_dispatch trigger with configurable inputs:
  - dry_run: test-pypi (default), build-only, or off (production)
  - version: optional version override for RC builds
  - packages: all, llama-stack-only, or clients-only
  - client_ref: git ref for external client repos

- Extend build matrix to include external client packages:
- llama-stack-client-python (from llamastack/llama-stack-client-python)
- llama-stack-client-typescript (from
llamastack/llama-stack-client-typescript)

- Merge publish-test-pypi and publish-pypi into single publish-packages
job
  - Dynamically selects target registry based on dry_run and event type
  - Maintains max-parallel: 1 for correct dependency ordering
  - npm packages use npm pack for dry-run, npm publish for production

- Add graceful degradation for missing secrets  (NPM_TOKEN)
  - Errors on npm production publish if NPM_TOKEN not configured

- Add comprehensive header documentation explaining:
  - Required secrets and how to create them
  - All workflow inputs and their purposes
  - Publish flow and dependencies

Publish behavior by trigger:
- push/PR: build + test only
- schedule: build + test + test.pypi.org
- release: published: build + test + pypi.org + npm
- workflow_dispatch: configurable via dry_run input

## Test Plan

once merged, test dry-run workflow dispatch.

---------

Signed-off-by: Charlie Doern <cdoern@redhat.com>
(cherry picked from commit a840629)

# Conflicts:
#	.github/workflows/README.md
#	pyproject.toml
#	src/llama_stack_api/pyproject.toml
#	uv.lock
cdoern added a commit that referenced this pull request Jan 30, 2026
Consolidate all llama-stack package publishing into a single workflow
with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and
llama-stack-api on schedule and release. If we truly want to move away
from llama-stack-ops, we need to add client building+publishing as well

Key changes:
- Add workflow_dispatch trigger with configurable inputs:
  - dry_run: test-pypi (default), build-only, or off (production)
  - version: optional version override for RC builds
  - packages: all, llama-stack-only, or clients-only
  - client_ref: git ref for external client repos

- Extend build matrix to include external client packages:
- llama-stack-client-python (from llamastack/llama-stack-client-python)
- llama-stack-client-typescript (from
llamastack/llama-stack-client-typescript)

- Merge publish-test-pypi and publish-pypi into single publish-packages
job
  - Dynamically selects target registry based on dry_run and event type
  - Maintains max-parallel: 1 for correct dependency ordering
  - npm packages use npm pack for dry-run, npm publish for production

- Add graceful degradation for missing secrets  (NPM_TOKEN)
  - Errors on npm production publish if NPM_TOKEN not configured

- Add comprehensive header documentation explaining:
  - Required secrets and how to create them
  - All workflow inputs and their purposes
  - Publish flow and dependencies

Publish behavior by trigger:
- push/PR: build + test only
- schedule: build + test + test.pypi.org
- release: published: build + test + pypi.org + npm
- workflow_dispatch: configurable via dry_run input

once merged, test dry-run workflow dispatch.

---------

Signed-off-by: Charlie Doern <cdoern@redhat.com>
(cherry picked from commit a840629)
Signed-off-by: Charlie Doern <cdoern@redhat.com>
cdoern added a commit that referenced this pull request Jan 30, 2026
Consolidate all llama-stack package publishing into a single workflow
with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and
llama-stack-api on schedule and release. If we truly want to move away
from llama-stack-ops, we need to add client building+publishing as well

Key changes:
- Add workflow_dispatch trigger with configurable inputs:
  - dry_run: test-pypi (default), build-only, or off (production)
  - version: optional version override for RC builds
  - packages: all, llama-stack-only, or clients-only
  - client_ref: git ref for external client repos

- Extend build matrix to include external client packages:
- llama-stack-client-python (from llamastack/llama-stack-client-python)
- llama-stack-client-typescript (from
llamastack/llama-stack-client-typescript)

- Merge publish-test-pypi and publish-pypi into single publish-packages
job
  - Dynamically selects target registry based on dry_run and event type
  - Maintains max-parallel: 1 for correct dependency ordering
  - npm packages use npm pack for dry-run, npm publish for production

- Add graceful degradation for missing secrets  (NPM_TOKEN)
  - Errors on npm production publish if NPM_TOKEN not configured

- Add comprehensive header documentation explaining:
  - Required secrets and how to create them
  - All workflow inputs and their purposes
  - Publish flow and dependencies

Publish behavior by trigger:
- push/PR: build + test only
- schedule: build + test + test.pypi.org
- release: published: build + test + pypi.org + npm
- workflow_dispatch: configurable via dry_run input

once merged, test dry-run workflow dispatch.

---------

Signed-off-by: Charlie Doern <cdoern@redhat.com>
(cherry picked from commit a840629)
Signed-off-by: Charlie Doern <cdoern@redhat.com>
cdoern added a commit that referenced this pull request Jan 30, 2026
Consolidate all llama-stack package publishing into a single workflow
with support for manual testing and dry-run modes.

Currently pypi.yml just builds, validates, and publishes llama-stack and
llama-stack-api on schedule and release. If we truly want to move away
from llama-stack-ops, we need to add client building+publishing as well

Key changes:
- Add workflow_dispatch trigger with configurable inputs:
  - dry_run: test-pypi (default), build-only, or off (production)
  - version: optional version override for RC builds
  - packages: all, llama-stack-only, or clients-only
  - client_ref: git ref for external client repos

- Extend build matrix to include external client packages:
- llama-stack-client-python (from llamastack/llama-stack-client-python)
- llama-stack-client-typescript (from
llamastack/llama-stack-client-typescript)

- Merge publish-test-pypi and publish-pypi into single publish-packages
job
  - Dynamically selects target registry based on dry_run and event type
  - Maintains max-parallel: 1 for correct dependency ordering
  - npm packages use npm pack for dry-run, npm publish for production

- Add graceful degradation for missing secrets  (NPM_TOKEN)
  - Errors on npm production publish if NPM_TOKEN not configured

- Add comprehensive header documentation explaining:
  - Required secrets and how to create them
  - All workflow inputs and their purposes
  - Publish flow and dependencies

Publish behavior by trigger:
- push/PR: build + test only
- schedule: build + test + test.pypi.org
- release: published: build + test + pypi.org + npm
- workflow_dispatch: configurable via dry_run input

once merged, test dry-run workflow dispatch.

---------

Signed-off-by: Charlie Doern <cdoern@redhat.com>
(cherry picked from commit a840629)
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants