Repository navigation
test(ci): fix flaky matrix failures from image pulls, OTel timing and row order - #884
Open
vishal-bala wants to merge 2 commits into
Open
vishal-bala wants to merge 2 commits into
vishal-bala wants to merge 2 commits into
Conversation
Reruns of test.yml since late October came down to these, among others outside the code (runner losses, model-cache misses since fixed): - test_otel's cost check compared an absolute 25 us bound against loaded runners and failed at 25-73 us. It now compares against the same calls on the OTel API's no-op tracer and meter, in alternating batches, so load slows both alike: 1.3x idle and with every core busy, bound 3x. - Every xdist worker's redis_container fixture ran its own `docker compose pull`; when one failed, every test on that worker errored (1,600-2,000 per failure). CI now pulls the image once per job with retries and sets REDISVL_TEST_SKIP_PULL so the fixture doesn't pull. Local runs still pull. - test_resp3_aggregation compared RESP2 and RESP3 rows by position, but an unsorted FT.AGGREGATE has no row order. Rows are now compared as a sorted multiset. - The migration tests required documents_indexed_per_second, which is None when a small index is ready at the first poll and the millisecond timer reads 0. They now require a rate exactly when the duration is non-zero. Also formats test_voyageai_reranker_rank_by.py, unformatted on main, which the pre-commit hook otherwise rewrites.
…action Review fixes: - assert_results_equal compares rows in order again by default. Only the two unsorted test_aggregate_direct tests pass ordered=False; the hybrid and multi-vector queries add SORTBY, so their row order is part of RESP2/RESP3 parity. - The pull script moves beside the run-service-tests action and is called through $GITHUB_ACTION_PATH. The fork-PR workflow runs that action from a trusted checkout of .github/actions over the fork's own checkout, which may predate the script. - The script pulls through tests/docker-compose.yml, so it always pulls the image the fixture starts instead of keeping its own default. - A unit test pins _build_benchmark_summary's rate on both executors: a 0.5 s build of 2 docs gives 4.0, a 0.0 or missing duration gives None. The integration assertion relaxed in the previous commit can no longer catch a broken rate on its own.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
=======================================
Coverage 80.92% 80.92%
=======================================
Files 121 121
Lines 15000 15000
Branches 2632 2632
=======================================
+ Hits 12138 12139 +1
Misses 2212 2212
+ Partials 650 649 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
vishal-bala
marked this pull request as ready for review
December 4, 2026 09:30
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Matrix test jobs often fail and then pass on rerun. Over the last month, 18 jobs failed this way. This PR fixes the 11 failures whose cause is in the test code or CI configuration. The other seven were runner problems or HuggingFace model loading, and none has happened since the model caches were reworked on 25 November.
Changes
Pull the Redis image once per job
Every pytest-xdist worker ran its own
docker compose pullfrom theredis_containerfixture. All workers pulled at the same moment, so when one worker's pull failed, every test that worker ran afterwards errored: 1,600 to 2,000 errors per job. CI now runs.github/actions/run-service-tests/pull_redis_image.shfirst. It pulls throughtests/docker-compose.ymland retries twice. CI then setsREDISVL_TEST_SKIP_PULL=1so that the fixture skips its own pull. Local runs pull as before. The script lives beside the action because the fork-PR workflow runs that action from a trusted checkout that contains only.github/actions.Measure OpenTelemetry overhead relative to a no-op baseline
The OTel test asserted that an instrumented call takes under 25 µs; on busy runners it measured 25–73 µs. It now times the same calls on OpenTelemetry's
NoOpTracerandNoOpMeter, in alternating batches, and asserts that RedisVL's cost is under 3× that baseline.Ignore row order only where Redis does not define it
test_aggregate_directand its async twin runFT.AGGREGATEwith noSORTBYand compared rows by position. Those two tests now passordered=Falsetoassert_results_equal. The hybrid and multi-vector tests keep the ordered comparison, because their queries sort their rows.Allow a zero indexing time in the migration tests
A four-document index can finish building before the first status check. Its build time then rounds to 0.0 s, and the indexing rate is reported as
None. The migration tests now expect a rate only when the recorded duration is above zero. A new unit test pins_build_benchmark_summaryon both executors.Minor changes
tests/unit/test_voyageai_reranker_rank_by.pyis reformatted, because it was unformatted onmainand failed the pre-commit hook.AI Assistance
Claude Code (claude-opus-5-5): failure investigation, implementation, tests, pre-PR review and this description.
Reviewer Brief
Start here:
.github/actions/run-service-tests/pull_redis_image.shand thepull=argument intests/conftest.py. Together they decide whether the workers still race to pull the image.Where it could fail
.github/actions/run-service-tests/action.yml:106: in the fork-PR workflow,$GITHUB_ACTION_PATHmust resolve to the trusted copy of the script.test.ymlandaction.yml: open PR test(ci): run CI tests offline on four workers and replace fixed TTL sleeps (FDE-205) #882 edits the same steps. Whichever PR merges second must keepREDISVL_TEST_SKIP_PULLin those steps'env:blocks.Not verified: the fork-PR workflow, which runs only on manual dispatch; the OTel ratio on GitHub-hosted runners; the registry error behind the failed pulls, which testcontainers never prints.
Beyond CI: on an Apple M4 Pro, the OTel ratio measured 1.29–1.33×, both idle and with 24 CPU-bound processes running.
Reviewed
5ce1a786, fixes inb33169f5· Claude Code (claude-opus-5-5) · lenses: correctness, security, design, tests, docs, Redis behaviour