Skip to content

fix(workflow): pass renamed backend build-args for syncstorage-rs 0.23+ - #24

Open
tmiland-labs wants to merge 1 commit into
porelli:mainfrom
tmiland-lab:fix/workflow-backend-args
Open

fix(workflow): pass renamed backend build-args for syncstorage-rs 0.23+#24
tmiland-labs wants to merge 1 commit into
porelli:mainfrom
tmiland-lab:fix/workflow-backend-args

Conversation

@tmiland-labs

Copy link
Copy Markdown

Problem

Since syncstorage-rs 0.23.x, the upstream Dockerfile renamed its build args: DATABASE_BACKEND was split into SYNCSTORAGE_DATABASE_BACKEND and TOKENSERVER_DATABASE_BACKEND, both defaulting to spanner.

This workflow still passes only the old DATABASE_BACKEND=mysql arg, which the new Dockerfile silently ignores. The result is a Spanner build of the app image. At startup the Spanner manager rejects the mysql:// URL configured by the compose file and the container panics:

thread 'main' panicked at syncserver/src/main.rs:57:55:
... Invalid database url: mysql://... status: 500

(raised in syncstorage-spanner/src/manager/session.rs:74, spanner_database_name())

Confirmed against the 0.23.3 build published by this repo's weekly cron — every current :latest app image is broken and no deployment using mysql:// URLs can start.

Fix

Pass the two renamed args in addition to the old one, so builds of pre-0.23 tags (which read DATABASE_BACKEND) and 0.23+ tags (which read the new args) both get the mysql backend:

build-args: |
  DATABASE_BACKEND=${{ env.DATABASE_BACKEND }}
  SYNCSTORAGE_DATABASE_BACKEND=${{ env.DATABASE_BACKEND }}
  TOKENSERVER_DATABASE_BACKEND=${{ env.DATABASE_BACKEND }}

Verification

  • Built with the patched workflow (syncstorage-rs-mysql-latest, upstream tag 0.23.3, amd64 + arm64): image starts cleanly with SYNC_TOKENSERVER__* mysql URLs, /__heartbeat__ returns 200, tokenserver endpoint answers, real Firefox client syncs successfully.
  • Side note: 0.23.3 defaults MYSQLCLIENT_PKG=libmariadb-dev-compat, so the existing arm64 libmysqlclient-dev sed is a no-op there (kept as-is for older tags).

Upstream renamed the Docker build args in 0.23.x: DATABASE_BACKEND
was split into SYNCSTORAGE_DATABASE_BACKEND and
TOKENSERVER_DATABASE_BACKEND (both defaulting to spanner). Passing
only the old arg silently produced a Spanner build that panics at
startup with 'Invalid database url' (syncstorage-spanner
session.rs). Keep passing the old arg too so builds of pre-0.23
tags still work.
@skazi0

skazi0 commented Sep 8, 2026

Copy link
Copy Markdown

#20 is waiting since March :o|

@tmiland-labs

Copy link
Copy Markdown
Author

Thanks for the nudge @skazi0 — your analysis in #20 was spot on: the 0.23.x Dockerfile renamed/split the args, and passing only the old DATABASE_BACKEND silently produces Spanner builds that panic with Invalid database url. We independently hit the same wall (see #24) and kept the old arg as well so pre-0.23 tags still build.

While this sits in review: our fork already publishes working images — ghcr.io/tmiland/firefox-sync:syncstorage-rs-mysql-latest (syncstorage-rs 0.23.3, mysql backend) has been running in production on our server since 2026-09-07 (nginx + real Firefox clients syncing), and the fork's init image also carries the tokenserver db init fix (#23). So if you need a working 0.23.x deployment today, the fork is ready to use.

tmiland pushed a commit to tmiland/firefox-sync that referenced this pull request Sep 8, 2026
Documents the two fixes carried by this fork (upstream PRs porelli#23 and porelli#24)
and points deployers at the production-tested MySQL images on
ghcr.io/tmiland/firefox-sync.
tmiland pushed a commit to tmiland/firefox-sync that referenced this pull request Sep 8, 2026
- Lead with what the fork carries: db_init fix (upstream porelli#23), 0.23
  build-args (upstream porelli#24), production images on ghcr.io/tmiland
- Add architecture table (embedded tokenserver since 0.23, dual MariaDB,
  one-shot init), images section, troubleshooting section
- Keep upstream wording for disclaimer/security/background/browser setup,
  credit porelli, Mozilla and jeena; note GPL-3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants