TEMPORARY: run the PostgreSQL suite three times on one server, push only (refs #98)
ci / test (postgres) (pull_request) Skipped
ci / image (pull_request) Waiting for needed jobs
ci / test (postgres) (push) Failing after 11m1s
ci / image (push) Skipped

Two clean runs did not show the restart. This collects the server log of a
failure sooner and lists Docker's events for the service container (oom, kill,
die). Reverted before the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-15 12:13:47 +01:00
1 parent 0a9a8a38ec
commit 72f4cbe0a5
2 files changed
+26 -2

No files matched your search

+8 -2
View File
@@ -9,13 +9,14 @@ on:
jobs:
test:
if: github.event_name == 'push' # TEMPORARY (issue #98): stress run, three suites on one server
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:10.0
strategy:
fail-fast: false
matrix:
db: [sqlite, postgres]
db: [postgres] # TEMPORARY (issue #98)
services:
postgres:
image: postgres:18
@@ -44,13 +45,18 @@ jobs:
git -c http.extraHeader="Authorization: token ${{ github.token }}" fetch -q --depth 1 origin "${{ github.sha }}"
git checkout -q FETCH_HEAD
- name: Check
run: sh ./tasks.sh check
# TEMPORARY (issue #98): the PostgreSQL suite three times on the same server.
run: |
status=0
for i in 1 2 3; do echo "== round $i"; sh ./tasks.sh test -c Release || status=1; done
exit $status
# The log of the PostgreSQL service, read through the Docker socket the runner mounts in the job (issue #98).
- name: PostgreSQL log
if: always() && matrix.db == 'postgres'
run: sh ./tasks.sh ci-service-log postgres
image:
if: false # TEMPORARY (issue #98)
needs: test
runs-on: ubuntu-latest
# Registry settings for phase 9 (issue #70): declared here, not used before then.
+18
View File
@@ -83,6 +83,24 @@ internal static class ServiceLog
Console.WriteLine($"Memoria ora: {Mib(memory?["usage"])}, limite visto dal contenitore {Mib(memory?["limit"])}, massimo {Mib(memory?["max_usage"])}");
}
// Out-of-memory kills and signals as Docker saw them, from the container's start until now.
var since = DateTimeOffset.Parse(state?["StartedAt"]?.GetValue<string>() ?? "", CultureInfo.InvariantCulture).ToUnixTimeSeconds();
var until = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
var events = Uri.EscapeDataString($$"""{"container":["{{id}}"]}""");
using (var answer = http.GetAsync(new Uri($"events?since={since}&until={until}&filters={events}", UriKind.Relative)).GetAwaiter().GetResult())
{
answer.EnsureSuccessStatusCode();
var lines = answer.Content.ReadAsStringAsync().GetAwaiter().GetResult()
.Split('\n', StringSplitOptions.RemoveEmptyEntries)
.Select(line => JsonNode.Parse(line))
.Where(e => e?["Action"]?.GetValue<string>() is not { } action
|| !(action.StartsWith("exec_", StringComparison.Ordinal) || action == "health_status: healthy"))
.Select(e => $" {DateTimeOffset.FromUnixTimeSeconds(e?["time"]?.GetValue<long>() ?? 0):O} {e?["Action"]}")
.ToList();
Console.WriteLine($"Eventi di Docker: {(lines.Count == 0 ? "nessuno" : "")}");
lines.ForEach(Console.WriteLine);
}
Console.WriteLine("-- registro");
using var response = http.GetAsync(new Uri($"containers/{id}/logs?stdout=1&stderr=1&timestamps=1", UriKind.Relative)).GetAwaiter().GetResult();
response.EnsureSuccessStatusCode();