Skip to content

Commit 711133c

Browse files
authored
Merge branch 'main' into revert-4479-bld-single-rust-dockerfile
2 parents 4305f2b + 38b5c1a commit 711133c

File tree

136 files changed

+4478
-789
lines changed

Some content is hidden

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

136 files changed

+4478
-789
lines changed

.github/actions/docker/action.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ runs:
2020
# https://github.com/docker/setup-qemu-action - for multiplatform builds
2121
- name: Set up QEMU
2222
uses: docker/setup-qemu-action@v2
23-
# https://github.com/docker/setup-buildx-action - for multiplatform builds
24-
- name: Set up Docker Buildx
25-
id: buildx
26-
uses: docker/setup-buildx-action@v2
2723
- name: Log in to the Github Container registry
2824
uses: docker/[email protected]
2925
with:

.github/actions/python/action.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,26 @@ inputs:
88
runs:
99
using: "composite"
1010
steps:
11-
11+
- name: Install uv
12+
uses: astral-sh/setup-uv@v6
13+
with:
14+
enable-cache: true
1215
- name: Set up Python 3.9 for protos
1316
uses: useblacksmith/setup-python@v6
1417
# NOTE(hammadb) Blacksmith does not support windows, so we use the official action for windows and
1518
# skip it on other platforms
1619
if: runner.os != 'Windows'
1720
with:
1821
python-version: "3.9"
19-
cache: "pip"
20-
cache-dependency-path: "requirements*.txt"
2122
- name: Set up Python 3.9 for protos (Windows)
2223
if: runner.os == 'Windows'
2324
uses: actions/setup-python@v5
2425
with:
2526
python-version: "3.9"
26-
cache: "pip"
27-
cache-dependency-path: "requirements*.txt"
2827

2928
- name: Install proto dependencies
3029
run: |
31-
python -m pip install grpcio==1.58.0 grpcio-tools==1.58.0
30+
uv pip install --system grpcio==1.58.0 grpcio-tools==1.58.0
3231
shell: bash
3332
- name: Generate Proto Files
3433
if: runner.os != 'Windows'
@@ -40,30 +39,24 @@ runs:
4039
shell: cmd
4140
- name: Uninstall proto dependencies
4241
run: |
43-
python -m pip uninstall -y grpcio grpcio-tools
42+
uv pip uninstall --system grpcio grpcio-tools
4443
shell: bash
4544
- name: Set up Python ${{ inputs.python-version }}
4645
uses: useblacksmith/setup-python@v6
4746
with:
4847
python-version: ${{ inputs.python-version }}
49-
cache: "pip"
50-
cache-dependency-path: "requirements*.txt"
5148
- name: Set up Python ${{ inputs.python-version }} (Windows)
5249
if: runner.os == 'Windows'
5350
uses: actions/setup-python@v5
5451
with:
5552
python-version: ${{ inputs.python-version }}
56-
cache: "pip"
57-
cache-dependency-path: "requirements*.txt"
5853
- name: Install dependencies
5954
run: |
60-
python -m pip install -r requirements.txt && python -m pip install -r requirements_dev.txt
55+
uv pip install --system -r requirements.txt -r requirements_dev.txt
6156
shell: bash
6257
- name: Install protobuf compiler (protoc) - Linux
6358
if: runner.os != 'Windows'
6459
run: |
65-
sudo apt-get update
66-
sudo apt-get install -y wget unzip
6760
wget https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip
6861
sudo unzip protoc-28.2-linux-x86_64.zip -d /usr/local/
6962
sudo rm protoc-28.2-linux-x86_64.zip

