Compare commits

..
Author SHA1 Message Date
autonomic-bot a5ce46f2a3 fix: bump APP_INI_VERSION to v23 (app.ini.tmpl changed in the forgejo removal)
cc-ci/testme cc-ci: success
Docker Swarm configs are IMMUTABLE — only labels can be updated. The config is
named ${STACK_NAME}_app_ini_${APP_INI_VERSION}, so when app.ini.tmpl's rendered
content changes the version suffix MUST be bumped, otherwise abra tries to mutate
the existing object and the deploy aborts:

  FATA failed to update config <stack>_app_ini_v22: Error response from daemon:
  rpc error: code = InvalidArgument desc = only updates to Labels are allowed

'BREAKING CHANGE: remove forgejo' (6a0339d) edited app.ini.tmpl —

  -{{ if or (eq (env "FORGE") "forgejo") (eq (env "GITEA_LFS_START_SERVER") "true") }}
  +{{ if (eq (env "GITEA_LFS_START_SERVER") "true") }}

— but left APP_INI_VERSION at v22 (unchanged since the LFS commit 357926f), and
3.6.2+1.27.1-rootless shipped that way. Every existing deployment upgrading ACROSS
the forgejo removal therefore fails at 'initialising deployment'; reproduced on a
live 3.6.1+1.26.2-rootless -> 3.6.2+1.27.1-rootless upgrade.

Bumping to v23 makes Swarm create a NEW config object instead of mutating v22. The
orphaned v22 object can be pruned after the rollout. Only app.ini.tmpl changed, so
DOCKER_SETUP_SH_VERSION and PG_BACKUP_VERSION stay put.

Note: cc-ci's upgrade tier did not catch this because it resolved the upgrade base
to main-tip, which ALREADY contains the forgejo removal — base and head then render
identical app.ini and no config update is attempted. Real deployments upgrade from
the last published RELEASE (3.6.1+1.26.2), which is where the break appears.
2026-08-10 16:48:35 +00:00
3 changed files with 3 additions and 11 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
export APP_INI_VERSION=v23 export APP_INI_VERSION=v23
export DOCKER_SETUP_SH_VERSION=v3 export DOCKER_SETUP_SH_VERSION=v1
export PG_BACKUP_VERSION=v1 export PG_BACKUP_VERSION=v1
abra_backup_app() { abra_backup_app() {
+2 -2
View File
@@ -6,7 +6,7 @@ services:
image: "gitea/gitea:1.27.1-rootless" image: "gitea/gitea:1.27.1-rootless"
configs: configs:
- source: app_ini - source: app_ini
target: /etc/gitea/app.ini.init target: /etc/gitea/app.ini
- source: docker_setup_sh - source: docker_setup_sh
target: /usr/local/bin/docker-setup.sh target: /usr/local/bin/docker-setup.sh
mode: 0555 mode: 0555
@@ -87,7 +87,7 @@ services:
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true" - "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true"
- coop-cloud.${STACK_NAME}.version=3.6.3+1.27.1-rootless - coop-cloud.${STACK_NAME}.version=3.6.2+1.27.1-rootless
networks: networks:
-8
View File
@@ -13,11 +13,3 @@ mkdir -p ${GITEA_CUSTOM} && chmod 0500 ${GITEA_CUSTOM}
# Prepare temp folder # Prepare temp folder
mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP} mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP}
if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi
# Gitea 1.24+ writes settings back to app.ini on boot (e.g. WORK_PATH), which fails when app.ini is
# mounted directly as a read-only swarm config. So mount the rendered config as app.ini.init and seed
# a writable copy. Use `! -s` (empty), not `! -f`: old direct-mount upgrades leave a 0-byte app.ini.
if [ ! -s /etc/gitea/app.ini ]; then
cp /etc/gitea/app.ini.init /etc/gitea/app.ini
fi
chmod 0600 /etc/gitea/app.ini 2>/dev/null || true