Skip to content

Commit 7a1fd01

Browse files
committed
build.py: Add printout of HTTP error code during last commit retrieval
If we check for last commit, and it fails - we just get return code 1. But it is important to differentiate, if tree got deleted it might fail with 404 code, if it is just temporary git problems it will produce different HTTP error code. It will be useful to do periodic cleanup of git trees that are dont exist anymore, by checking jenkins logs. Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent b4be043 commit 7a1fd01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernelci/build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def get_last_commit(config, storage):
8787
file_name=_get_last_commit_file_name(config))
8888
last_commit_resp = requests.get(last_commit_url)
8989
if last_commit_resp.status_code != 200:
90+
print(f'get_last_commit(): Failed to retrieve the last commit.'
91+
'HTTP code: {last_commit_resp.status_code}')
9092
return False
9193
return last_commit_resp.text.strip()
9294

0 commit comments

Comments
 (0)