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
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
index 746ad31..e9bc152 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/worker/worker
@@ -570,11 +570,11 @@ def call_autopkgtest(
570 argv, stdout=null_fd, stderr=subprocess.STDOUT570 argv, stdout=null_fd, stderr=subprocess.STDOUT
571 )571 )
572 # FIXME: Use autopkgtest.wait(timeout=10) once moving to Python 3572 # FIXME: Use autopkgtest.wait(timeout=10) once moving to Python 3
573 # only send status update every 10s, but check if program has finished every 1s573 # only send status update every 30s, but check if program has finished every 1s
574 status_update_counter = 0574 status_update_counter = 0
575 while autopkgtest.poll() is None:575 while autopkgtest.poll() is None:
576 time.sleep(1)576 time.sleep(1)
577 status_update_counter = (status_update_counter + 1) % 10577 status_update_counter = (status_update_counter + 1) % 30
578 if status_update_counter == 0:578 if status_update_counter == 0:
579 send_status_info(579 send_status_info(
580 status_amqp,580 status_amqp,
diff --git a/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html b/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
index 48080ce..e0c8a19 100644
--- a/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
+++ b/charms/focal/autopkgtest-web/webcontrol/templates/browse-running.html
@@ -2,25 +2,10 @@
2{% import "macros.html" as macros %}2{% import "macros.html" as macros %}
33
4{% block content %}4{% block content %}
5 <h1 class="page-header">Currently running tests</h1>5 <h1 class="page-header">Running and queued tests</h1>
6 {% if running_count != 1 %}6 <p>The data displayed on this page is refreshed approximately every 30 seconds.</p>
7 <p>There are currently {{running_count}} running tests.</p>
8 {% else %}
9 <p>There is currently {{running_count}} running test.</p>
10 {% endif %}
11 <p>Click on the package name to jump to the currently running tests of that package.</p>
127
13 <table class="table-condensed table-striped">8 <h2>Queue lengths</h2>
14 {% for column in running|sort|batch(3) %}
15 <tr>
16 {% for p in column %}
17 <td><a href="#pkg-{{ p }}">{{ p }}</a></td>
18 {% endfor %}
19 </tr>
20 {% endfor %}
21 </table>
22
23 <h3>Queue lengths</h3>
24 <p>Click on the number in a cell to jump to the list of test requests for9 <p>Click on the number in a cell to jump to the list of test requests for
25 that release and architecture which are waiting to be run.</p>10 that release and architecture which are waiting to be run.</p>
2611
@@ -43,8 +28,27 @@
43 {% endfor %}28 {% endfor %}
4429
45 <!-- Running tests -->30 <!-- Running tests -->
31 <h2>Running tests</h2>
32 {% if running_count != 1 %}
33 <p>There are currently {{running_count}} running tests.</p>
34 {% else %}
35 <p>There is currently {{running_count}} running test.</p>
36 {% endif %}
37 <p>Click on the package name to jump to the currently running tests of that package.</p>
38 <table class="table-condensed table-striped">
39 {% for column in running|sort|batch(3) %}
40 <tr>
41 {% for p in column %}
42 <td><a href="#pkg-{{ p }}">{{ p }}</a></td>
43 {% endfor %}
44 </tr>
45 {% endfor %}
46 </table>
47
48 <hr>
49
46 {% for p, info in running.items()|sort %}50 {% for p, info in running.items()|sort %}
47 <h2 id="pkg-{{ p }}"><a href="/packages/{{ p }}">{{ p }}</a></h2>51 <h3 id="pkg-{{ p }}"><a href="/packages/{{ p }}">{{ p }}</a></h3>
48 {{ macros.display_running_job(p, info) }}52 {{ macros.display_running_job(p, info) }}
49 {% endfor %}53 {% endfor %}
5054

Subscribers

People subscribed via source and target branches

to all changes: