Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qa-scripts:master commit in: cgi-bin/
Date: Thu, 02 Sep 2021 05:39:39
Message-Id: 1630561121.a361f8f2a37c32b5472422245a57581cd5788934.mgorny@gentoo
1 commit: a361f8f2a37c32b5472422245a57581cd5788934
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 2 05:38:41 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 2 05:38:41 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=a361f8f2
7
8 get-git-file: Issue 503 when commit is not found
9
10 Issue 503 to suggest retrying more aggressively when the requested
11 commit is not found. It usually means that the CI reports haven't been
12 fetched yet.
13
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 cgi-bin/get-git-file.sh | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19 diff --git a/cgi-bin/get-git-file.sh b/cgi-bin/get-git-file.sh
20 index 9451d1e..9721f71 100755
21 --- a/cgi-bin/get-git-file.sh
22 +++ b/cgi-bin/get-git-file.sh
23 @@ -61,7 +61,8 @@ main() {
24 lfile=${file}
25 tree=( $(git ls-tree "${commit}" "${lfile}" 2>/dev/null) )
26 if [[ ! ${tree[*]} ]]; then
27 - echo "Status: 404 Not Found"
28 + echo "Status: 503 Service Unavailable"
29 + echo "Retry-After: 30"
30 echo
31 echo "404 Not Found (if the report was just published, you may need to wait a minute or two for sync)"
32 exit 0