Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:admin-page 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/456759 -- Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:admin-page into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/browse.cgi b/charms/focal/autopkgtest-web/webcontrol/browse.cgi index d7bc343..6a133ec 100755 --- a/charms/focal/autopkgtest-web/webcontrol/browse.cgi +++ b/charms/focal/autopkgtest-web/webcontrol/browse.cgi @@ -8,6 +8,7 @@ import os import re import sqlite3 from collections import OrderedDict +from datetime import datetime from wsgiref.handlers import CGIHandler import distro_info @@ -370,6 +371,57 @@ def running(): ) +@app.route("/admin") +def admin(): + try: + with open("/run/amqp-status-collector/running.json") as f: + # package -> runhash -> release -> arch -> (params, duration, logtail) + running_info = json.load(f) + except FileNotFoundError: + running_info = {} + return None + pruned_running_info = {} + for running_pkg, running_dict in running_info.items(): + for skey, sval in running_dict.items(): + for release, values in sval.items(): + for arch, vals in values.items(): + sub_time = vals["submit-time"] + # convert to appropriate format + curr_time = 0 + if curr_time - sub_time < 12: # hours? + pass + # maybe check against pre-existing results? But I think maybe is overkill. Not sure + + # return render( + # # make this browse-admin instead + # "browse-running.html", + # # contexts=queue_info.keys(), + # # releases=releases, + # # arches=arches, + # # queue_info=queue_info, + # # queue_lengths=queue_lengths, + # # we just want to render running for now + # running=running_info, + # ) + + +# "rt-extension-smsnotify": { +# "submit-time_2023-12-01 16:28:14;triggers_['request-tracker4/4.4.4+dfsg-2ubuntu2'];": { +# "noble": { +# "amd64": [ +# { +# "triggers": [ +# "request-tracker4/4.4.4+dfsg-2ubuntu2" +# ], +# "submit-time": "2023-12-01 16:28:14" +# }, +# 70, +# " 0s autopkgtest [16:35:55]: starting date: 2023-12-01\n 0s autopkgtest [16:35:55]: git checkout: f7cd36b ssh-setup/nova: fix ARCH having two lines of data\n 0s autopkgtest [16:35:55]: host juju-7f2275-prod-proposed-migration-environment-3; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.id1u6ip_/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --setup-commands /home/ubuntu/autopkgtest/setup-commands/setup-testbed --apt-pocket=proposed=src:request-tracker4 --apt-upgrade rt-extension-smsnotify --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=request-tracker4/4.4.4+dfsg-2ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-3@lcy02-5.secgroup --name adt-noble-amd64-rt-extension-smsnotify-20231201-163554-juju-7f2275-prod-proposed-migration-environment-3 --image adt/ubuntu-noble-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-3 --net-id=net_prod-proposed-migration -e TERM=linux -e ''\"'\"'http_proxy=http://squid.internal:3128'\"'\"'' -e ''\"'\"'https_proxy=http://squid.internal:3128'\"'\"'' -e ''\"'\"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'\"'\"'' --mirror=http://ftpmaster.internal/ubuntu/\n" +# ] +# } +# }, + + @app.route("/queue_size.json") def queuesize_json(): queue_info = get_queue_info()[2]
-- 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