Clip long summaries (#28401)

pull/28446/head
Craig Tiller 3 years ago committed by GitHub
parent 7aae5c66df
commit 27662173e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tools/run_tests/python_utils/check_on_pr.py

@ -130,6 +130,12 @@ def check_on_pr(name, summary, success=True):
if 'KOKORO_GITHUB_PULL_REQUEST_NUMBER' not in os.environ:
print('Missing KOKORO_GITHUB_PULL_REQUEST_NUMBER env var: not checking')
return
MAX_SUMMARY_LEN = 65400
if len(summary) > MAX_SUMMARY_LEN:
# Drop some hints to the log should someone come looking for what really happened!
print('Clipping too long summary')
print(summary)
summary = summary[:MAX_SUMMARY_LEN] + '\n\n\n... CLIPPED (too long)'
completion_time = str(
datetime.datetime.utcnow().replace(microsecond=0).isoformat()) + 'Z'
resp = _call('/repos/%s/check-runs' % _GITHUB_REPO,

Loading…
Cancel
Save