canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #01907
[Merge] ~andersson123/autopkgtest-cloud:update-github-jobs-fix into autopkgtest-cloud:master
Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:update-github-jobs-fix into autopkgtest-cloud:master.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/455864
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:update-github-jobs-fix into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/units/update-github-jobs.service b/charms/focal/autopkgtest-web/units/update-github-jobs.service
index a52bac5..5681a9f 100644
--- a/charms/focal/autopkgtest-web/units/update-github-jobs.service
+++ b/charms/focal/autopkgtest-web/units/update-github-jobs.service
@@ -5,6 +5,5 @@ Description=Update GitHub job status
Type=oneshot
User=www-data
Group=www-data
-TimeoutStartSec=1m
EnvironmentFile=/etc/environment.d/*.conf
ExecStart=/home/ubuntu/webcontrol/update-github-jobs
diff --git a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
index 6362803..fe35b71 100755
--- a/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
+++ b/charms/focal/autopkgtest-web/webcontrol/update-github-jobs
@@ -17,13 +17,19 @@ from request.submit import Submit
PENDING_DIR = "/run/autopkgtest_webcontrol/github-pending"
swift_url = None
external_url = None
+SWIFT_OBJECTS = ["log.gz", "artifacts.tar.gz", "result.tar"]
def result_matches_job(result_url, params):
# download result.tar and get exit code and testinfo
+ if not any(ele in result_url for ele in SWIFT_OBJECTS):
+ result_url += "/result.tar"
+ elif "result.tar" not in result_url:
+ return
+
for _ in range(5):
try:
- with urllib.request.urlopen(result_url + "/result.tar") as f:
+ with urllib.request.urlopen(result_url) as f:
tar_bytes = io.BytesIO(f.read())
break
except IOError as e:
Follow ups