.github/actions/rust/action.yaml

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,31 @@ inputs:
77
runs:
88
using: "composite"
99
steps:
10-
- name: Setup Rust
10+
- name: Cache Rust toolchain
11+
id: cache-rustup
12+
uses: useblacksmith/cache@v5
13+
if: ${{ runner.os != 'windows' }}
14+
with:
15+
path: ~/.rustup
16+
key: toolchain-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('rust-toolchain.toml') }}
17+
- name: Install Rust toolchain
18+
if: ${{ steps.cache-rustup.outputs.cache-hit != 'true' }}
19+
uses: actions-rust-lang/setup-rust-toolchain@v1
20+
with:
21+
cache: false # we use Blacksmith's cache package below
22+
- name: Set channel in rust-toolchain.toml as default
1123
shell: bash
12-
# (reads from rust-toolchain.toml)
13-
run: |
14-
rustup --version
15-
rustup toolchain install 1.81.0
16-
rustup default 1.81.0
17-
# Needed for sccache to work on Windows
18-
- name: Set default toolchain to rust-toolchain.toml on Windows
19-
if: runner.os == 'Windows'
20-
shell: pwsh
2124
run: |
22-
# Read the file content as a single string
23-
$toolchainToml = Get-Content .\rust-toolchain.toml -Raw
24-
25-
# Use regex to match the line 'channel = "<something>"'
26-
if ($toolchainToml -match 'channel\s*=\s*"([^"]+)"') {
27-
$channel = $matches[1]
28-
Write-Host "Setting Rust default channel to: $channel"
29-
rustup default $channel
30-
} else {
31-
Write-Error "Could not parse 'channel' from rust-toolchain.toml"
32-
exit 1
33-
}
25+
rustup default $(grep -m1 '^channel' rust-toolchain.toml | cut -d'"' -f2)
3426
- name: Install Protoc
3527
uses: arduino/setup-protoc@v3
3628
with:
3729
repo-token: ${{ inputs.github-token }}
38-
- name: Use sccache
39-
uses: mozilla-actions/[email protected]
40-
- name: Enable sccache
41-
shell: bash
42-
run: |
43-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
44-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
30+
- name: Set up cache
31+
uses: useblacksmith/rust-cache@v3
32+
if: ${{ runner.os != 'windows' }}
33+
- name: Set up cache (Windows)
34+
uses: Swatinem/rust-cache@v2
35+
if: ${{ runner.os == 'windows' }}
4536
- name: Setup Nextest
4637
uses: taiki-e/install-action@nextest

.github/actions/tilt/action.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,34 @@ runs:
66
- name: Install Tilt
77
shell: bash
88
run: |
9-
TILT_VERSION="0.33.3"
9+
TILT_VERSION="0.34.2"
1010
curl -fsSL https://github.com/tilt-dev/tilt/releases/download/v$TILT_VERSION/tilt.$TILT_VERSION.linux.x86_64.tar.gz | \
1111
tar -xzv -C /usr/local/bin tilt
12-
- name: Install ctlptlc
13-
shell: bash
14-
run: |
15-
CTLPTL_VERSION="0.8.20"
16-
curl -fsSL https://github.com/tilt-dev/ctlptl/releases/download/v$CTLPTL_VERSION/ctlptl.$CTLPTL_VERSION.linux.x86_64.tar.gz | \
17-
tar -xzv -C /usr/local/bin ctlptl
1812
- name: Set up kind
13+
uses: Wandalen/[email protected]
14+
with:
15+
action: helm/kind-action@v1
16+
attempt_limit: 3
17+
attempt_delay: 2000
18+
with: |
19+
registry: true
20+
registry_name: my-registry
21+
registry_port: 5001
22+
registry_enable_delete: true
23+
- name: Add blacksmith registry mirror
1924
shell: bash
20-
run: ctlptl create cluster kind --registry=ctlptl-registry
25+
run: |
26+
REGISTRY_DIR="/etc/containerd/certs.d/docker.io"
27+
for node in $(kind get nodes -n chart-testing); do
28+
docker exec "${node}" mkdir -p "${REGISTRY_DIR}"
29+
cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"
30+
server = "http://192.168.127.1:5000"
31+
[host."http://192.168.127.1:5000"]
32+
capabilities = ["pull", "resolve"]
33+
EOF
34+
echo "Added registry mirror to ${node}:"
35+
docker exec "${node}" cat "${REGISTRY_DIR}/hosts.toml"
36+
done
2137
- name: Start Tilt
2238
shell: bash
2339
run: tilt ci

.github/workflows/_build_release_pypi.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ jobs:
117117
with:
118118
target: ${{ matrix.platform.target }}
119119
args: ${{ matrix.platform.os == 'linux' && '--zig' || '' }} --release --out dist
120-
sccache: "true"
121120
container: "off"
122121

123122
- name: Upload wheels

