From 492a9b8ec72343eb603c2f21f0d83db337f39d63 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 3 Mar 2023 09:50:25 -0500 Subject: [PATCH] Add a 30 second sleep in mass_comment.py to avoid overwhelming Jenkins --- release/src/main/scripts/mass_comment.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release/src/main/scripts/mass_comment.py b/release/src/main/scripts/mass_comment.py index 3d56225d90f6..99c1ac646d6e 100644 --- a/release/src/main/scripts/mass_comment.py +++ b/release/src/main/scripts/mass_comment.py @@ -17,8 +17,9 @@ """Script for mass-commenting Jenkins test triggers on a Beam PR.""" -import socket import requests +import socket +import time # This list can be found by querying the Jenkins API, see BEAM-13951 COMMENTS_TO_ADD = [ @@ -56,7 +57,6 @@ "Run Java Examples_Flink", "Run Java Examples_Spark", "Run Java Flink PortableValidatesRunner Streaming", - "Run Java Portability examples on Dataflow with Java 11", "Run Java PostCommit", "Run Java PreCommit", "Run Java Samza PortableValidatesRunner", @@ -223,6 +223,8 @@ def postComments(accessToken, subjectId): for commentBody in COMMENTS_TO_ADD: jsonData = fetchGHData(accessToken, subjectId, commentBody) + # Space out comments 30 seconds apart to avoid overwhelming Jenkins + time.sleep(30) print(jsonData)