Merge ~hyask/autopkgtest-cloud:skia/slower_running_state into autopkgtest-cloud:master

Proposed by Skia
Status: Merged
Merged at revision: 65b0c4f0e783fa952e37e7c61da4ee7cabf0a8f0
Proposed branch: ~hyask/autopkgtest-cloud:skia/slower_running_state
Merge into: autopkgtest-cloud:master
Diff against target: 79 lines (+25/-21)
2 files modified
charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker (+2/-2)
charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html (+23/-19)
Reviewer Review Type Date Requested Status
Tim Andersson Approve
Review via email: mp+467833@code.launchpad.net

Description of the change

This MP fixes the issue with RabbitMQ restarting every 2 hours under high load.

To post a comment you must log in.
Revision history for this message
Tim Andersson (andersson123) wrote :

I had a look at the changes and I like the running page improvements. Feels like it makes a bit more sense now.

I do however have one inline comment regarding the first commit.

review: Needs Fixing
Revision history for this message
Skia (hyask) wrote :

Wow, thanks, completely passed over that :-)

Revision history for this message
Tim Andersson (andersson123) wrote :

Approve provided CI passes!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
2index 746ad31..e9bc152 100755
3--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
4+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
5@@ -570,11 +570,11 @@ def call_autopkgtest(
6 argv, stdout=null_fd, stderr=subprocess.STDOUT
7 )
8 # FIXME: Use autopkgtest.wait(timeout=10) once moving to Python 3
9- # only send status update every 10s, but check if program has finished every 1s
10+ # only send status update every 30s, but check if program has finished every 1s
11 status_update_counter = 0
12 while autopkgtest.poll() is None:
13 time.sleep(1)
14- status_update_counter = (status_update_counter + 1) % 10
15+ status_update_counter = (status_update_counter + 1) % 30
16 if status_update_counter == 0:
17 send_status_info(
18 status_amqp,
19diff --git a/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html b/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
20index 48080ce..e0c8a19 100644
21--- a/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
22+++ b/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
23@@ -2,25 +2,10 @@
24 {% import "macros.html" as macros %}
25
26 {% block content %}
27- <h1 class="page-header">Currently running tests</h1>
28- {% if running_count != 1 %}
29- <p>There are currently {{running_count}} running tests.</p>
30- {% else %}
31- <p>There is currently {{running_count}} running test.</p>
32- {% endif %}
33- <p>Click on the package name to jump to the currently running tests of that package.</p>
34+ <h1 class="page-header">Running and queued tests</h1>
35+ <p>The data displayed on this page is refreshed approximately every 30 seconds.</p>
36
37- <table class="table-condensed table-striped">
38- {% for column in running|sort|batch(3) %}
39- <tr>
40- {% for p in column %}
41- <td><a href="#pkg-{{ p }}">{{ p }}</a></td>
42- {% endfor %}
43- </tr>
44- {% endfor %}
45- </table>
46-
47- <h3>Queue lengths</h3>
48+ <h2>Queue lengths</h2>
49 <p>Click on the number in a cell to jump to the list of test requests for
50 that release and architecture which are waiting to be run.</p>
51
52@@ -43,8 +28,27 @@
53 {% endfor %}
54
55 <!-- Running tests -->
56+ <h2>Running tests</h2>
57+ {% if running_count != 1 %}
58+ <p>There are currently {{running_count}} running tests.</p>
59+ {% else %}
60+ <p>There is currently {{running_count}} running test.</p>
61+ {% endif %}
62+ <p>Click on the package name to jump to the currently running tests of that package.</p>
63+ <table class="table-condensed table-striped">
64+ {% for column in running|sort|batch(3) %}
65+ <tr>
66+ {% for p in column %}
67+ <td><a href="#pkg-{{ p }}">{{ p }}</a></td>
68+ {% endfor %}
69+ </tr>
70+ {% endfor %}
71+ </table>
72+
73+ <hr>
74+
75 {% for p, info in running.items()|sort %}
76- <h2 id="pkg-{{ p }}"><a href="/packages/{{ p }}">{{ p }}</a></h2>
77+ <h3 id="pkg-{{ p }}"><a href="/packages/{{ p }}">{{ p }}</a></h3>
78 {{ macros.display_running_job(p, info) }}
79 {% endfor %}
80

Subscribers

People subscribed via source and target branches

to all changes: