[PR #3565] [MERGED] refactor(server, web)!: store latest immich version available on the server #10033

Closed
opened 2026-02-05 14:14:53 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/3565
Author: @martabal
Created: 8/5/2023
Status: Merged
Merged: 10/24/2023
Merged by: @jrasm91

Base: mainHead: refactor/immich-latest-version


📝 Commits (10+)

📊 Changes

48 files changed (+656 additions, -100 deletions)

View changed files

📝 cli/src/api/open-api/api.ts (+19 -0)
📝 mobile/lib/shared/providers/websocket.provider.dart (+5 -9)
📝 mobile/openapi/.openapi-generator/FILES (+3 -0)
📝 mobile/openapi/README.md (+1 -0)
📝 mobile/openapi/doc/SystemConfigDto.md (+1 -0)
mobile/openapi/doc/SystemConfigNewVersionCheckDto.md (+15 -0)
📝 mobile/openapi/lib/api.dart (+1 -0)
📝 mobile/openapi/lib/api_client.dart (+2 -0)
📝 mobile/openapi/lib/model/system_config_dto.dart (+9 -1)
mobile/openapi/lib/model/system_config_new_version_check_dto.dart (+98 -0)
📝 mobile/openapi/test/system_config_dto_test.dart (+5 -0)
mobile/openapi/test/system_config_new_version_check_dto_test.dart (+27 -0)
📝 server/immich-openapi-specs.json (+15 -0)
📝 server/src/domain/album/dto/get-albums.dto.ts (+1 -1)
📝 server/src/domain/domain.constant.spec.ts (+69 -2)
📝 server/src/domain/domain.constant.ts (+43 -8)
📝 server/src/domain/job/job.constants.ts (+1 -1)
📝 server/src/domain/repositories/communication.repository.ts (+4 -0)
📝 server/src/domain/repositories/index.ts (+1 -0)
📝 server/src/domain/repositories/job.repository.ts (+1 -1)

...and 28 more files

📄 Description

Warning


Breaking Change - the websocket message format has changed, so some functions will not work properly unless the server and mobile client are on the same version.


Currently, every time the admins hit refresh, they hit the GitHub API to retrieve the latest Immich version. If the version on GitHub differs from the server version, the web and mobile clients will notify the admins about the availability of a new Immich version.

However, excessive web refreshes ( by consequences on the GitHub API too ) can lead Github to ban your public IP address. To mitigate this risk and improve the users privacies, this PR move the logic from the clients to the server. Now, the server will fetch the latest Immich version from GitHub every 1 hour (not configurable for now).

WebUI changes :

Screenshot from 2023-08-12 11-26-38


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/3565 **Author:** [@martabal](https://github.com/martabal) **Created:** 8/5/2023 **Status:** ✅ Merged **Merged:** 10/24/2023 **Merged by:** [@jrasm91](https://github.com/jrasm91) **Base:** `main` ← **Head:** `refactor/immich-latest-version` --- ### 📝 Commits (10+) - [`d7f72d7`](https://github.com/immich-app/immich/commit/d7f72d741f6bf698599b96329b7373c9a8b76c33) refactor: store latest immich version available on the server - [`f574118`](https://github.com/immich-app/immich/commit/f574118e8a00167b645eb7c0e3889beb851a5b33) merge main - [`dd1932e`](https://github.com/immich-app/immich/commit/dd1932e1e0a76c57051f0e3b9bb2dc6e67fe2597) don't store admins acknowledgement - [`9a885e4`](https://github.com/immich-app/immich/commit/9a885e4c88f766141140746df246d1f5420827f7) merge main - [`893a840`](https://github.com/immich-app/immich/commit/893a840ba1e23531b529493d9d103fd2372ea18b) merge main - [`a314318`](https://github.com/immich-app/immich/commit/a314318963987f487fc50e43f6018f21931b93a1) fix: api - [`c7ee59f`](https://github.com/immich-app/immich/commit/c7ee59fa93d5a5508de6fc98a779917ce35c964c) feat: custom interval - [`873d196`](https://github.com/immich-app/immich/commit/873d196d121eb66a8c0ea807c679c5dffd67c820) pr feedback - [`614c61e`](https://github.com/immich-app/immich/commit/614c61e4c7c47872db5eeaae06df001b2763f74a) remove unused code - [`a0d1a48`](https://github.com/immich-app/immich/commit/a0d1a48317755877670bb8b120eabdf5099ab540) update environment-variables ### 📊 Changes **48 files changed** (+656 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `cli/src/api/open-api/api.ts` (+19 -0) 📝 `mobile/lib/shared/providers/websocket.provider.dart` (+5 -9) 📝 `mobile/openapi/.openapi-generator/FILES` (+3 -0) 📝 `mobile/openapi/README.md` (+1 -0) 📝 `mobile/openapi/doc/SystemConfigDto.md` (+1 -0) ➕ `mobile/openapi/doc/SystemConfigNewVersionCheckDto.md` (+15 -0) 📝 `mobile/openapi/lib/api.dart` (+1 -0) 📝 `mobile/openapi/lib/api_client.dart` (+2 -0) 📝 `mobile/openapi/lib/model/system_config_dto.dart` (+9 -1) ➕ `mobile/openapi/lib/model/system_config_new_version_check_dto.dart` (+98 -0) 📝 `mobile/openapi/test/system_config_dto_test.dart` (+5 -0) ➕ `mobile/openapi/test/system_config_new_version_check_dto_test.dart` (+27 -0) 📝 `server/immich-openapi-specs.json` (+15 -0) 📝 `server/src/domain/album/dto/get-albums.dto.ts` (+1 -1) 📝 `server/src/domain/domain.constant.spec.ts` (+69 -2) 📝 `server/src/domain/domain.constant.ts` (+43 -8) 📝 `server/src/domain/job/job.constants.ts` (+1 -1) 📝 `server/src/domain/repositories/communication.repository.ts` (+4 -0) 📝 `server/src/domain/repositories/index.ts` (+1 -0) 📝 `server/src/domain/repositories/job.repository.ts` (+1 -1) _...and 28 more files_ </details> ### 📄 Description > **warning** > Breaking Change - the websocket message format has changed, so some functions will not work properly unless the server and mobile client are on the same version. <hr> Currently, every time the admins hit refresh, they hit the GitHub API to retrieve the latest Immich version. If the version on GitHub differs from the server version, the web and mobile clients will notify the admins about the availability of a new Immich version. However, excessive web refreshes ( by consequences on the GitHub API too ) can lead Github to ban your public IP address. To mitigate this risk and improve the users privacies, this PR move the logic from the clients to the server. Now, the server will fetch the latest Immich version from GitHub every 1 hour (not configurable for now). WebUI changes : ![Screenshot from 2023-08-12 11-26-38](https://github.com/immich-app/immich/assets/74269598/7e422549-ec47-4ad5-a82e-bb61d0b6ad04) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:14:53 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10033