Skip to content

Commit bc43d0e

Browse files
authored
Merge branch 'main' into dependabot/cargo/coordinode-embedded/cargo-cf5a7bf620
2 parents 07de544 + 2b55f8f commit bc43d0e

1 file changed

Lines changed: 37 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,35 @@ jobs:
1616
with:
1717
python-version: "3.11"
1818

19-
# --locked fails the job when uv.lock does not match pyproject, so CI
20-
# resolves exactly what a developer resolved rather than picking up a
21-
# newer release mid-run. --no-build installs from wheels only, which
22-
# keeps a dependency's setup.py from executing on the runner.
19+
# Plain `uv sync`, deliberately, on two counts.
2320
#
24-
# The editable workspace members install regardless: --no-build refuses
25-
# source distributions of dependencies, not a local editable install.
26-
# Verified both ways, since the flag reads as though it would block them:
27-
# a sync with an empty UV_CACHE_DIR into a fresh environment installs
28-
# coordinode, langchain-coordinode and llama-index-graph-stores-coordinode
29-
# and imports them, and every job below has run green with the flag on a
30-
# clean runner. Remove it only with evidence, not on the wording.
31-
- run: uv sync --locked --no-build
32-
- run: uv run --locked --no-build ruff check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/
33-
- run: uv run --locked --no-build ruff format --check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/
21+
# Resolving fresh is wanted on the pull requests where it actually
22+
# happens, which is not all of them. `uv sync` follows the committed lock
23+
# while that lock satisfies pyproject.toml, so an ordinary pull request
24+
# installs the locked versions. When a pull request moves dependency
25+
# metadata without regenerating the lock, uv resolves the new set and
26+
# these jobs exercise it. `--locked` would instead refuse to run and
27+
# report that the lock needs updating, which says nothing about whether
28+
# the new version works.
29+
#
30+
# The two flags tried here also break the release, and for one shared
31+
# reason: the release bumps the version in pyproject.toml and leaves
32+
# uv.lock naming the old one, so uv has to re-resolve.
33+
#
34+
# --locked fails on exactly that mismatch, reporting that the
35+
# lockfile needs to be updated.
36+
# --no-build fails because re-resolving means building this
37+
# workspace's own three packages, which are source rather
38+
# than wheels: "Building source distributions for
39+
# coordinode is disabled".
40+
#
41+
# Verified on the release branch with a cold cache: both fail there, and
42+
# both pass on that same branch once uv.lock carries the new version. So
43+
# restoring either one means first making the release regenerate the
44+
# lock, and even then it gives up the fresh resolution described above.
45+
- run: uv sync
46+
- run: uv run ruff check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/
47+
- run: uv run ruff format --check coordinode/ langchain-coordinode/ llama-index-coordinode/ tests/
3448

3549
test:
3650
name: Test (Python ${{ matrix.python-version }})
@@ -49,13 +63,13 @@ jobs:
4963
python-version: ${{ matrix.python-version }}
5064

5165
- name: Install dependencies
52-
run: uv sync --locked --no-build --all-packages
66+
run: uv sync --all-packages
5367

5468
- name: Generate proto stubs
55-
run: uv run --locked --no-build make proto
69+
run: uv run make proto
5670

5771
- name: Unit tests
58-
run: uv run --locked --no-build pytest tests/unit/ -v
72+
run: uv run pytest tests/unit/ -v
5973

6074
build-embedded:
6175
name: Build embedded (CI check)
@@ -83,7 +97,7 @@ jobs:
8397
- name: Install wheel + run embedded tests
8498
# The main `test` job skips coordinode_embedded with importorskip
8599
# because that runner doesn't build the wheel. This job has the
86-
# wheel install it and run the embedded tests here, then assert
100+
# wheel, so install it and run the embedded tests here, then assert
87101
# nothing was skipped (a skip with the wheel installed means a
88102
# broken manylinux glibc / missing numpy / etc., not the expected
89103
# "no wheel" condition).
@@ -116,7 +130,7 @@ jobs:
116130
exit 1
117131
fi
118132
if ! echo "$OUTPUT" | grep -qE '=+ [0-9]+ passed'; then
119-
echo "::error::No tests passed the module was likely not collected"
133+
echo "::error::No tests passed; the module was likely not collected"
120134
exit 1
121135
fi
122136
@@ -151,18 +165,18 @@ jobs:
151165
echo "coordinode is ready (attempt $i)"
152166
exit 0
153167
fi
154-
echo "Attempt $i/30 not ready yet, sleeping 5s..."
168+
echo "Attempt $i/30, not ready yet, sleeping 5s..."
155169
sleep 5
156170
done
157171
echo "Error: coordinode did not become healthy after 150s" >&2
158172
exit 1
159173
160174
- name: Install + generate proto
161175
run: |
162-
uv sync --locked --no-build --all-packages
163-
uv run --locked --no-build make proto
176+
uv sync --all-packages
177+
uv run make proto
164178
165179
- name: Integration tests
166180
env:
167181
COORDINODE_ADDR: "localhost:7080"
168-
run: uv run --locked --no-build pytest tests/integration/ -v --timeout=30
182+
run: uv run pytest tests/integration/ -v --timeout=30

0 commit comments

Comments
 (0)