From 3fe67235b526023776feff13810e0718b6f6434b Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Sat, 20 Dec 2025 13:00:36 +1100 Subject: [PATCH 1/2] PagerDuty: tweak signatures to match house style --- lib/Synergy/Reactor/PagerDuty.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Synergy/Reactor/PagerDuty.pm b/lib/Synergy/Reactor/PagerDuty.pm index 53efcb52..aa69845c 100644 --- a/lib/Synergy/Reactor/PagerDuty.pm +++ b/lib/Synergy/Reactor/PagerDuty.pm @@ -797,7 +797,7 @@ sub _check_long_maint ($self) { })->retain; } -sub _oncall_tree($self) { +sub _oncall_tree ($self) { my %should_ignore = map {; $_ => 1 } $self->suppressed_user_ids; @@ -952,7 +952,7 @@ sub _ack_all ($self, $event) { }); } -sub _resolve_incidents($self, $event, $arg) { +sub _resolve_incidents ($self, $event, $arg) { my $whose = $arg->{whose}; my $only_pending = $arg->{only_pending}; Carp::confess("_resolve_incidents called with bogus args") From d63f70d59c091014cbc2ceb212dd77c3e4e97609 Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Sat, 20 Dec 2025 13:04:34 +1100 Subject: [PATCH 2/2] PagerDuty: update fewer events at once We couldn't resolve all our open incidents once, because we produced a 285-incident update and PagerDuty said "payload too large". It looks like PagerDuty has reduced their limit from 500 to 250, according to their docs. --- lib/Synergy/Reactor/PagerDuty.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Synergy/Reactor/PagerDuty.pm b/lib/Synergy/Reactor/PagerDuty.pm index aa69845c..2fef283f 100644 --- a/lib/Synergy/Reactor/PagerDuty.pm +++ b/lib/Synergy/Reactor/PagerDuty.pm @@ -912,9 +912,8 @@ sub _update_status_for_incidents ($self, $who, $status, $incident_ids) { my @todo = @$incident_ids; my @incidents; - # *Surely* we won't have more than 500 at a time, right? Right?! Anyway, - # 500 is the PagerDuty max for this endpoint. - while (my @ids = splice @todo, 0, 500) { + # The PagerDuty API will reject updates for over 250 items. + while (my @ids = splice @todo, 0, 250) { my @put = map {; +{ id => $_,