fix(workflow): pass renamed backend build-args for syncstorage-rs 0.23+ - #24
fix(workflow): pass renamed backend build-args for syncstorage-rs 0.23+#24tmiland-labs wants to merge 1 commit into
Conversation
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.
|
#20 is waiting since March :o| |
|
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 While this sits in review: our fork already publishes working images — |
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.
- 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
Problem
Since syncstorage-rs 0.23.x, the upstream Dockerfile renamed its build args:
DATABASE_BACKENDwas split intoSYNCSTORAGE_DATABASE_BACKENDandTOKENSERVER_DATABASE_BACKEND, both defaulting to spanner.This workflow still passes only the old
DATABASE_BACKEND=mysqlarg, which the new Dockerfile silently ignores. The result is a Spanner build of the app image. At startup the Spanner manager rejects themysql://URL configured by the compose file and the container panics:(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
:latestapp image is broken and no deployment usingmysql://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:Verification
syncstorage-rs-mysql-latest, upstream tag 0.23.3, amd64 + arm64): image starts cleanly withSYNC_TOKENSERVER__*mysql URLs,/__heartbeat__returns 200, tokenserver endpoint answers, real Firefox client syncs successfully.MYSQLCLIENT_PKG=libmariadb-dev-compat, so the existing arm64libmysqlclient-devsed is a no-op there (kept as-is for older tags).