Skip to content

Commit 7bb6e63

Browse files
committed
Merge remote-tracking branch 'origin/release-0.5.x' into fix-6193-repair
Signed-off-by: Sumanth Kamenani <skamenan@redhat.com> # Conflicts: # .github/workflows/pypi.yml # scripts/integration-tests.sh
2 parents cd96f63 + 5a316e7 commit 7bb6e63

8 files changed

Lines changed: 71 additions & 47 deletions

File tree

.github/workflows/pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ jobs:
514514
fi
515515
516516
if [ -d "dist-client-python" ] && ls dist-client-python/*.whl 1>/dev/null 2>&1; then
517-
python -c "import ogx_client; print(f'ogx_client imported successfully from {ogx_client.__file__}')"
517+
python -c "import importlib, importlib.util; modules = ('llama_stack_client', 'ogx_client'); imported = next((importlib.import_module(name) for name in modules if importlib.util.find_spec(name)), None); assert imported is not None, 'No supported Python client module found'; print(f'{imported.__name__} imported successfully from {imported.__file__}')"
518518
fi
519519
520520
- name: Verify TypeScript package
@@ -540,7 +540,7 @@ jobs:
540540
publish-packages:
541541
name: Publish ${{ matrix.package }}
542542
if: |
543-
github.repository_owner == 'llamastack' &&
543+
github.repository_owner == 'ogx-ai' &&
544544
(inputs.dry_run || 'test-pypi') != 'build-only' && (
545545
github.event_name == 'workflow_dispatch' ||
546546
github.event.action == 'published' ||
@@ -737,7 +737,7 @@ jobs:
737737
always() &&
738738
needs.compute-version.result == 'success' &&
739739
(needs.publish-packages.result == 'success' || needs.publish-packages.result == 'skipped') &&
740-
github.repository_owner == 'llamastack' &&
740+
github.repository_owner == 'ogx-ai' &&
741741
(inputs.dry_run || 'test-pypi') != 'build-only' &&
742742
(inputs.packages || 'all') != 'clients-only' && (
743743
github.event_name == 'workflow_dispatch' ||

containers/Containerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ ARG PYPI_VERSION=""
2727
ARG TEST_PYPI_VERSION=""
2828
ARG KEEP_WORKSPACE=""
2929
ARG DISTRO_NAME="starter"
30+
# Tolerate failures of the OpenTelemetry per-library bootstrap. This release
31+
# branch is a pre-rename backfill whose pinned deps can conflict with the latest
32+
# auto-instrumentation packages.
33+
ARG OTEL_BEST_EFFORT="1"
3034
ARG RUN_CONFIG_PATH=""
3135
ARG UV_HTTP_TIMEOUT=500
3236
ARG UV_EXTRA_INDEX_URL=""
@@ -112,6 +116,7 @@ RUN set -eux; \
112116
else \
113117
if [ -n "$PYPI_VERSION" ]; then \
114118
uv pip install --no-cache "llama-stack==$PYPI_VERSION"; \
119+
uv pip install --no-cache "llama-stack-api==$PYPI_VERSION"; \
115120
else \
116121
uv pip install --no-cache llama-stack; \
117122
fi; \
@@ -130,10 +135,20 @@ RUN set -eux; \
130135
printf '%s\n' "$deps" | xargs -L1 uv pip install --no-cache; \
131136
fi
132137

133-
# Install OpenTelemetry auto-instrumentation support
138+
# Install OpenTelemetry auto-instrumentation support.
139+
# The base distro/exporter install is required. The per-library bootstrap
140+
# (opentelemetry-bootstrap -a install) selects the latest instrumentation
141+
# packages, which can conflict with the pinned dependencies of older releases.
134142
RUN set -eux; \
135143
pip install --no-cache opentelemetry-distro opentelemetry-exporter-otlp; \
136-
opentelemetry-bootstrap -a install
144+
if ! opentelemetry-bootstrap -a install; then \
145+
if [ "$OTEL_BEST_EFFORT" = "1" ]; then \
146+
echo "opentelemetry-bootstrap failed; continuing without full auto-instrumentation (OTEL_BEST_EFFORT=1)" >&2; \
147+
else \
148+
echo "opentelemetry-bootstrap failed" >&2; \
149+
exit 1; \
150+
fi; \
151+
fi
137152

138153
# Cleanup
139154
RUN set -eux; \

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.setuptools_scm]
6-
fallback_version = "0.5.2"
6+
fallback_version = "0.5.3"
77

88
[tool.uv]
99
required-version = ">=0.7.0"
@@ -62,7 +62,7 @@ dependencies = [
6262

6363
[project.optional-dependencies]
6464
client = [
65-
"llama-stack-client==0.5.2", # Optional for library-only usage
65+
"llama-stack-client==0.5.3", # Optional for library-only usage
6666
]
6767
oci = [
6868
"numpy>=2.3.2",
@@ -116,7 +116,7 @@ type_checking = [
116116
"lm-format-enforcer",
117117
"mcp>=1.23.0",
118118
"ollama",
119-
"llama-stack-client==0.5.2",
119+
"llama-stack-client==0.5.3",
120120
]
121121
# These are the dependencies required for running unit tests.
122122
unit = [

scripts/integration-tests.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ run_client_ts_tests() {
238238

239239
pushd tests/integration/client-typescript >/dev/null
240240

241+
local ts_client_package_name="llama-stack-client"
242+
241243
# Determine if TS_CLIENT_PATH is a directory path or an npm version
242244
if [[ -d "$TS_CLIENT_PATH" ]]; then
243245
# It's a directory path - use local checkout
@@ -246,6 +248,7 @@ run_client_ts_tests() {
246248
popd >/dev/null
247249
return 1
248250
fi
251+
ts_client_package_name=$(node -p "require(process.argv[1]).name" "$TS_CLIENT_PATH/package.json")
249252
echo "Using local llama-stack-client-typescript from: $TS_CLIENT_PATH"
250253

251254
# Build the TypeScript client first
@@ -265,7 +268,7 @@ run_client_ts_tests() {
265268
# Then install the local checkout under the legacy package name used by
266269
# release-0.5 integration tests. The latest checkout may publish as ogx-client.
267270
echo "Installing llama-stack-client from: $TS_CLIENT_PATH"
268-
npm install "llama-stack-client@file:${TS_CLIENT_PATH}" --silent
271+
npm install "llama-stack-client@file:${TS_CLIENT_PATH}" --silent --ignore-scripts
269272
else
270273
# It's an npm version specifier - install from npm
271274
echo "Installing llama-stack-client@${TS_CLIENT_PATH} from npm"
@@ -279,9 +282,9 @@ run_client_ts_tests() {
279282

280283
# Verify installation
281284
echo "Verifying llama-stack-client installation..."
282-
if npm list llama-stack-client 2>/dev/null | grep -q llama-stack-client; then
285+
if npm list llama-stack-client 2>/dev/null | grep -q llama-stack-client || npm list "$ts_client_package_name" 2>/dev/null | grep -q "$ts_client_package_name"; then
283286
echo "✅ llama-stack-client successfully installed"
284-
npm list llama-stack-client
287+
npm list llama-stack-client || npm list "$ts_client_package_name"
285288
else
286289
echo "❌ llama-stack-client not found in node_modules"
287290
echo "Installed packages:"

src/llama_stack_api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ llama_stack_api = ["py.typed", "**/*.json", "**/*.yaml"]
9090

9191
[tool.setuptools_scm]
9292
root = "../.."
93-
fallback_version = "0.5.2"
93+
fallback_version = "0.5.3"
9494

9595
[tool.ruff]
9696
line-length = 120

tests/integration/client-typescript/__tests__/inference.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import { createTestClient, requireTextModel, isPrematureCloseError } from '../setup';
1515

1616
describe('Inference API - Chat Completions', () => {
17+
const streamingTest =
18+
process.env['LLAMA_STACK_TS_SKIP_STREAMING_TESTS'] === '1' ? test.skip : test;
19+
1720
// Test cases matching llama-stack/tests/integration/test_cases/inference/chat_completion.json
1821
const chatCompletionTestCases = [
1922
{
@@ -80,7 +83,7 @@ describe('Inference API - Chat Completions', () => {
8083
},
8184
);
8285

83-
test.each(streamingTestCases)('chat completion streaming: $id', async ({ question, expected, testId }) => {
86+
streamingTest.each(streamingTestCases)('chat completion streaming: $id', async ({ question, expected, testId }) => {
8487
const client = createTestClient(testId);
8588
const textModel = requireTextModel();
8689

tests/integration/client-typescript/__tests__/responses.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import { createTestClient, requireTextModel, getResponseOutputText, isPrematureCloseError } from '../setup';
1515

1616
describe('Responses API - Basic', () => {
17+
const streamingTest =
18+
process.env['LLAMA_STACK_TS_SKIP_STREAMING_TESTS'] === '1' ? test.skip : test;
19+
1720
// Test cases matching llama-stack/tests/integration/responses/fixtures/test_cases.py
1821
const basicTestCases = [
1922
{
@@ -70,7 +73,7 @@ describe('Responses API - Basic', () => {
7073
expect(nextOutputText).toContain(expected.toUpperCase());
7174
});
7275

73-
test.each(basicTestCases)('streaming basic response: $id', async ({ input, expected, testId }) => {
76+
streamingTest.each(basicTestCases)('streaming basic response: $id', async ({ input, expected, testId }) => {
7477
// Modify test_id for streaming variant
7578
const streamingTestId = testId.replace(
7679
'test_response_non_streaming_basic',

0 commit comments

Comments
 (0)