From 6e0141fc3b66cb2943ccf2c0dc42d453f4f514a1 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Mon, 27 Apr 2026 20:35:09 -0700 Subject: [PATCH] fix(pegboard): use Iterator streaming mode in list_names so limit param is honored --- .../tests/envoy/api_actors_list_names.rs | 20 +++++++++---------- .../pegboard/src/ops/actor/list_names.rs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engine/packages/engine/tests/envoy/api_actors_list_names.rs b/engine/packages/engine/tests/envoy/api_actors_list_names.rs index 9f7ce62b38..906b425988 100644 --- a/engine/packages/engine/tests/envoy/api_actors_list_names.rs +++ b/engine/packages/engine/tests/envoy/api_actors_list_names.rs @@ -80,13 +80,13 @@ fn list_all_actor_names_in_namespace() { } #[test] -// Broken legacy Pegboard Runner test: full engine sweep timed out in -// `list_names_with_pagination`. -#[ignore = "list_names ignores limit param"] fn list_names_with_pagination() { common::run(common::TestOpts::new(1).with_timeout(30), |ctx| async move { - let (namespace, _, _runner) = - common::setup_test_namespace_with_envoy(ctx.leader_dc()).await; + let (namespace, _, _runner) = common::setup_test_namespace_with_envoy_for_names( + ctx.leader_dc(), + (0..9).map(|i| format!("actor-{:02}", i)).collect(), + ) + .await; // Create actors with many different names for i in 0..9 { @@ -404,13 +404,13 @@ fn list_names_alphabetical_sorting() { // MARK: Edge cases #[test] -// Broken legacy Pegboard Runner test: full engine sweep timed out in -// `list_names_default_limit_100`. -#[ignore = "list_names default limit not applied (returns 1)"] fn list_names_default_limit_100() { common::run(common::TestOpts::new(1).with_timeout(30), |ctx| async move { - let (namespace, _, _runner) = - common::setup_test_namespace_with_envoy(ctx.leader_dc()).await; + let (namespace, _, _runner) = common::setup_test_namespace_with_envoy_for_names( + ctx.leader_dc(), + (0..105).map(|i| format!("actor-{:03}", i)).collect(), + ) + .await; // Create 105 actors with different names to test the default limit of 100 for i in 0..105 { diff --git a/engine/packages/pegboard/src/ops/actor/list_names.rs b/engine/packages/pegboard/src/ops/actor/list_names.rs index e1823959ef..ebc664678f 100644 --- a/engine/packages/pegboard/src/ops/actor/list_names.rs +++ b/engine/packages/pegboard/src/ops/actor/list_names.rs @@ -40,7 +40,7 @@ pub async fn pegboard_actor_list_names(ctx: &OperationCtx, input: &Input) -> Res tx.get_ranges_keyvalues( universaldb::RangeOption { - mode: StreamingMode::Exact, + mode: StreamingMode::Iterator, limit: Some(input.limit), ..(start, end).into() },