Skip to content

Commit 64f4121

Browse files
Pin backlog flow-rate fields in operator metrics contract
Pin backlog flow-rate fields in operator metrics contract
1 parent 8f8e5f5 commit 64f4121

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

tests/Feature/ControlPlaneOperationalSuccessContractTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,17 @@ public static function operationalSuccessProvider(): array
174174
'generated_at',
175175
'runs',
176176
'tasks',
177-
'backlog',
177+
'backlog' => [
178+
'runnable_tasks',
179+
'delayed_tasks',
180+
'leased_tasks',
181+
'tasks_added_last_minute',
182+
'tasks_dispatched_last_minute',
183+
'unhealthy_tasks',
184+
'repair_needed_runs',
185+
'claim_failed_runs',
186+
'compatibility_blocked_runs',
187+
],
178188
'repair',
179189
'workers' => [
180190
'required_compatibility',

tests/Feature/SystemOperatorMetricsTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function test_operator_metrics_returns_full_snapshot_with_rollout_safety_
4343
$response->assertOk()
4444
->assertHeader(ControlPlaneProtocol::HEADER, ControlPlaneProtocol::VERSION)
4545
->assertJsonPath('namespace', 'default')
46+
->assertJsonPath('operator_metrics.backlog.tasks_added_last_minute', 0)
47+
->assertJsonPath('operator_metrics.backlog.tasks_dispatched_last_minute', 0)
4648
->assertJsonStructure([
4749
'namespace',
4850
'operator_metrics' => [
@@ -63,6 +65,8 @@ public function test_operator_metrics_returns_full_snapshot_with_rollout_safety_
6365
'runnable_tasks',
6466
'delayed_tasks',
6567
'leased_tasks',
68+
'tasks_added_last_minute',
69+
'tasks_dispatched_last_minute',
6670
'unhealthy_tasks',
6771
'repair_needed_runs',
6872
'claim_failed_runs',

0 commit comments

Comments
 (0)