Skip to content

Commit 47d28d9

Browse files
Merge branch 'tensorzero:main' into main
2 parents 9f622ee + dde067f commit 47d28d9

File tree

581 files changed

+65436
-61080
lines changed

Some content is hidden

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

581 files changed

+65436
-61080
lines changed

.config/nextest.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ e2e_aws_sagemaker_tgi = { max-threads = 1 }
5757
e2e_aws_sagemaker_openai = { max-threads = 2 }
5858
e2e_groq = { max-threads = 1 }
5959

60+
# Require that nothing else runs at the same time as a Jaeger test,
61+
# so that we can find our Jaeger traces (without other tests
62+
# flushing our target spans out of the Jaeger buffer).
63+
[[profile.default.overrides]]
64+
filter = 'test(test_jaeger)'
65+
threads-required = 'num-test-threads'
66+
6067
[[profile.default.overrides]]
6168
filter = 'binary(e2e) and test(providers::aws_bedrock::)'
6269
test-group = 'e2e_aws_bedrock'

.github/workflows/batch-test.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,13 @@ on:
3434

3535
jobs:
3636
batch-tests:
37-
runs-on: namespace-profile-tensorzero-8x16
37+
runs-on: ubuntu-latest
3838

3939
timeout-minutes: 15
4040

4141
steps:
4242
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
4343

44-
- name: Install Namespace CLI
45-
uses: namespacelabs/nscloud-setup@d1c625762f7c926a54bd39252efff0705fd11c64
46-
47-
- name: Configure Namespace-powered Buildx
48-
uses: namespacelabs/nscloud-setup-buildx-action@84ca8c58fdf372d6a4750476cd09b7b96ee778ca
49-
50-
- name: Configure Namespace cache for Rust
51-
uses: namespacelabs/nscloud-cache-action@2f50e7d0f70475e6f59a55ba0f05eec9108e77cc
52-
with:
53-
cache: |
54-
rust
55-
5644
- uses: dtolnay/rust-toolchain@stable
5745

5846
- name: Login to DockerHub

.github/workflows/general.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
pull_request:
77
branches: ["main"]
88

9+
# When triggered from the merge queue, cancel any existing workflow runs for the same PR branch
10+
# Otherwise, use the unique run id for the concurrency group, to prevent anything from getting cancelled
11+
concurrency:
12+
group: ${{ github.event_name == 'merge_group' && format('{0}-{1}', github.workflow, github.ref) || github.run_id }}
13+
cancel-in-progress: true
14+
915
env:
1016
FORCE_COLOR: 1
1117
TENSORZERO_CLICKHOUSE_URL: "http://chuser:chpassword@localhost:8123/tensorzero"
@@ -46,6 +52,11 @@ jobs:
4652
docker load < gateway-container.tar
4753
docker load < ui-container.tar
4854
55+
- name: Create the `object_storage` directory for the multimodal-vision-finetuning example
56+
run: |
57+
mkdir -p examples/multimodal-vision-finetuning/object_storage
58+
chmod 777 examples/multimodal-vision-finetuning/object_storage
59+
4960
- name: Check latest docker-compose
5061
run: ./ci/check-all-docker-compose.sh
5162

