diff --git a/wger/CHANGELOG.md b/wger/CHANGELOG.md index 686e5ee723..e58ceabead 100644 --- a/wger/CHANGELOG.md +++ b/wger/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.8.0-dev.1.3 (2026-10-20) + +- Fix the PowerSync SQLite import failing with `CommandError: Unknown model: admin.logentry`, which kept wger from starting. wger does not install Django's admin app, so the import no longer asks `dumpdata` to exclude its log table (#3134). +- README: correct when `/ps/` stays unrouted and when wger still starts. A wrong `wal_level` is detected only after wger is up, so `/ps/` then answers 502 rather than being unrouted (#3134). + ## 2.8.0-dev.1.2 (2026-10-19) - Fix `root is not in the sudoers file` at startup, which made the PowerSync SQLite import fail (and wger refuse to start), and stopped the JWT keys from being generated. The image's `/etc/sudoers` only allowed the `wger` user; it now allows root too (#3123). diff --git a/wger/README.md b/wger/README.md index d3e5dd0815..d6d7caa96e 100644 --- a/wger/README.md +++ b/wger/README.md @@ -211,8 +211,15 @@ reason other than `wal_level`, the add-on log carries PowerSync's own error. With everything in place the add-on log reports the PowerSync URL, and `/ps/probes/liveness` answers instead of logging `Not Found: /ps/probes/liveness`. -If a prerequisite is missing the add-on still starts wger normally and the log says -exactly which variable is wrong; `/ps/` stays unrouted in that case. +If a variable is missing or invalid, the log says exactly which one and `/ps/` stays +unrouted. wger itself still starts, unless `PS_DATABASE_URI` points at Postgres while +there is SQLite data waiting to be imported: then it refuses to start, so the empty +Postgres database is not set up as a new instance. Fix the variable, or remove +`PS_DATABASE_URI` to go back to SQLite. + +The `wal_level` check and the PowerSync storage setup only run once wger is up, after +`/ps/` is already routed. If either fails, the log says so, PowerSync is not started, +and `/ps/` answers `502 Bad Gateway` until you fix the cause and restart the add-on. If you put your own reverse proxy in front of the add-on, nothing extra is needed: the `/ps/` route forwards an incoming `X-Forwarded-Proto` unchanged and only falls back to diff --git a/wger/config.yaml b/wger/config.yaml index 849c177606..b3adfa9a09 100644 --- a/wger/config.yaml +++ b/wger/config.yaml @@ -27,5 +27,5 @@ schema: slug: wger udev: true url: https://github.com/alexbelgium/hassio-addons -version: "2.8.0-dev.1.2" +version: "2.8.0-dev.1.3" webui: "[PROTO:ssl]://[HOST]:[PORT:80]" diff --git a/wger/rootfs/etc/cont-init.d/89-powersync-run.sh b/wger/rootfs/etc/cont-init.d/89-powersync-run.sh index 47f890fe30..5f650ff961 100755 --- a/wger/rootfs/etc/cont-init.d/89-powersync-run.sh +++ b/wger/rootfs/etc/cont-init.d/89-powersync-run.sh @@ -333,14 +333,15 @@ import_sqlite_data() { fi # Dumped from the copy, with the tables Django rebuilds for itself left out: content - # types and permissions are recreated by migrate, and admin log entries and sessions - # point at them. --natural-foreign keeps those references resolvable; primary keys - # are deliberately kept as they are so the rows land unchanged. + # types and permissions are recreated by migrate, and sessions point at them. wger + # does not install django.contrib.admin, so there is no admin.logentry to exclude: + # naming it makes dumpdata fail with "Unknown model" (#3134). --natural-foreign keeps + # those references resolvable; primary keys are deliberately kept as they are so the + # rows land unchanged. if ! sqlite_manage "$copy" dumpdata \ --natural-foreign \ --exclude contenttypes \ --exclude auth.Permission \ - --exclude admin.logentry \ --exclude sessions.session \ --output "$dump"; then bashio::log.error "PowerSync: reading the SQLite database failed, nothing was written to Postgres"