.github/workflows/_python-tests.yml

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,9 @@ jobs:
4545
uses: PyO3/maturin-action@v1
4646
with:
4747
command: build
48-
sccache: true
4948
- name: Install built wheel
5049
shell: bash
5150
run: pip install --no-index --find-links target/wheels/ chromadb
52-
- name: Configure pytest to upload results to Datadog
53-
uses: datadog/test-visibility-github-action@v2
54-
# This action currently fails on Windows (https://github.com/DataDog/test-visibility-github-action/issues/36)
55-
if: ${{ !contains(matrix.platform, 'windows') }}
56-
with:
57-
languages: python
58-
api_key: ${{ secrets.DD_API_KEY }}
59-
site: ${{ vars.DD_SITE }}
6051
- name: Test
6152
run: python -m pytest ${{ matrix.test-globs }} ${{ matrix.parallelized && '-n auto --dist worksteal' || '' }} -v --color=yes --durations 10
6253
shell: bash
@@ -93,14 +84,6 @@ jobs:
9384
uses: ./.github/actions/rust
9485
with:
9586
github-token: ${{ github.token }}
96-
- name: Configure pytest to upload results to Datadog
97-
uses: datadog/test-visibility-github-action@v2
98-
# This action currently fails on Windows (https://github.com/DataDog/test-visibility-github-action/issues/36)
99-
if: ${{ !contains(matrix.platform, 'windows') }}
100-
with:
101-
languages: python
102-
api_key: ${{ secrets.DD_API_KEY }}
103-
site: ${{ vars.DD_SITE }}
10487
- name: Rust Integration Test
10588
run: bin/rust-integration-test.sh ${{ matrix.test-globs }}
10689
shell: bash
@@ -129,14 +112,6 @@ jobs:
129112
uses: ./.github/actions/rust
130113
with:
131114
github-token: ${{ github.token }}
132-
- name: Configure pytest to upload results to Datadog
133-
uses: datadog/test-visibility-github-action@v2
134-
# This action currently fails on Windows (https://github.com/DataDog/test-visibility-github-action/issues/36)
135-
if: ${{ !contains(matrix.platform, 'windows') }}
136-
with:
137-
languages: python
138-
api_key: ${{ secrets.DD_API_KEY }}
139-
site: ${{ vars.DD_SITE }}
140115
- name: Test
141116
run: bin/rust-integration-test.sh ${{ matrix.test-globs }}
142117
shell: bash
@@ -161,7 +136,8 @@ jobs:
161136
"chromadb/test/property/test_embeddings.py",
162137
"chromadb/test/property/test_collections_with_database_tenant.py",
163138
"chromadb/test/property/test_collections_with_database_tenant_overwrite.py",
164-
"chromadb/test/distributed/test_sanity.py"]
139+
"chromadb/test/distributed/test_sanity.py",
140+
"chromadb/test/distributed/test_log_failover.py"]
165141
runs-on: ${{ matrix.platform }}
166142
# OIDC token auth for AWS
167143
permissions:
@@ -172,16 +148,8 @@ jobs:
172148
- uses: ./.github/actions/python
173149
with:
174150
python-version: ${{ matrix.python }}
175-
# TODO(adityamaru): Add Datadog test visibility when running in Chroma's repo.
176-
# - name: Configure pytest to upload results to Datadog
177-
# uses: datadog/test-visibility-github-action@v2
178-
# with:
179-
# languages: python
180-
# api_key: ${{ secrets.DD_API_KEY }}
181-
# site: ${{ vars.DD_SITE }}
182-
- uses: useblacksmith/[email protected]
183-
with:
184-
setup-only: true
151+
- name: Set up Docker
152+
uses: ./.github/actions/docker
185153
- uses: ./.github/actions/tilt
186154
- name: Test
187155
run: bin/cluster-test.sh bash -c 'python -m pytest "${{ matrix.test-globs }}"' --durations 10
@@ -233,18 +201,9 @@ jobs:
233201
uses: PyO3/maturin-action@v1
234202
with:
235203
command: build
236-
sccache: true
237204
- name: Install built wheel
238205
shell: bash
239206
run: pip install --no-index --find-links target/wheels/ chromadb
240-
- name: Configure pytest to upload results to Datadog
241-
uses: datadog/test-visibility-github-action@v2
242-
# This action currently fails on Windows (https://github.com/DataDog/test-visibility-github-action/issues/36)
243-
if: ${{ !contains(matrix.platform, 'windows') }}
244-
with:
245-
languages: python
246-
api_key: ${{ secrets.DD_API_KEY }}
247-
site: ${{ vars.DD_SITE }}
248207
- name: Test
249208
run: python -m pytest ${{ matrix.test-globs }} --durations 10
250209
shell: bash
@@ -278,18 +237,9 @@ jobs:
278237
uses: PyO3/maturin-action@v1
279238
with:
280239
command: build
281-
sccache: true
282240
- name: Install built wheel
283241
shell: bash
284242
run: pip install --no-index --find-links target/wheels/ chromadb
285-
- name: Configure pytest to upload results to Datadog
286-
uses: datadog/test-visibility-github-action@v2
287-
# This action currently fails on Windows (https://github.com/DataDog/test-visibility-github-action/issues/36)
288-
if: ${{ !contains(matrix.platform, 'windows') }}
289-
with:
290-
languages: python
291-
api_key: ${{ secrets.DD_API_KEY }}
292-
site: ${{ vars.DD_SITE }}
293243
- name: Integration Test
294244
run: python -m pytest ${{ matrix.test-globs }}
295245
shell: bash

