← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~hyask/autopkgtest-cloud:skia/bug_fixes into autopkgtest-cloud:master

 

Skia has proposed merging ~hyask/autopkgtest-cloud:skia/bug_fixes into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/462409

Two bug fixes for issues reported on `Ubuntu QA` this morning.

* One is that a manually queued test appears on `/running` but not on `/packages/<name>`.
* The other is about the advertised cache period for the served `/queued.json` file, which is refreshed minutely.
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~hyask/autopkgtest-cloud:skia/bug_fixes into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/browse.cgi b/charms/focal/autopkgtest-web/webcontrol/browse.cgi
index e3e969a..810163d 100755
--- a/charms/focal/autopkgtest-web/webcontrol/browse.cgi
+++ b/charms/focal/autopkgtest-web/webcontrol/browse.cgi
@@ -17,6 +17,10 @@ from helpers.utils import get_all_releases, get_supported_releases
 from werkzeug.middleware.proxy_fix import ProxyFix
 
 app = flask.Flask("browse")
+
+# we don't want a long cache, as we only serve files that are regularly updated
+app.config["SEND_FILE_MAX_AGE_DEFAULT"] = 60
+
 app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1)
 db_con = None
 swift_container_url = None
diff --git a/charms/focal/autopkgtest-web/webcontrol/request/submit.py b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
index 0133d44..4633614 100644
--- a/charms/focal/autopkgtest-web/webcontrol/request/submit.py
+++ b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
@@ -339,7 +339,7 @@ class Submit:
             datetime.utcnow(), "%Y-%m-%d %H:%M:%S%z"
         )
         params["uuid"] = str(uuid.uuid4())
-        body = "%s %s" % (package, json.dumps(params, sort_keys=True))
+        body = "%s\n%s" % (package, json.dumps(params, sort_keys=True))
         with amqp.Connection(
             self.amqp_creds.hostname,
             userid=self.amqp_creds.username,

Follow ups