Skip to content

Commit 559e0d7

Browse files
authored
fix(release): push TypeScript tag in RC builds (#25)
## Summary Fixes a bug where the TypeScript client tag was created but never pushed during RC builds, causing the final release workflow to fail with "Tag vX.Y.ZrcN does not exist for stack-client-typescript". ## Root Cause In `upload-packages-and-tag/main.sh`: - Tags are created for all repos (including TypeScript) at line 107 - The lockfile update loop skips TypeScript with `continue` (line 131) - Tag push happens **inside** that lockfile loop (line 161) - Result: TypeScript tag never gets pushed ## Fix Split the logic so TypeScript tags are pushed immediately after creation, before the lockfile update loop runs for Python repos. ## Test Plan - [x] Manually created and pushed the missing `v0.3.1rc5` tag for TypeScript client - [x] Re-ran the failed release workflow (run #18987010208) - [ ] Next RC build will verify the fix works end-to-end
1 parent 1019092 commit 559e0d7

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

actions/release-final-package/main.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ run_precommit_lockfile_update() {
101101
# Use pre-commit to update lockfiles (uv.lock and package-lock.json)
102102
# LLAMA_STACK_RELEASE_MODE=true signals hooks to update lockfiles
103103
# Note: pre-commit exits with non-zero when it modifies files, which is expected
104+
if ! command -v pre-commit &> /dev/null; then
105+
echo "ERROR: pre-commit is not installed" >&2
106+
exit 1
107+
fi
104108
echo "Running pre-commit to update lockfiles..."
105109
LLAMA_STACK_RELEASE_MODE=true pre-commit run --all-files || true
106110
echo "pre-commit run completed."
@@ -299,8 +303,9 @@ done
299303
echo "Release $RELEASE_VERSION published successfully"
300304

301305
# Auto-bump main branch version (create PR)
306+
# Only bump the stack repo, not client libraries
302307
if ! is_truthy "$LLAMA_STACK_ONLY"; then
303-
echo "Creating PR to bump main branch version"
308+
echo "Creating PR to bump main branch version for stack repo"
304309

305310
# Calculate next dev version: 0.1.0 -> 0.1.1.dev0
306311
MAJOR=$(echo $RELEASE_VERSION | cut -d. -f1)
@@ -311,12 +316,13 @@ if ! is_truthy "$LLAMA_STACK_ONLY"; then
311316

312317
echo "Next dev version: $NEXT_DEV_VERSION"
313318

314-
for repo in "${REPOS[@]}"; do
319+
for repo in "stack"; do
315320
cd $TMPDIR
316321

317322
if [ "$repo" != "stack-client-typescript" ]; then
318323
uv venv -p python3.12 bump-main-$repo-env
319324
source bump-main-$repo-env/bin/activate
325+
uv pip install pre-commit
320326
fi
321327

322328
cd llama-$repo

actions/upload-packages-and-tag/main.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ run_precommit_lockfile_update() {
3232
# Use pre-commit to update lockfiles (uv.lock and package-lock.json)
3333
# For RC builds, LLAMA_STACK_RELEASE_MODE=true with UV config pointing to test.pypi
3434
# Note: pre-commit exits with non-zero when it modifies files, which is expected
35+
if ! command -v pre-commit &> /dev/null; then
36+
echo "ERROR: pre-commit is not installed" >&2
37+
exit 1
38+
fi
3539
echo "Running pre-commit to update lockfiles..."
3640
UV_EXTRA_INDEX_URL="https://test.pypi.org/simple/" \
3741
UV_INDEX_STRATEGY="unsafe-best-match" \
@@ -122,12 +126,23 @@ for repo in "${REPOS[@]}"; do
122126
cd ..
123127
done
124128

129+
# Push TypeScript tag immediately since it doesn't need lockfile updates
130+
for repo in "${REPOS[@]}"; do
131+
if [ "$repo" == "stack-client-typescript" ]; then
132+
cd llama-$repo
133+
org=$(github_org $repo)
134+
echo "Pushing tag for llama-$repo (no lockfile updates needed)"
135+
git push -f "https://x-access-token:${GITHUB_TOKEN}@github.com/$org/llama-$repo.git" "v$VERSION"
136+
cd ..
137+
fi
138+
done
139+
125140
# Update lockfiles now that packages are published to test.pypi
126141
# Force-move tags to include lockfile updates
127142
echo "Updating lockfiles after publishing to test.pypi..."
128143
for repo in "${REPOS[@]}"; do
129144
if [ "$repo" == "stack-client-typescript" ]; then
130-
# TypeScript client doesn't need lockfile updates
145+
# TypeScript client doesn't need lockfile updates (already pushed above)
131146
continue
132147
fi
133148

0 commit comments

Comments
 (0)