chore(forgejo): upgrade app 15 -> 16 #74

Merged
copper merged 2 commits from worktree-forgejo-app-15-to-16 into main 2026-09-16 20:37:11 +00:00
Collaborator

Summary

  • Bumps codeberg.org/forgejo/forgejo from :15 to :16 in ccnet-forgejo-swarm/forgejo-swarm-stack.yml.
  • Reviewed the v16.0 release notes and the authoritative upgrade guide (not just the blog post) before executing. All three v16.0 breaking changes checked against our config: none block us (we already explicitly set REVERSE_PROXY_TRUSTED_PROXIES, don't use reverse-proxy auth, and our one pull mirror is a low-risk external target unaffected by the SSRF-hardening change).
  • Took a fresh pg_dump backup before cutover (gated on dump validity) and verified the internal Forgejo schema migration (v16a–v16e) applied cleanly with no errors.
  • Post-upgrade verification: /api/v1/version reports 16.0.4+gitea-1.22.0, a real git clone against the repo succeeded, HTTPS returns 200, and the existing pull mirror's sync schedule is undisturbed.

Incident during execution (documented in full in the plan file)

This worktree was created before task #5's postgres 16→18 migration (PR #73) had merged into main, so its stack file still had the old postgres:16-alpine image/mount config. The first deploy attempt pushed that stale db config live, causing forgejo_db to crash-loop (postgres 16's initdb correctly refused to touch the non-empty pg18-format datadir rather than overwriting it — no data was touched or lost, verified directly against the on-disk PG_VERSION file). Fixed by correcting the stack file back to the real production db config, redeploying, and force-updating forgejo_forgejo past a stuck Desired State: Shutdown task (a known raft/scheduling gotcha). Total downtime ~4 minutes, entirely within the already-planned quiescence window.

Before pushing, merged origin/main into this branch and verified the net diff against main was exactly the intended change, to make sure this class of staleness can't slip through again.

Full details, advisor review notes, and root-cause writeup: ~/.claude/plans/2026-09-16-forgejo-app-15-to-16-upgrade.md (local plan file, not committed to the repo).

Test plan

  • pg_dump backup taken and gated on validity before cutover
  • Schema migration logs captured, confirmed clean (no errors)
  • curl -I https://code.coppercore.net → 200
  • /api/v1/version → 16.0.4+gitea-1.22.0
  • Real git clone against the repo succeeded
  • Pull mirror sync status unaffected

🤖 Generated with Claude Code

https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB

## Summary - Bumps `codeberg.org/forgejo/forgejo` from `:15` to `:16` in `ccnet-forgejo-swarm/forgejo-swarm-stack.yml`. - Reviewed the v16.0 release notes and the authoritative upgrade guide (not just the blog post) before executing. All three v16.0 breaking changes checked against our config: none block us (we already explicitly set `REVERSE_PROXY_TRUSTED_PROXIES`, don't use reverse-proxy auth, and our one pull mirror is a low-risk external target unaffected by the SSRF-hardening change). - Took a fresh `pg_dump` backup before cutover (gated on dump validity) and verified the internal Forgejo schema migration (`v16a`–`v16e`) applied cleanly with no errors. - Post-upgrade verification: `/api/v1/version` reports `16.0.4+gitea-1.22.0`, a real `git clone` against the repo succeeded, HTTPS returns 200, and the existing pull mirror's sync schedule is undisturbed. ## Incident during execution (documented in full in the plan file) This worktree was created before task #5's postgres 16→18 migration (PR #73) had merged into `main`, so its stack file still had the old `postgres:16-alpine` image/mount config. The first deploy attempt pushed that stale `db` config live, causing `forgejo_db` to crash-loop (postgres 16's `initdb` correctly refused to touch the non-empty pg18-format datadir rather than overwriting it — **no data was touched or lost**, verified directly against the on-disk `PG_VERSION` file). Fixed by correcting the stack file back to the real production `db` config, redeploying, and force-updating `forgejo_forgejo` past a stuck `Desired State: Shutdown` task (a known raft/scheduling gotcha). Total downtime ~4 minutes, entirely within the already-planned quiescence window. Before pushing, merged `origin/main` into this branch and verified the *net* diff against main was exactly the intended change, to make sure this class of staleness can't slip through again. Full details, advisor review notes, and root-cause writeup: `~/.claude/plans/2026-09-16-forgejo-app-15-to-16-upgrade.md` (local plan file, not committed to the repo). ## Test plan - [x] `pg_dump` backup taken and gated on validity before cutover - [x] Schema migration logs captured, confirmed clean (no errors) - [x] `curl -I https://code.coppercore.net` → 200 - [x] `/api/v1/version` → `16.0.4+gitea-1.22.0` - [x] Real `git clone` against the repo succeeded - [x] Pull mirror sync status unaffected 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB
Also re-applies the already-merged postgres 16->18 db change from this
worktree's stale base (branched before PR #73 landed), so the file
matches main plus the new forgejo:16 bump.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TAp6m6GGf1PKfff1HKziBB
# Conflicts:
#	ccnet-forgejo-swarm/forgejo-swarm-stack.yml
copper merged commit 23472e7875 into main 2026-09-16 20:37:11 +00:00
Sign in to join this conversation.
No description provided.