Unverified Commit f849e1a6 authored by Yan Ru Pei's avatar Yan Ru Pei Committed by GitHub
Browse files

fix(kv-router): migrate raw zmq paths to libzmq and refresh lockfiles (#7871)


Signed-off-by: default avatarPeaBrane <yanrpei@gmail.com>
parent bfc59cd2
This diff is collapsed.
...@@ -29,8 +29,7 @@ anyhow = { workspace = true } ...@@ -29,8 +29,7 @@ anyhow = { workspace = true }
async-nats = { workspace = true } async-nats = { workspace = true }
async-stream = { workspace = true } async-stream = { workspace = true }
async-trait = { workspace = true } async-trait = { workspace = true }
async_zmq = { workspace = true } tmq = { workspace = true }
zmq = { workspace = true }
lru = { version = "0.12" } lru = { version = "0.12" }
axum = { workspace = true } axum = { workspace = true }
blake3 = { workspace = true } blake3 = { workspace = true }
......
This diff is collapsed.
This diff is collapsed.
...@@ -871,14 +871,14 @@ def _test_router_indexers_sync( ...@@ -871,14 +871,14 @@ def _test_router_indexers_sync(
router_event_threads=router_event_threads, router_event_threads=router_event_threads,
) )
# If standalone indexer mode, launch mockers one-by-one and register. # If standalone indexer mode, launch workers one-by-one and register.
# We need to create a temporary endpoint just to discover worker IDs. # We need to create a temporary endpoint just to discover worker IDs.
if standalone_indexer_url: if standalone_indexer_url:
tmp_runtime = get_runtime(store_backend, request_plane) tmp_runtime = get_runtime(store_backend, request_plane)
tmp_endpoint = tmp_runtime.endpoint( tmp_endpoint = tmp_runtime.endpoint(
f"{engine_workers.namespace}.{engine_workers.component_name}.generate" f"{engine_workers.namespace}.{engine_workers.component_name}.generate"
) )
await engine_workers.launch_mockers_with_indexer(tmp_endpoint) await engine_workers.launch_workers_with_indexer(tmp_endpoint)
async def send_requests_to_router(router, num_requests, router_name, endpoint): async def send_requests_to_router(router, num_requests, router_name, endpoint):
# Now send the actual requests # Now send the actual requests
...@@ -1511,10 +1511,10 @@ def _test_router_decisions( ...@@ -1511,10 +1511,10 @@ def _test_router_decisions(
# Create KvRouterConfig with lower snapshot threshold for testing # Create KvRouterConfig with lower snapshot threshold for testing
# Use async to manage the test flow # Use async to manage the test flow
async def test_sync(): async def test_sync():
# If standalone indexer mode, launch mockers one-by-one and register. # If standalone indexer mode, launch workers one-by-one and register.
# Must happen before KvRouter creation since KvRouter blocks until workers appear. # Must happen before KvRouter creation since KvRouter blocks until workers appear.
if standalone_indexer_url: if standalone_indexer_url:
await engine_workers.launch_mockers_with_indexer(endpoint) await engine_workers.launch_workers_with_indexer(endpoint)
# Workers register one instance per process (not per dp_rank) # Workers register one instance per process (not per dp_rank)
expected_num_instances = engine_workers.num_workers expected_num_instances = engine_workers.num_workers
......
...@@ -242,8 +242,10 @@ def run_indexers_sync_test( ...@@ -242,8 +242,10 @@ def run_indexers_sync_test(
block_size: int, block_size: int,
model_name: str, model_name: str,
num_workers: int, num_workers: int,
extra_process_kwargs: dict[str, Any] | None = None,
): ):
nats_process, _etcd_process = runtime_services_dynamic_ports nats_process, _etcd_process = runtime_services_dynamic_ports
process_kwargs = extra_process_kwargs or {}
with engine_process_cls( with engine_process_cls(
request, request,
...@@ -253,6 +255,7 @@ def run_indexers_sync_test( ...@@ -253,6 +255,7 @@ def run_indexers_sync_test(
store_backend=store_backend, store_backend=store_backend,
durable_kv_events=durable_kv_events, durable_kv_events=durable_kv_events,
**{engine_args_name: engine_args}, **{engine_args_name: engine_args},
**process_kwargs,
) as engine_workers: ) as engine_workers:
_test_router_indexers_sync( _test_router_indexers_sync(
engine_workers=engine_workers, engine_workers=engine_workers,
...@@ -264,4 +267,13 @@ def run_indexers_sync_test( ...@@ -264,4 +267,13 @@ def run_indexers_sync_test(
test_nats_interruption=not durable_kv_events, test_nats_interruption=not durable_kv_events,
nats_server=nats_process if not durable_kv_events else None, nats_server=nats_process if not durable_kv_events else None,
durable_kv_events=durable_kv_events, durable_kv_events=durable_kv_events,
standalone_indexer_url=getattr(
engine_workers, "standalone_indexer_url", None
),
standalone_indexer_b_url=getattr(
engine_workers, "standalone_indexer_b_url", None
),
test_zmq_replay=bool(
getattr(engine_workers, "standalone_indexer_url", None)
),
) )
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment