eve-browser-network: the headless deadline starts at its command
The headless C# client armed a 45 s deadline as soon as its lease was up,
but the orchestrator then runs the whole browser scenario (Chromium launch,
two clicks, provider and Odin replacement, page reconnect) before it sends
INVOKE. On ubuntu runners that scenario alone takes most of the budget: the
last green run finished with little to spare, and since 2dc7c122 the ubuntu
onboarding job has timed out in the headless process either before the
receipt or during the post-receipt benchmark.
The orchestrator already bounds each step it waits on, and closing stdin
ends the headless wait for its command. The headless process now bounds only
its own work: the 45 s deadline covers the invoke, convergence and benchmark
after INVOKE arrives.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9b4167d9ab
commit
04c0171bcc
1 changed files with 5 additions and 0 deletions
|
|
@ -244,11 +244,13 @@ static async Task RunHeadlessAsync(Args arguments)
|
|||
Console.WriteLine("HEADLESS_READY " + JsonSerializer.Serialize(new { count = initial.Count }));
|
||||
}
|
||||
if (initial.Count >= arguments.ExpectedCount) completion.TrySetResult();
|
||||
var commandReceived = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
var commandTask = Task.Run(async () =>
|
||||
{
|
||||
var line = await Console.In.ReadLineAsync();
|
||||
if (line == null || !line.StartsWith("INVOKE ", StringComparison.Ordinal))
|
||||
throw new InvalidOperationException("The headless sample expected 'INVOKE <idempotency-key>' on stdin.");
|
||||
commandReceived.TrySetResult();
|
||||
var commandId = line["INVOKE ".Length..].Trim();
|
||||
var result = await mesh.InvokeAsync<IncrementRequest, IncrementReceipt>(
|
||||
target,
|
||||
|
|
@ -268,6 +270,9 @@ static async Task RunHeadlessAsync(Args arguments)
|
|||
Console.WriteLine("HEADLESS_NETWORK_BENCHMARK " + JsonSerializer.Serialize(
|
||||
await MeasureOperationSessionAsync(mesh, target, arguments)));
|
||||
});
|
||||
// How long the caller takes to send the command is the caller's to bound
|
||||
// (closing stdin ends the wait); this process bounds only its own work.
|
||||
await Task.WhenAny(commandReceived.Task, commandTask);
|
||||
await Task.WhenAll(completion.Task, commandTask).WaitAsync(TimeSpan.FromSeconds(45));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue