Skip to content

Commit 10a031b

Browse files
HammadBblacksmith-sh[bot]adityamaru
authored
[BLD] Switch to blacksmith runners (#4337)
## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - This builds on #4312 but adds conditionality for windows runners on GH - New functionality - None ## Test plan *How are these changes tested?* These are tests - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes None --------- Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]>
1 parent 75d17e6 commit 10a031b

23 files changed

+143
-117
lines changed

.github/actions/go/action.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ description: "This action sets up Go"
33
runs:
44
using: "composite"
55
steps:
6+
- uses: useblacksmith/setup-go@v6
7+
# NOTE(hammadb) Blacksmith does not support windows, so we use the official action for windows and
8+
# skip it on other platforms
9+
if: runner.os != 'Windows'
10+
with:
11+
cache-dependency-path: go/go.sum
12+
613
- uses: actions/setup-go@v5
14+
if: runner.os == 'Windows'
715
with:
816
cache-dependency-path: go/go.sum
917

.github/actions/python/action.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,24 @@ inputs:
88
runs:
99
using: "composite"
1010
steps:
11+
1112
- name: Set up Python 3.9 for protos
13+
uses: useblacksmith/setup-python@v6
14+
# NOTE(hammadb) Blacksmith does not support windows, so we use the official action for windows and
15+
# skip it on other platforms
16+
if: runner.os != 'Windows'
17+
with:
18+
python-version: "3.9"
19+
cache: "pip"
20+
cache-dependency-path: "requirements*.txt"
21+
- name: Set up Python 3.9 for protos (Windows)
22+
if: runner.os == 'Windows'
1223
uses: actions/setup-python@v5
1324
with:
1425
python-version: "3.9"
1526
cache: "pip"
1627
cache-dependency-path: "requirements*.txt"
28+
1729
- name: Install proto dependencies
1830
run: |
1931
python -m pip install grpcio==1.58.0 grpcio-tools==1.58.0
@@ -31,6 +43,13 @@ runs:
3143
python -m pip uninstall -y grpcio grpcio-tools
3244
shell: bash
3345
- name: Set up Python ${{ inputs.python-version }}
46+
uses: useblacksmith/setup-python@v6
47+
with:
48+
python-version: ${{ inputs.python-version }}
49+
cache: "pip"
50+
cache-dependency-path: "requirements*.txt"
51+
- name: Set up Python ${{ inputs.python-version }} (Windows)
52+
if: runner.os == 'Windows'
3453
uses: actions/setup-python@v5
3554
with:
3655
python-version: ${{ inputs.python-version }}

.github/actions/rust/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
# (reads from rust-toolchain.toml)
1313
run: |
1414
rustup --version
15-
rustup toolchain install
15+
rustup toolchain install 1.81.0
1616
# Needed for sccache to work on Windows
1717
- name: Set default toolchain to rust-toolchain.toml on Windows
1818
if: runner.os == 'Windows'

.github/actions/tilt/action.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Start Tilt services
22
description: "This action starts Tilt services"
3-
inputs:
4-
depot-project-id:
5-
description: "Depot project ID"
6-
required: true
73
runs:
84
using: "composite"
95
steps:
@@ -25,8 +21,6 @@ runs:
2521
- name: Start Tilt
2622
shell: bash
2723
run: tilt ci
28-
env:
29-
DEPOT_PROJECT_ID: ${{ inputs.depot-project-id }}
3024
- name: Forward ports
3125
shell: bash
3226
run: |

.github/workflows/_build_js_bindings.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
version: 9
2525
run_install: false
2626
- name: Setup node
27-
uses: actions/setup-node@v4
27+
uses: useblacksmith/setup-node@v5
2828
with:
2929
node-version: 20
3030
cache: pnpm
@@ -72,7 +72,7 @@ jobs:
7272
name: bindings-x86_64-apple-darwin
7373
path: rust/js_bindings/chromadb-js-bindings.darwin-x64.node
7474
if-no-files-found: error
75-
75+
7676
build-windows:
7777
name: Build Windows bindings
7878
runs-on: windows-latest
@@ -87,7 +87,7 @@ jobs:
8787
version: 9
8888
run_install: false
8989
- name: Setup node
90-
uses: actions/setup-node@v4
90+
uses: useblacksmith/setup-node@v5
9191
with:
9292
node-version: 20
9393
cache: pnpm
@@ -125,10 +125,10 @@ jobs:
125125
name: bindings-x86_64-pc-windows-msvc
126126
path: rust/js_bindings/chromadb-js-bindings.win32-x64-msvc.node
127127
if-no-files-found: error
128-
128+
129129
build-linux:
130130
name: Build Linux bindings
131-
runs-on: depot-ubuntu-22.04-16
131+
runs-on: blacksmith-16vcpu-ubuntu-2204
132132
defaults:
133133
run:
134134
working-directory: rust/js_bindings
@@ -140,7 +140,7 @@ jobs:
140140
version: 9
141141
run_install: false
142142
- name: Setup node
143-
uses: actions/setup-node@v4
143+
uses: useblacksmith/setup-node@v5
144144
with:
145145
node-version: 20
146146
cache: pnpm
@@ -221,7 +221,7 @@ jobs:
221221
version: 9
222222
run_install: false
223223
- name: Setup node
224-
uses: actions/setup-node@v4
224+
uses: useblacksmith/setup-node@v5
225225
with:
226226
node-version: 20
227227
cache: pnpm
@@ -241,12 +241,12 @@ jobs:
241241
run: |
242242
set -e
243243
npm config set provenance true
244-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
244+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
245245
for dir in npm/*; do
246246
if [ -d "$dir" ]; then
247247
cd "$dir" && npm publish --access public && cd -
248248
fi
249249
done
250250
env:
251251
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
252+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/_build_release_container.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ env:
3838
jobs:
3939
build:
4040
name: Build and publish container image
41-
runs-on: depot-ubuntu-22.04
41+
runs-on: blacksmith-4vcpu-ubuntu-2204
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@v4
@@ -51,8 +51,6 @@ jobs:
5151
ghcr-password: ${{ secrets.GITHUB_TOKEN }}
5252
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
5353
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
54-
- name: Set up Depot CLI
55-
uses: depot/setup-action@v1
5654
- name: Compute tags
5755
shell: bash
5856
id: compute_tags
@@ -65,7 +63,7 @@ jobs:
6563
echo "tags=${tags}" >> $GITHUB_OUTPUT
6664
6765
- name: Build and push image
68-
uses: depot/build-push-action@v1
66+
uses: useblacksmith/build-push-action@v1.1
6967
with:
7068
context: .
7169
file: rust/cli/Dockerfile
@@ -74,4 +72,3 @@ jobs:
7472
build-args: |
7573
RELEASE_MODE=1
7674
tags: ${{ steps.compute_tags.outputs.tags }}
77-
project: ${{ vars.DEPOT_PROJECT_ID }}

.github/workflows/_build_release_pypi.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ permissions:
4141
jobs:
4242
version:
4343
name: Resolve version
44-
runs-on: depot-ubuntu-22.04
44+
runs-on: blacksmith-4vcpu-ubuntu-2204
4545
outputs:
4646
version: ${{ steps.resolve_version.outputs.version }}
4747
steps:
@@ -65,11 +65,11 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
platform:
68-
- { os: linux, runner: depot-ubuntu-22.04, target: x86_64 }
69-
- { os: linux, runner: depot-ubuntu-22.04-arm, target: aarch64 }
68+
- { os: linux, runner: blacksmith-4vcpu-ubuntu-2204, target: x86_64 }
69+
- { os: linux, runner: blacksmith-4vcpu-ubuntu-2204-arm, target: aarch64 }
7070
- { os: windows, runner: windows-latest, target: x64 }
71-
- { os: macos, runner: depot-macos-14, target: x86_64 }
72-
- { os: macos, runner: depot-macos-14, target: aarch64 }
71+
- { os: macos, runner: macos-14, target: x86_64 }
72+
- { os: macos, runner: macos-14, target: aarch64 }
7373

7474
steps:
7575
- uses: actions/checkout@v4
@@ -81,14 +81,15 @@ jobs:
8181
# On Windows, we want to set up Python with the correct architecture
8282
- name: Set up Python on Windows
8383
if: ${{ matrix.platform.os == 'windows' }}
84+
# Blacksmith does not currently support windows, so we use the official action
8485
uses: actions/setup-python@v5
8586
with:
8687
python-version: 3.x
8788
architecture: ${{ matrix.platform.target }}
8889

8990
- name: Set up Python on non-Windows
9091
if: ${{ matrix.platform.os != 'windows' }}
91-
uses: actions/setup-python@v5
92+
uses: useblacksmith/setup-python@v6
9293
with:
9394
python-version: 3.x
9495

@@ -127,7 +128,7 @@ jobs:
127128

128129
sdist:
129130
name: build-sdist
130-
runs-on: depot-ubuntu-22.04
131+
runs-on: blacksmith-4vcpu-ubuntu-2204
131132
needs: version
132133
steps:
133134
- uses: actions/checkout@v4
@@ -170,7 +171,7 @@ jobs:
170171

171172
release:
172173
name: Release
173-
runs-on: ubuntu-22.04
174+
runs-on: blacksmith-4vcpu-ubuntu-2204
174175
if: ${{ inputs.publish_to_pypi || inputs.publish_to_test_pypi }}
175176
needs: [build, sdist]
176177
permissions:

.github/workflows/_go-tests.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55

66
jobs:
77
cluster-test:
8-
runs-on: "depot-ubuntu-22.04-16"
9-
# OIDC token auth for Depot & AWS
8+
runs-on: "blacksmith-16vcpu-ubuntu-2204"
9+
# OIDC token auth for AWS
1010
permissions:
1111
contents: read
1212
id-token: write
@@ -15,9 +15,10 @@ jobs:
1515
uses: actions/checkout@v4
1616
- name: Setup
1717
uses: ./.github/actions/go
18-
- uses: ./.github/actions/tilt
18+
- uses: useblacksmith/[email protected]
1919
with:
20-
depot-project-id: ${{ vars.DEPOT_PROJECT_ID }}
20+
setup-only: true
21+
- uses: ./.github/actions/tilt
2122
- run: bin/cluster-test.sh bash -c 'cd go && make test'
2223
- name: Save service logs to artifact
2324
if: always()

.github/workflows/_javascript-client-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
test:
8-
runs-on: depot-ubuntu-22.04
8+
runs-on: blacksmith-4vcpu-ubuntu-2204
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v4

.github/workflows/_python-tests.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
python: ${{fromJson(inputs.python_versions)}}
23-
platform: [depot-ubuntu-24.04-8, depot-windows-2022-8]
23+
platform: [blacksmith-8vcpu-ubuntu-2204, 16core-64gb-windows-latest]
2424
test-globs:
2525
- "--ignore-glob 'chromadb/test/property/*' --ignore-glob 'chromadb/test/stress/*' --ignore-glob 'chromadb/test/distributed/*'"
2626
- "chromadb/test/property --ignore-glob chromadb/test/property/test_cross_version_persist.py"
@@ -70,9 +70,7 @@ jobs:
7070
fail-fast: false
7171
matrix:
7272
python: ${{fromJson(inputs.python_versions)}}
73-
# NOTE(hammadb): For some reason depot-windows fails so leaving default windows-latest
74-
# on chromadb/test/client/test_multiple_clients_concurrency.py::test_multiple_clients_concurrently
75-
platform: [depot-ubuntu-24.04, windows-latest]
73+
platform: [blacksmith-4vcpu-ubuntu-2204, windows-latest]
7674
test-globs: ["--ignore-glob 'chromadb/test/property/*' --ignore-glob 'chromadb/test/stress/*' --ignore='chromadb/test/test_cli.py' --ignore-glob 'chromadb/test/distributed/*'",
7775
"chromadb/test/property/test_add.py",
7876
"chromadb/test/property/test_collections.py",
@@ -83,7 +81,7 @@ jobs:
8381
"chromadb/test/property/test_persist.py",
8482
"chromadb/test/stress"]
8583
include:
86-
- platform: depot-ubuntu-24.04
84+
- platform: blacksmith-4vcpu-ubuntu-2204
8785
env-file: compose-env.linux
8886
runs-on: ${{ matrix.platform }}
8987
steps:
@@ -114,7 +112,7 @@ jobs:
114112
strategy:
115113
matrix:
116114
python: ${{fromJson(inputs.python_versions)}}
117-
platform: [depot-ubuntu-24.04, depot-windows-2022]
115+
platform: [blacksmith-4vcpu-ubuntu-2204, windows-latest]
118116
test-globs: ["chromadb/test/property/test_add.py",
119117
"chromadb/test/property/test_collections.py",
120118
"chromadb/test/property/test_collections_with_database_tenant.py",
@@ -152,7 +150,7 @@ jobs:
152150
fail-fast: false
153151
matrix:
154152
python: ${{fromJson(inputs.python_versions)}}
155-
platform: ["depot-ubuntu-22.04-4"]
153+
platform: ["blacksmith-16vcpu-ubuntu-2204"]
156154
test-globs: ["chromadb/test/api",
157155
"chromadb/test/api/test_collection.py",
158156
"chromadb/test/api/test_limit_offset.py",
@@ -164,7 +162,7 @@ jobs:
164162
"chromadb/test/property/test_collections_with_database_tenant_overwrite.py",
165163
"chromadb/test/distributed/test_sanity.py"]
166164
runs-on: ${{ matrix.platform }}
167-
# OIDC token auth for Depot & AWS
165+
# OIDC token auth for AWS
168166
permissions:
169167
contents: read
170168
id-token: write
@@ -173,15 +171,17 @@ jobs:
173171
- uses: ./.github/actions/python
174172
with:
175173
python-version: ${{ matrix.python }}
176-
- name: Configure pytest to upload results to Datadog
177-
uses: datadog/test-visibility-github-action@v2
174+
# TODO(adityamaru): Add Datadog test visibility when running in Chroma's repo.
175+
# - name: Configure pytest to upload results to Datadog
176+
# uses: datadog/test-visibility-github-action@v2
177+
# with:
178+
# languages: python
179+
# api_key: ${{ secrets.DD_API_KEY }}
180+
# site: ${{ vars.DD_SITE }}
181+
- uses: useblacksmith/[email protected]
178182
with:
179-
languages: python
180-
api_key: ${{ secrets.DD_API_KEY }}
181-
site: ${{ vars.DD_SITE }}
183+
setup-only: true
182184
- uses: ./.github/actions/tilt
183-
with:
184-
depot-project-id: ${{ vars.DEPOT_PROJECT_ID }}
185185
- name: Test
186186
run: bin/cluster-test.sh bash -c 'python -m pytest "${{ matrix.test-globs }}"' --durations 10
187187
shell: bash
@@ -200,7 +200,7 @@ jobs:
200200
artifact-name: ${{ steps.compute-artifact-name.outputs.artifact_name }}
201201

202202
merge-cluster-logs:
203-
runs-on: ubuntu-latest
203+
runs-on: blacksmith-4vcpu-ubuntu-2204
204204
needs: test-cluster-rust-frontend
205205
steps:
206206
- name: Merge
@@ -215,7 +215,7 @@ jobs:
215215
fail-fast: false
216216
matrix:
217217
python: ${{fromJson(inputs.python_versions)}}
218-
platform: [depot-ubuntu-24.04-16, depot-windows-2022-16]
218+
platform: [blacksmith-16vcpu-ubuntu-2204, 16core-64gb-windows-latest]
219219
test-globs: ["chromadb/test/stress"]
220220
runs-on: ${{ matrix.platform }}
221221
steps:
@@ -256,10 +256,10 @@ jobs:
256256
fail-fast: false
257257
matrix:
258258
python: ${{fromJson(inputs.python_versions)}}
259-
platform: [depot-ubuntu-24.04, windows-latest]
259+
platform: [blacksmith-4vcpu-ubuntu-2204, windows-latest]
260260
test-globs: ["chromadb/test/test_cli.py"]
261261
include:
262-
- platform: depot-ubuntu-24.04
262+
- platform: blacksmith-4vcpu-ubuntu-2204
263263
env-file: compose-env.linux
264264
- platform: windows-latest
265265
env-file: compose-env.windows

0 commit comments

Comments
 (0)