.github/workflows/_rust-tests.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ jobs:
2323
run: cargo build --bin chroma
2424
- name: Test
2525
run: cargo nextest run --no-capture --profile ci
26-
# TODO(adityamaru): Add Datadog test visibility when running in Chroma's repo.
27-
# - name: Upload test results
28-
# uses: datadog/junit-upload-github-action@v1
29-
# with:
30-
# api_key: ${{ secrets.DD_API_KEY }}
31-
# site: ${{ vars.DD_SITE }}
32-
# service: chroma
33-
# files: target/nextest/ci/junit.xml
34-
# logs: true
3526
test-long:
3627
runs-on: blacksmith-4vcpu-ubuntu-2204
3728
env:
@@ -48,15 +39,6 @@ jobs:
4839
run: cargo build --bin chroma
4940
- name: Test
5041
run: cargo nextest run --no-capture --profile ci_long_running
51-
# TODO(adityamaru): Add Datadog test visibility when running in Chroma's repo.
52-
# - name: Upload test results
53-
# uses: datadog/junit-upload-github-action@v1
54-
# with:
55-
# api_key: ${{ secrets.DD_API_KEY }}
56-
# site: ${{ vars.DD_SITE }}
57-
# service: chroma
58-
# files: target/nextest/ci/junit.xml
59-
# logs: true
6042

6143
test-integration:
6244
strategy:
@@ -85,15 +67,6 @@ jobs:
8567
run: cargo build --bin chroma
8668
- name: Run tests
8769
run: cargo nextest run --profile ci_k8s_integration
88-
# TODO(adityamaru): Add Datadog test visibility when running in Chroma's repo.
89-
# - name: Upload test results
90-
# uses: datadog/junit-upload-github-action@v1
91-
# with:
92-
# api_key: ${{ secrets.DD_API_KEY }}
93-
# site: ${{ vars.DD_SITE }}
94-
# service: chroma
95-
# files: target/nextest/ci/junit.xml
96-
# logs: true
9770
- name: Save service logs to artifact
9871
if: always()
9972
uses: ./.github/actions/export-tilt-logs

.github/workflows/release-chromadb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
// - This workflow finishes for A and deploys A to Chroma Cloud
221221
// Chroma Cloud is now running A, but the last commit was B.
222222
"environment": "staging",
223-
"planes": "data,control"
223+
"planes": "control,data"
224224
}
225225
})
226226

.github/workflows/trigger-deploy.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ on:
55
push:
66
branches:
77
# main is not included here because it is handled by the release-chromadb.yaml workflow
8+
# production deploys (release branches) are also not here because they are currently
9+
# meant to be handled manually.
810
- rc/**-**-**
9-
- release/**-**-**
1011

1112
jobs:
1213
deploy:
@@ -25,7 +26,7 @@ jobs:
2526
ref: 'main',
2627
inputs: {
2728
'planes': 'control,data',
28-
environment: '${{ contains(github.ref, 'release/') && 'production' || 'staging' }}',
29+
environment: 'staging',
2930
'ignore-lock': true,
3031
'oss-ref': '${{ github.ref_name }}',
3132
'hosted-ref': '${{ github.ref_name }}'

0 commit comments

Comments
 (0)