Question about pw-ci behavior
Aaron Conole
aconole at redhat.com
Tue Dec 9 16:07:22 CET 2025
Aaron Conole <aconole at redhat.com> writes:
> Ali Alnubani <alialnu at nvidia.com> writes:
>
>> Hello Aaron,
>>
>> I wanted to share some more statistics,
>>
>> I see that requests with the pw-ci user agent are making 3,200–4,200
>> requests per hour (approximately 50–70 requests per minute).
>> This volume appears excessive and places strain on the Patchwork server.
>>
>> Would you be able to check if polling frequency can be adjusted?
>
> I'm adding a few things. NOTE that pw-ci marks the series as done when
> the states are 'finished' in the status details. But for example the
> listed series is still in a 'valid' state for polling.
>
> I'm going to set it to mark for superceding the patches that are expired
> by 30 days. That should reduce the polling here. Just had to deal with
> a different issue on redirects with a different patchwork server (so I
> added some new code).
>
BTW, following is the patch I'm testing out right now just for the 'old'
ones:
diff --git a/pw_mon b/pw_mon
index 06457ee..d3154bc 100755
--- a/pw_mon
+++ b/pw_mon
@@ -173,11 +173,27 @@ function check_new_series() {
function check_completed_series() {
get_uncompleted_jobs_as_line "$pw_instance" "$pw_project" | while IFS=\| read -r id url submitter_name submitter_email; do
echo "Checking on series: $id"
- local RESPONSE=$(run_curl -A "(pw-ci) pw-mon-${PROJECT}" -s "$url" | jq -rc '.received_all')
+ local JSON=$(run_curl -A "(pw-ci) pw-mon-cc-${pw_project}" -s "$url")
+ local RESPONSE=$(echo "$JSON" | jq -rc '.received_all')
if [ "$RESPONSE" = "true" ]; then
echo "Setting series $id to completed"
series_id_set_complete "$pw_instance" "$id"
fi
+
+ # Should it be superseded based on a patch detail:
+ local last_patch_url=$(echo "$JSON" | jq -rc '.patches[-1].url')
+ local patch_state=$(run_curl -A "(pw-ci) pw-mon-csp-${PROJECT}" -s "$last_patch_url" | jq -rc '.state')
+
+ # now check to see if the patch should even be reported...
+ # This is for series that should be expired this way.
+ if [ "$patch_state" = "superseded" -o "$patch_state" = "rejected" -o "$patch_state" = "accepted" \
+ -o "$patch_state" = "changes-requested" -o "$patch_state" = "not-applicable" ]; then
+ # Clear the job
+ series_id_set_complete "$pw_instance" "$id"
+ series_clear_branch "$pw_instance" "$id"
+ set_synced_for_series "$id" "$pw_instance"
+ fi
+
done
return 0
}
---
More information about the ci
mailing list