Nothing big, but a few small changes wouldn't hurt :-) Diff comments:
> diff --git a/charms/focal/autopkgtest-web/webcontrol/request/app.py > b/charms/focal/autopkgtest-web/webcontrol/request/app.py > index 84bc34d..6b1ec40 100644 > --- a/charms/focal/autopkgtest-web/webcontrol/request/app.py > +++ b/charms/focal/autopkgtest-web/webcontrol/request/app.py > @@ -226,7 +226,7 @@ def index_root(): > except KeyError as e: > return invalid("Missing field in JSON data: %s" % e) > > - s.send_amqp_request(context="upstream", **params) > + _ = s.send_amqp_request(context="upstream", **params) Why store the return value in a `_` named variable if you don't care about it? > # write status file for pending test > os.makedirs(os.path.join(PATH, "github-pending"), exist_ok=True) > with open( > @@ -302,6 +302,7 @@ def index_root(): > params["arch"], > ) > params["Result history"] = '<a href="{}">{}</a>'.format(url, url) > + params["uuid"] = uuid UUIDs are usually CAPITALIZED :-) > success = SUCCESS.format( > EMPTY.join( > ROW.format(key, val) for key, val in sorted(params.items()) > diff --git a/charms/focal/autopkgtest-web/webcontrol/request/submit.py > b/charms/focal/autopkgtest-web/webcontrol/request/submit.py > index 4633614..d2e5b0d 100644 > --- a/charms/focal/autopkgtest-web/webcontrol/request/submit.py > +++ b/charms/focal/autopkgtest-web/webcontrol/request/submit.py > @@ -350,6 +350,7 @@ class Submit: > amqp.Message(body, delivery_mode=2), # persistent > routing_key=queue, > ) > + return params["uuid"] I have the feeling we could do a bit better in terms of API design, by returning all the params, instead of just the uuid. Still, as everything is already mostly clunky, well... > > @classmethod > def post_json(cls, url, data, auth_file, project): -- https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/462439 Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:return-uuid-upon-test-request into autopkgtest-cloud:master. -- Mailing list: https://launchpad.net/~canonical-ubuntu-qa Post to : canonical-ubuntu-qa@lists.launchpad.net Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa More help : https://help.launchpad.net/ListHelp