Commit 4becdde
committed
fastapi-sqlalchemy-pg-catalog: tighten flow.sh + init.sql per Copilot review
flow.sh:
- set -Eeuo pipefail so curl/other failures actually fail the script.
- Track readiness explicitly; exit 1 with a clear message if the app
never reaches /health within READY_TIMEOUT_S (default 60s) instead
of silently falling through and proceeding against a dead app.
- curl -fsS for the readiness probe and the endpoint calls so HTTP
failures propagate as exit codes (the previous `curl -sS ... && echo`
shape silenced non-2xx responses).
init.sql:
- Replace `INSERT ... ON CONFLICT DO NOTHING` with `INSERT ... SELECT
WHERE NOT EXISTS`. The model has no UNIQUE constraint on name, so
ON CONFLICT had nothing to fire on; this form is genuinely idempotent
on re-runs against an existing volume.
Refs Copilot review on #102.
Signed-off-by: Akash Kumar <meakash7902@gmail.com>1 parent 61a61e6 commit 4becdde
2 files changed
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | | - | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | | - | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments