Skip to content

Commit 7aa28cd

Browse files
authored
Drop the retrieval-eval database too, which the test-job cleanup did not cover (#682)
retrieval-eval builds its OWN run-scoped database via DEV_DB_NAME and never dropped it. The cleanup added in PR 681 covered only the ExUnit database, so every eval run left a loopctl_ci_eval_<run id> behind on the shared CI instance for the reaper to find two days later. Counted on beelink just now: 64 of them. Same shape as the miss in ecommerce-friendly PR 101, and worth naming as a pattern rather than two coincidences. When the CI port and the run-scoped NAME were rolled out, they were applied to every job that creates a database; the DROP was applied to the obvious one. The gap does not show up in a diff - both files look complete - it shows up as a count on the server, which is the only place I found either of them.
1 parent fc08684 commit 7aa28cd

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,20 @@ jobs:
490490
exit "$status"
491491
timeout-minutes: 15
492492

493+
# This job builds its OWN database (DEV_DB_NAME, run-scoped) and never dropped
494+
# it. The drop step added for `test` covered only the ExUnit database, so every
495+
# eval run left a `loopctl_ci_eval_<run id>` behind on the shared CI instance
496+
# for the reaper to find two days later.
497+
#
498+
# Same shape as the miss in ecommerce-friendly#101: the port and the run-scoped
499+
# NAME were applied to every database-creating job, the DROP to only one, and
500+
# the gap is invisible in a diff -- it shows up as a count on the server.
501+
- name: Drop this run's eval database
502+
if: always()
503+
run: |
504+
dropdb --if-exists -h localhost -p "${PGPORT}" -U postgres "${DEV_DB_NAME}" 2>&1 || true
505+
echo "cleanup: dropped ${DEV_DB_NAME} (best effort)"
506+
493507
security:
494508
name: Security
495509
runs-on: [self-hosted, beelink]

0 commit comments

Comments
 (0)