Merge ~andersson123/autopkgtest-cloud:return-uuid-upon-test-request into autopkgtest-cloud:master

Proposed by Tim Andersson
Status: Merged
Merged at revision: 170b8e81bd7f1f172b25bc685a4974e54992f701
Proposed branch: ~andersson123/autopkgtest-cloud:return-uuid-upon-test-request
Merge into: autopkgtest-cloud:master
Diff against target: 36 lines (+4/-2)
2 files modified
charms/focal/autopkgtest-web/webcontrol/request/app.py (+3/-2)
charms/focal/autopkgtest-web/webcontrol/request/submit.py (+1/-0)
Reviewer Review Type Date Requested Status
Canonical's Ubuntu QA Pending
Review via email: mp+462439@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) wrote :

this has been tested now

Revision history for this message
Skia (hyask) wrote :

Nothing big, but a few small changes wouldn't hurt :-)

Revision history for this message
Tim Andersson (andersson123) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-web/webcontrol/request/app.py b/charms/focal/autopkgtest-web/webcontrol/request/app.py
2index 84bc34d..e751a43 100644
3--- a/charms/focal/autopkgtest-web/webcontrol/request/app.py
4+++ b/charms/focal/autopkgtest-web/webcontrol/request/app.py
5@@ -289,9 +289,9 @@ def index_root():
6 ).format(**ChainMap(session, params))
7
8 if params.get("ppas"):
9- s.send_amqp_request(context="ppa", **params)
10+ uuid = s.send_amqp_request(context="ppa", **params)
11 else:
12- s.send_amqp_request(**params)
13+ uuid = s.send_amqp_request(**params)
14 # add link to result page for Ubuntu results
15 if not params.get("ppas"):
16 url = os.path.join(
17@@ -302,6 +302,7 @@ def index_root():
18 params["arch"],
19 )
20 params["Result history"] = '<a href="{}">{}</a>'.format(url, url)
21+ params["UUID"] = uuid
22 success = SUCCESS.format(
23 EMPTY.join(
24 ROW.format(key, val) for key, val in sorted(params.items())
25diff --git a/charms/focal/autopkgtest-web/webcontrol/request/submit.py b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
26index 4633614..d2e5b0d 100644
27--- a/charms/focal/autopkgtest-web/webcontrol/request/submit.py
28+++ b/charms/focal/autopkgtest-web/webcontrol/request/submit.py
29@@ -350,6 +350,7 @@ class Submit:
30 amqp.Message(body, delivery_mode=2), # persistent
31 routing_key=queue,
32 )
33+ return params["uuid"]
34
35 @classmethod
36 def post_json(cls, url, data, auth_file, project):

Subscribers

People subscribed via source and target branches