Repository navigation
Fix flaky tests - #2208
Open
databyjp wants to merge 17 commits into
Open
Fix flaky tests#2208databyjp wants to merge 17 commits into
databyjp wants to merge 17 commits into
Conversation
The 1.39 pin stayed at 1.39.0 after the 2026-08-11 version bump. Later 1.39 patches include backup reliability fixes, and test_hnsw_with_rq4c needs 1.39.2 or later to run at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
recipe_collection created and deleted a fixed collection name. Under pytest -n auto --dist loadgroup, the two tests that use it run on different workers at once and fail with 422 class already exists or 404. collection_factory names the collection after the test node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssip port start() took one random port for gossip and assumed the next three were free for the data, Raft, and Raft RPC ports. When one of them was taken, Weaviate exited at startup with "bind: address already in use" and the client reported a 30-second timeout (seen in CI on PR #2197). _get_cluster_ports() checks that gossip + 1 is free for the data port, which the server requires, and asks the OS for the Raft and Raft RPC ports. All probe sockets stay open until the four ports are chosen, so they are distinct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The embedded tests passed fixed HTTP and gRPC ports, several inside the Linux ephemeral port range. In CI, Weaviate exited at startup because another socket held the gRPC port (50040, 50150, 50152). Each test now asks for distinct ports that are free when chosen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The five integration jobs request Okta tokens for the same user at the same time and sometimes exceed its rate limit. _get_access_token now retries a 429 three times with 2, 4, and 8 second backoff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
This reverts commit 261c878. Weaviate 1.39.10 and later reject an empty alias name in role permissions, which fails test_create_role. The pin will return in a separate PR with that test fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With CLUSTER_IN_LOCALHOST, Weaviate dials a peer's RPC server at its Raft port + 1 and ignores RAFT_INTERNAL_RPC_PORT (cluster/resolver/rpc.go). Choosing the RPC port independently left nothing listening at Raft + 1, so the node never joined its own cluster and every embedded start timed out on Linux. macOS hands out sequential ports, which hid the bug locally. _get_cluster_ports() now holds two consecutive pairs: gossip/data and Raft/Raft RPC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2208 +/- ##
==========================================
+ Coverage 88.98% 89.04% +0.05%
==========================================
Files 308 309 +1
Lines 24396 24526 +130
==========================================
+ Hits 21709 21838 +129
- Misses 2687 2688 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Weaviate PR #13324 applies the collection-name rule to alias patterns, so 1.38.19+, 1.39.10+, and 1.40.0+ answer 422 "'' is not a valid alias name" where older servers stored an empty alias as "*". The empty-alias case moves out of test_create_role into its own test that expects whichever behaviour the server version has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores the pin removed in b0f9556, now that test_rbac.py handles the empty-alias validation added in 1.39.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PROFILING_PORT was still drawn from get_random_port() and released before _get_cluster_ports() ran, so a cluster port could land on the just-freed profiling port and Weaviate would exit at startup. Hold all five ports in one ExitStack (_get_server_ports) so the OS guarantees they are distinct. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Only the token POST backed off on 429; the discovery GET hits the same rate-limited provider and failed as a KeyError on token_endpoint. Route both requests through one backoff helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pinning the server's full error wording across three release branches fails the test on any rewording; matching "alias" keeps the intent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tsmith023
approved these changes
Oct 20, 2026
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.
Fix currently flaky tests
Fix flaky Embedded Weaviate tests:
integration_embedded/test_client.py:test/test_embedded.pyweaviate/embedded.py_hold_consecutive_ports) before assigningFix flaky tokenization test (
integration/test_tokenize.py):Move / refactor test for alias creation (
integration/test_rbac.py):test_create_role_with_empty_alias()containing old test & new test to see if empty alias name now raisesFix flaky auth test due to identity provider rate limit (
integration/test_auth.py):