Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
name: fmt + clippy + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
with:
components: rustfmt, clippy

- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3

- name: cargo fmt
run: cargo fmt --all -- --check
Expand All @@ -41,12 +41,12 @@ jobs:
name: docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Build image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
push: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/memory-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
name: memory before vs after
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

- name: Check out base
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base

- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable

- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
key: memory-bench

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0

- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Login to Docker Hub
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: appwrite/embedding
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=match,pattern=.*RC.*,group=0

- name: Build and push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ fastembed = "5.15.0"
futures = "0.3.32"
hf-hub = "0.5.0"
# Pinned to the ort fastembed uses so the CPU provider type matches.
ort = { version = "=2.0.0-rc.13", default-features = false, features = ["std"] }
ort = { version = "=2.0.0-rc.15", default-features = false, features = ["std"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the ort pin aligned with fastembed

fastembed's locked dependency is exactly ort rc.13, while this introduces rc.15; ExecutionProviderDispatch is therefore a different Rust type from the one expected by fastembed. The CPU provider built in execution_providers no longer type-checks, which explains the failed Rust and Docker builds.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Cargo.toml
Line: 12

Comment:
**Keep the `ort` pin aligned with fastembed**

`fastembed`'s locked dependency is exactly `ort` rc.13, while this introduces rc.15; `ExecutionProviderDispatch` is therefore a different Rust type from the one expected by fastembed. The CPU provider built in `execution_providers` no longer type-checks, which explains the failed Rust and Docker builds.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

🟠 Major · bug · Reply if this doesn't apply.

serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.145"
sysinfo = "0.39.2"
tokenizers = "0.22.2"
sysinfo = "0.40.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Cargo.lock with these dependency constraints

Cargo.lock is unchanged and still selects sysinfo 0.39.6, which does not satisfy this new 0.40.0 constraint. As a result, cargo build --locked (and frozen/locked builds that rely on the committed lockfile) fails because Cargo needs to update the lockfile; please include the regenerated lockfile.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Cargo.toml
Line: 15

Comment:
**Update Cargo.lock with these dependency constraints**

`Cargo.lock` is unchanged and still selects sysinfo 0.39.6, which does not satisfy this new 0.40.0 constraint. As a result, `cargo build --locked` (and frozen/locked builds that rely on the committed lockfile) fails because Cargo needs to update the lockfile; please include the regenerated lockfile.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

🟡 Minor · bug · Reply if this doesn't apply.

tokenizers = "0.23.0"
tokio = { version = "1.52.3", features = ["macros", "rt-multi-thread", "net", "signal", "time"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { version = "0.6", features = ["override_allocator_on_supported_platforms"] }
tikv-jemallocator = { version = "0.7", features = ["override_allocator_on_supported_platforms"] }

[dev-dependencies]
# HTTP client for examples/bench_memory.rs; already in the tree via hf-hub.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.7@sha256:a57df69d0ea827fb7266491f2813635de6f17269be881f696fbfdf2d83dda33e
# syntax=docker/dockerfile:1.29@sha256:572cebbc2b15e6f84c077742952674889cb63cd5e9b80abdffcbe587b6f19183

FROM rust:1.95-slim-trixie@sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0 AS builder
FROM rust:1.100-slim-trixie@sha256:24516ae4487ab804e3db145c93f7240e58e225587ab9b7c62ea31a218727bf67 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
Expand Down
Loading