Commit Graph

2969 Commits

Author SHA1 Message Date
izzy
3863ff73ef test: update service spec 2025-11-24 12:49:33 +00:00
izzy
534a9f50b6 fix: make sure backups are correctly sorted for clean up 2025-11-21 18:19:08 +00:00
izzy
86d8e1a092 chore: lint 2025-11-21 18:02:27 +00:00
izzy
ac9a587063 fix: ensure task is defined to show error 2025-11-21 17:21:37 +00:00
izzy
53ef26a5e4 fix: actually assign inputStream 2025-11-21 17:07:16 +00:00
izzy
cbf3a2c3cb feat: system integrity check in restore flow 2025-11-21 16:37:28 +00:00
izzy
874782edf0 feat: restore just .sql files 2025-11-21 14:58:49 +00:00
izzy
a7245627fc fix: permit uploading just .sql files 2025-11-21 14:58:38 +00:00
izzy
174670a1b7 feat: download backups from list 2025-11-21 14:47:11 +00:00
izzy
a3c6d71a58 refactor: permit any .sql(.gz) to be listed/restored 2025-11-21 14:24:35 +00:00
izzy
19ba23056c feat: upload backups 2025-11-21 12:52:27 +00:00
izzy
3d2d7fa64c fix: load status on boot 2025-11-21 11:24:46 +00:00
izzy
270d7e3cdc feat: start restore flow route 2025-11-20 18:31:57 +00:00
izzy
8463968712 chore: lint fixes 2025-11-20 17:10:17 +00:00
izzy
5be08274ff chore: lint fixes 2025-11-20 17:05:22 +00:00
izzy
d6e3d26cfc test: update cli spec 2025-11-20 16:43:30 +00:00
izzy
d5351de26f merge: remote-tracking branch 'origin/main' into feat/database-restores 2025-11-20 16:34:53 +00:00
izzy
2e15012257 feat: web impl. 2025-11-20 16:08:16 +00:00
izzy
56a4159295 feat: sync status to web app 2025-11-20 15:47:30 +00:00
izzy
f778a4260b fix: should set status on restore end 2025-11-20 15:41:05 +00:00
izzy
31f4665d35 feat: start action on boot 2025-11-20 15:36:17 +00:00
izzy
53a74a7279 feat: list and delete backup routes 2025-11-20 15:31:35 +00:00
izzy
dd1cf12aaa refactor: DRY end maintenance 2025-11-20 15:26:03 +00:00
izzy
31410c3c20 test: backup restore service tests 2025-11-20 15:24:56 +00:00
izzy
26587dd690 feat: synchronised status, restore db action 2025-11-20 15:24:48 +00:00
github-actions
edbdc14178 chore: version v2.3.1 2025-11-20 02:20:16 +00:00
github-actions
45a0315606 chore: version v2.3.0 2025-11-19 17:46:53 +00:00
izzy
442fe6e3d0 feat: add external maintenance mode status 2025-11-19 15:54:44 +00:00
izzy
af741a4761 test: update service worker tests 2025-11-19 15:42:10 +00:00
izzy
7c2e8b1d62 feat: add MaintenanceEphemeralStateRepository
refactor: cache the secret in memory
2025-11-19 15:41:27 +00:00
izzy
56c93a71c0 test: add mock for new storage fns 2025-11-19 15:32:11 +00:00
izzy
c090a1a9d9 feat: authenticate websocket requests in maintenance mode 2025-11-19 15:27:44 +00:00
izzy
d040de2d52 feat: initialise StorageCore in maintenance mode 2025-11-19 15:27:16 +00:00
izzy
73ae766d9f refactor: move logSecret into module init 2025-11-19 15:13:11 +00:00
izzy
edc1333db1 chore: add missing repositories to MaintenanceModule 2025-11-19 15:11:37 +00:00
Mees Frensel
271a42ac7f fix(server): copy relevant panorama tags to preview image (#23953) 2025-11-19 03:02:12 +00:00
bo0tzz
4462952564 fix: proper docker caching for plugin mise deps (#23967)
* fix: proper docker caching for plugin mise deps

* fix: mount mise cache for build too
2025-11-19 03:00:03 +00:00
izzy
b01b63b25a chore: open api
fix: missing action in cli.service.ts
2025-11-18 17:35:12 +00:00
izzy
7e7d6af66b feat: list/delete backups (maintenance services) 2025-11-18 17:28:03 +00:00
izzy
0ae03f68cf chore: use backup util from backup.service.ts
test: update backup.service.ts tests with new util
2025-11-18 17:12:16 +00:00
izzy
0419539c08 feat: wait on maintenance operation lock on boot 2025-11-18 17:00:38 +00:00
izzy
f67153e44b feat: backups util (args, create, restore, progress) 2025-11-18 16:54:50 +00:00
izzy
cc7895244d feat: StorageRepository#createGzip,createGunzip,createPlainReadStream 2025-11-18 16:53:10 +00:00
izzy
a6fb942fca test: write tests for ProcessRepository#createSpawnDuplexStream 2025-11-18 16:51:28 +00:00
izzy
9cea3d7b2f feat: ProcessRepository#createSpawnDuplexStream 2025-11-18 16:51:13 +00:00
renovate[bot]
7134dd29ca chore(deps): pin ghcr.io/jdx/mise docker tag to ac26f59 (#23961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-18 12:21:28 +01:00
renovate[bot]
3e08953a43 chore(deps): update dependency @types/node to ^22.19.1 (#23963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-18 12:20:52 +01:00
Min Idzelis
58c3c7e26b feat: run e2e server in dev mode (#23921)
* feat: run e2e server in dev mode

* Use bash syntax: [[ and ==
2025-11-17 14:16:39 -06:00
Paul Makles
15e00f82f0 feat: maintenance mode (#23431)
* feat: add a `maintenance.enabled` config flag

* feat: implement graceful restart
feat: restart when maintenance config is toggled

* feat: boot a stripped down maintenance api if enabled

* feat: cli command to toggle maintenance mode

* chore: fallback IMMICH_SERVER_URL environment variable in process

* chore: add additional routes to maintenance controller

* fix: don't wait for nest application to close to finish request response

* chore: add a failsafe on restart to prevent other exit codes from preventing restart

* feat: redirect into/from maintenance page

* refactor: use system metadata for maintenance status

* refactor: wait on WebSocket connection to refresh

* feat: broadcast websocket event on server restart
refactor: listen to WS instead of polling

* refactor: bubble up maintenance information instead of hijacking in fetch function
feat: show modal when server is restarting

* chore: increase timeout for ungraceful restart

* refactor: deduplicate code between api/maintenance workers

* fix: skip config check if database is not initialised

* fix: add `maintenanceMode` field to system config test

* refactor: move maintenance resolution code to static method in service

* chore: clean up linter issues

* chore: generate dart openapi

* refactor: use try{} block for maintenance mode check

* fix: logic error in server redirect

* chore: include `maintenanceMode` key in e2e test

* chore: add i18n entries for maintenance screens

* chore: remove negated condition from hook

* fix: should set default value not override in service

* fix: minor error in page

* feat: initial draft of maintenance module, repo., worker controller, worker service

* refactor: move broadcast code into notification service

* chore: connect websocket on client if in maintenance

* chore: set maintenance module app name

* refactor: rename repository to include worker
chore: configure websocket adapter

* feat: reimplement maintenance mode exit with new module

* refactor: add a constant enum for ExitCode

* refactor: remove redundant route for maintenance

* refactor: only spin up kysely on boot (rather than a Nest app)

* refactor(web): move redirect logic into +layout file where modal is setup

* feat: add Maintenance permission

* refactor: merge common code between api/maintenance

* fix: propagate changes from the CLI to servers

* feat: maintenance authentication guard

* refactor: unify maintenance code into repository
feat: add a step to generate maintenance mode token

* feat: jwt auth for maintenance

* refactor: switch from nest jwt to just jsonwebtokens

* feat: log into maintenance mode from CLI command

* refactor: use `secret` instead of `token` in jwt terminology
chore: log maintenance mode login URL on boot
chore: don't make CLI actions reload if already in target state

* docs: initial draft for maintenance mode page

* refactor: always validate the maintenance auth on the server

* feat: add a link to maintenance mode documentation

* feat: redirect users back to the last page they were on when exiting maintenance

* refactor: provide closeFn in both maintenance repos.

* refactor: ensure the user is also redirected by the server

* chore: swap jsonwebtoken for jose

* refactor: introduce AppRestartEvent w/o secret passing

* refactor: use navigation goto

* refactor: use `continue` instead of `next`

* chore: lint fixes for server

* chore: lint fixes for web

* test: add mock for maintenance repository

* test: add base service dependency to maintenance

* chore: remove @types/jsonwebtoken

* refactor: close database connection after startup check

* refactor: use `request#auth` key

* refactor: use service instead of repository
chore: read token from cookie if possible
chore: rename client event to AppRestartV1

* refactor: more concise redirect logic on web

* refactor: move redirect check into utils
refactor: update translation strings to be more sensible

* refactor: always validate login (i.e. check cookie)

* refactor: lint, open-api, remove old dto

* refactor: encode at point of usage

* refactor: remove business logic from repositories

* chore: fix server/web lints

* refactor: remove repository mock

* chore: fix formatting

* test: write service mocks for maintenance mode

* test: write cli service tests

* fix: catch errors when closing app

* fix: always report no maintenance when usual API is available

* test: api e2e maintenance spec

* chore: add response builder

* chore: add helper to set maint. auth cookie

* feat: add SSR to maintenance API

* test(e2e): write web spec for maintenance

* chore: clean up lint issues

* chore: format files

* feat: perform 302 redirect at server level during maintenance

* fix: keep trying to stop immich until it succeeds (CLI issue)

* chore: lint/format

* refactor: annotate references to other services in worker service

* chore: lint

* refactor: remove unnecessary await

Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>

* refactor: move static methods into util

* refactor: assert secret exists in maintenance worker

* refactor: remove assertion which isn't necessary anymore

* refactor: remove assertion

* refactor: remove outer try {} catch block from loadMaintenanceAuth

* refactor: undo earlier change to vite.config.ts

* chore: update tests due to refactors

* revert: vite.config.ts

* test: expect string jwt

* chore: move blanket exceptions into controllers

* test: update tests according with last change

* refactor: use respondWithCookie
refactor: merge start/end into one route
refactor: rename MaintenanceRepository to AppRepository
chore: use new ApiTag/Endpoint
refactor: apply other requested changes

* chore: regenerate openapi

* chore: lint/format

* chore: remove secureOnly for maint. cookie

* refactor: move maintenance worker code into src/maintenance\nfix: various test fixes

* refactor: use `action` property for setting maint. mode

* refactor: remove Websocket#restartApp in favour of individual methods

* chore: incomplete commit

* chore: remove stray log

* fix: call exitApp from maintenance worker on exit

* fix: add app repository mock

* fix: ensure maintenance cookies are secure

* fix: run playwright tests over secure context (localhost)

* test: update other references to 127.0.0.1

* refactor: use serverSideEmitWithAck

* chore: correct the logic in tryTerminate

* test: juggle cookies ourselves

* chore: fix lint error for e2e spec

* chore: format e2e test

* fix: set cookie secure/non-secure depending on context

* chore: format files

---------

Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
2025-11-17 17:15:44 +00:00
Jason Rasmussen
ce82e27f4b fix: workflow medium tests (#23952) 2025-11-17 16:26:30 +00:00