Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a 30 second sleep in mass_comment.py to avoid overwhelming Jenkins #25714

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions release/src/main/scripts/mass_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)


Expand Down
1 change: 1 addition & 0 deletions scripts/ci/release/comment_pr_trigger_phrases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ GITHUB_PR=$1
while IFS= read -r trigger_phrase
do
gh pr comment "$GITHUB_PR" --body "$trigger_phrase"
sleep 30
done <"$file"