@@ -76,6 +87,11 @@ jobs:
7687
uses: namespacelabs/nscloud-setup-buildx-action@84ca8c58fdf372d6a4750476cd09b7b96ee778ca
7788
continue-on-error: ${{ github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' }}
7889

90+
- name: Create the `object_storage` directory for the multimodal-vision-finetuning example
91+
run: |
92+
mkdir -p examples/multimodal-vision-finetuning/object_storage
93+
chmod 777 examples/multimodal-vision-finetuning/object_storage
94+
7995
- name: Check all docker-compose.yml files
8096
run: ./ci/check-all-docker-compose.sh
8197

@@ -133,7 +149,7 @@ jobs:
133149
validate:
134150
runs-on: namespace-profile-tensorzero-8x16
135151

136-
timeout-minutes: 20
152+
timeout-minutes: 30
137153

138154
steps:
139155
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -289,18 +305,6 @@ jobs:
289305
run: |
290306
uv run stubtest tensorzero.tensorzero
291307
292-
- name: "Python: OpenAI Client: Install dependencies"
293-
working-directory: clients/openai-python
294-
run: |
295-
uv venv
296-
uv pip sync requirements.txt
297-
298-
- name: "Python: OpenAI Client: pyright"
299-
working-directory: clients/openai-python
300-
run: |
301-
uv pip install pyright==1.1.394
302-
uv run pyright
303-
304308
- name: "Node.js: Run prettier"
305309
run: pnpm --filter=openai-node run format
306310

@@ -355,7 +359,7 @@ jobs:
355359
# We don't run many tests here, so use a normal runner with Github Actions caching
356360
# to avoid unnecessarily using Namespace credits (it should still always finish before
357361
# the main 'validate' job)
358-
runs-on: ${{ matrix.replicated && 'namespace-profile-tensorzero-large-cache-volume' || 'ubuntu-latest' }}
362+
runs-on: ${{ matrix.replicated && 'namespace-profile-tensorzero-16x32' || 'ubuntu-latest' }}
359363
continue-on-error: ${{ matrix.clickhouse_version.allow_failure }}
360364
strategy:
361365
matrix:
@@ -365,15 +369,9 @@ jobs:
365369
- tag: "24.12-alpine"
366370
prefix: "24.12"
367371
allow_failure: false
368-
- tag: "25.2-alpine"
369-
prefix: "25.2"
370-
allow_failure: false
371372
- tag: "latest-alpine"
372373
prefix: ""
373-
# ClickHouse can make new releases at any time, which might break our tests.
374-
# We allow this job to fail to avoid blocking CI whenever this happens.
375-
# However, we'll still want to fix the failing tests soon after we notice the failure
376-
allow_failure: true
374+
allow_failure: false
377375

378376
steps:
379377
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -517,6 +515,7 @@ jobs:
517515
OPENAI_API_KEY: not_used
518516
FIREWORKS_API_KEY: not_used
519517
FIREWORKS_ACCOUNT_ID: not_used
518+
TOGETHER_API_KEY: not_used
520519
TENSORZERO_USE_MOCK_INFERENCE_PROVIDER: 1
521520
TENSORZERO_SKIP_LARGE_FIXTURES: 1
522521
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
@@ -581,6 +580,8 @@ jobs:
581580
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
582581
FIREWORKS_ACCOUNT_ID: ${{ secrets.FIREWORKS_ACCOUNT_ID }}
583582
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
583+
S3_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
584+
S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
584585

585586
# See 'ci/README.md' at the repository root for more details.
586587
check-all-general-jobs-passed:

.github/workflows/helm-publish.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# This workflow publishes the Helm chart to R2 when we tag a release.
2+
name: Publish Helm chart
3+
4+
on:
5+
workflow_dispatch:
6+
release:
7+
types: [released]
8+
9+
jobs:
10+
publish-helm-chart:
11+
name: Publish Helm chart to R2
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
# Required secrets:
16+
# - HELM_PUBLISH_ACCESS_KEY_ID: Cloudflare R2 access key ID
17+
# - HELM_PUBLISH_SECRET_ACCESS_KEY: Cloudflare R2 secret access key
18+
# Required variables:
19+
# - R2_ENDPOINT_URL: Cloudflare R2 endpoint URL (e.g., https://ACCOUNT_ID.r2.cloudflarestorage.com)
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Helm
25+
uses: azure/setup-helm@v4
26+
with:
27+
version: "latest"
28+
29+
- name: Extract version from Cargo.toml
30+
id: version
31+
run: |
32+
echo "=== Extracting version from Cargo.toml ==="
33+
echo "Current directory: $(pwd)"
34+
echo "Cargo.toml contents (first 30 lines):"
35+
head -30 Cargo.toml
36+
echo ""
37+
echo "Looking for version line..."
38+
# Extract version from Cargo.toml workspace.package section
39+
VERSION=$(grep -E '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
40+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
41+
echo "Extracted version: ${VERSION}"
42+
echo "========================="
43+
44+
- name: Update Chart.yaml version
45+
run: |
46+
cd examples/production-deployment-k8s-helm
47+
echo "=== Updating Chart.yaml ==="
48+
echo "Current directory: $(pwd)"
49+
echo ""
50+
echo "Chart.yaml BEFORE updates:"
51+
echo "----------------------------"
52+
cat Chart.yaml
53+
echo "----------------------------"
54+
echo ""
55+
# Update the version field in Chart.yaml
56+
sed -i "s/^version:.*/version: ${{ steps.version.outputs.VERSION }}/" Chart.yaml
57+
# Update the appVersion field in Chart.yaml to match
58+
sed -i "s/^appVersion:.*/appVersion: \"${{ steps.version.outputs.VERSION }}\"/" Chart.yaml
59+
echo "Chart.yaml AFTER updates:"
60+
echo "----------------------------"
61+
cat Chart.yaml
62+
echo "----------------------------"
63+
echo "========================="
64+
65+
- name: Package Helm chart
66+
run: |
67+
cd examples/production-deployment-k8s-helm
68+
echo "=== Packaging Helm chart ==="
69+
echo "Current directory: $(pwd)"
70+
echo ""
71+
echo "Files in directory before packaging:"
72+
ls -la
73+
echo ""
74+
helm package .
75+
echo ""
76+
echo "Files in directory after packaging:"
77+
ls -la
78+
echo ""
79+
echo "Package details:"
80+
for pkg in tensorzero-*.tgz; do
81+
if [ -f "$pkg" ]; then
82+
echo " Package: $pkg"
83+
echo " Size: $(ls -lh $pkg | awk '{print $5}')"
84+
echo " MD5: $(md5sum $pkg | awk '{print $1}')"
85+
echo " SHA256: $(sha256sum $pkg | awk '{print $1}')"
86+
echo ""
87+
echo " Package contents:"
88+
tar -tzf "$pkg" | head -20
89+
echo " ..."
90+
fi
91+
done
92+
echo "========================="
93+
94+
- name: Configure AWS CLI for R2
95+
run: |
96+
echo "=== Configuring AWS CLI for R2 ==="
97+
echo "R2 endpoint: ${{ vars.R2_ENDPOINT_URL }}"
98+
aws configure set aws_access_key_id ${{ secrets.HELM_PUBLISH_ACCESS_KEY_ID }}
99+
aws configure set aws_secret_access_key ${{ secrets.HELM_PUBLISH_SECRET_ACCESS_KEY }}
100+
aws configure set default.region auto
101+
aws configure set default.s3.signature_version s3v4
102+
echo "AWS CLI configured"
103+
echo "========================="
104+
env:
105+
R2_ACCESS_KEY_ID: ${{ secrets.HELM_PUBLISH_ACCESS_KEY_ID }}
106+
R2_SECRET_ACCESS_KEY: ${{ secrets.HELM_PUBLISH_SECRET_ACCESS_KEY }}
107+
108+
- name: Download existing index.yaml
109+
continue-on-error: true
110+
run: |
111+
cd examples/production-deployment-k8s-helm
112+
echo "=== Downloading existing index.yaml from R2 ==="
113+
echo "Current directory: $(pwd)"
114+
echo "R2 endpoint: ${{ vars.R2_ENDPOINT_URL }}"
115+
echo ""
116+
# Try to download existing index.yaml from R2
117+
if aws s3 cp s3://tensorzero-helm-charts/index.yaml ./existing-index.yaml \
118+
--endpoint-url ${{ vars.R2_ENDPOINT_URL }}; then
119+
echo "Successfully downloaded existing index.yaml"
120+
echo ""
121+
echo "Existing index.yaml contents:"
122+
echo "----------------------------"
123+
cat existing-index.yaml
124+
echo "----------------------------"
125+
else
126+
echo "No existing index.yaml found (this is normal for first run)"
127+
fi
128+
echo "========================="
129+
130+
- name: Generate index.yaml
131+
run: |
132+
cd examples/production-deployment-k8s-helm
133+
echo "=== Generating index.yaml ==="
134+
echo "Current directory: $(pwd)"
135+
echo ""
136+
echo "Package files present:"
137+
ls -la tensorzero-*.tgz 2>/dev/null || echo "No package files found"
138+
echo ""
139+
if [ -f existing-index.yaml ]; then
140+
echo "Merging with existing index.yaml"
141+
helm repo index . --url https://helm.tensorzero.com --merge existing-index.yaml
142+
else
143+
echo "Creating new index.yaml (no existing index to merge)"
144+
helm repo index . --url https://helm.tensorzero.com
145+
fi
146+
echo ""
147+
echo "Generated index.yaml contents:"
148+
echo "----------------------------"
149+
cat index.yaml
150+
echo "----------------------------"
151+
echo ""
152+
echo "index.yaml file details:"
153+
echo " Size: $(ls -lh index.yaml | awk '{print $5}')"
154+
echo " Lines: $(wc -l < index.yaml)"
155+
echo " MD5: $(md5sum index.yaml | awk '{print $1}')"
156+
echo "========================="
157+
158+
- name: Upload chart package to R2
159+
run: |
160+
cd examples/production-deployment-k8s-helm
161+
CHART_FILE=$(ls tensorzero-*.tgz)
162+
aws s3 cp ${CHART_FILE} s3://tensorzero-helm-charts/${CHART_FILE} \
163+
--endpoint-url ${{ vars.R2_ENDPOINT_URL }}
164+
echo "Uploaded ${CHART_FILE} to R2"
165+
166+
- name: Upload index.yaml to R2
167+
run: |
168+
cd examples/production-deployment-k8s-helm
169+
aws s3 cp index.yaml s3://tensorzero-helm-charts/index.yaml \
170+
--endpoint-url ${{ vars.R2_ENDPOINT_URL }}
171+
echo "Uploaded index.yaml to R2"

0 commit comments

Comments
 (0)