perf(ci): 'Free port 5432' step purges Postgres with apt and takes 5-31 s per job (<1 s with the fixed template)

Open Beginner friendly
#39 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, shell, yaml
Domain
ci-cd, performance

Research direction

Start by reading the two 'Free port 5432' steps in .github/workflows/ci.yml (doctor and e2e/smoke jobs), then fetch the reference step from docs/examples/ci/flisk-ci.yml in flisk-sh/flisk. Swap both steps for that template: check ss -ltn for :5432 and exit 0 when free, otherwise stop and mask the postgres units and run fuser -k 5432/tcp, with no apt-get remove. Done when grep -c "apt-get remove" .github/workflows/ci.yml returns 0 and the step runs in under a second across five CI runs.

Written by the indexing model from the issue text.

Description

area: ci area: infrastructure benchmark ci-cd configuration developer-experience difficulty: easy dx enhancement good first issue hacktoberfest help wanted latency performance quality rank: 8 kyu tech: github-actions tech: postgres yaml

Measured

2026-11-14, step Free port 5432 in .github/workflows/ci.yml (gh run view --json jobs, last 6 successful runs): 7, 10, 8, 10, 31, 9 s (doctor job) and 25, 8, 7, 13, 10, 8 s (smoke job). That is about 30-40 % of each doctor job (17-30 s) and 5-10 % of the smoke job.

The same step in flisk-sh/flisk costs well under a second since flisk-sh/flisk#4087, and the docs template was fixed in flisk-sh/flisk#4181 (closes flisk-sh/flisk#4177).

Cause

.github/workflows/ci.yml (2 places, doctor and e2e jobs) still runs sudo DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y 'postgresql*' on every job, even when nothing listens on 5432.

Proposal

Replace both steps with the template from docs/examples/ci/flisk-ci.yml in flisk-sh/flisk (check ss -ltn for :5432 and exit 0 when free; otherwise stop and mask the postgres units and fuser -k 5432/tcp; no apt purge).

Acceptance

  • The "Free port 5432" step takes under 1 s in both jobs over the next 5 runs.
  • grep -c "apt-get remove" .github/workflows/ci.yml returns 0.
Dominant language
Shell
Stars
3
Forks
0
Avg merge
5m
Merged PRs (30d)
6

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flisk-sh/flisk-example

All issues in flisk-sh/flisk-example

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.