Skip to content

Commit

Permalink
feat: storage template file move hardening (immich-app#5917)
Browse files Browse the repository at this point in the history
* fix: pgvecto.rs extension breaks typeorm schema:drop command

* fix: parse postgres bigints to javascript number types when selecting data

* feat: verify file size is the same as original asset after copying file for storage template job

* feat: allow disabling of storage template job, defaults to disabled for new instances

* fix: don't allow setting concurrency for storage template migration, can cause race conditions above 1

* feat: add checksum verification when file is copied for storage template job

* fix: extract metadata for assets that aren't visible on timeline
  • Loading branch information
zackpollard authored Dec 29, 2023
1 parent 5f6bd4a commit 2e38fa7
Show file tree
Hide file tree
Showing 36 changed files with 685 additions and 224 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ jobs:
- name: Run existing migrations
run: npm run typeorm:migrations:run

- name: Test npm run schema:reset command works
run: npm run typeorm:schema:reset

- name: Generate new migrations
continue-on-error: true
run: npm run typeorm:migrations:generate ./src/infra/migrations/TestMigration
Expand Down
18 changes: 12 additions & 6 deletions cli/src/api/open-api/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ x-server-build: &server-common
volumes:
- ../server:/usr/src/app
- ${UPLOAD_LOCATION}/photos:/usr/src/app/upload
- ${UPLOAD_LOCATION}/photos/upload:/usr/src/app/upload/upload
- /usr/src/app/node_modules
- /etc/localtime:/etc/localtime:ro
env_file:
Expand Down
1 change: 0 additions & 1 deletion mobile/openapi/doc/SystemConfigJobDto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions mobile/openapi/doc/SystemConfigStorageTemplateDto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions mobile/openapi/lib/model/system_config_job_dto.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion mobile/openapi/lib/model/system_config_storage_template_dto.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions mobile/openapi/test/system_config_job_dto_test.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions mobile/openapi/test/system_config_storage_template_dto_test.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions server/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9171,9 +9171,6 @@
"smartSearch": {
"$ref": "#/components/schemas/JobSettingsDto"
},
"storageTemplateMigration": {
"$ref": "#/components/schemas/JobSettingsDto"
},
"thumbnailGeneration": {
"$ref": "#/components/schemas/JobSettingsDto"
},
Expand All @@ -9186,7 +9183,6 @@
"metadataExtraction",
"videoConversion",
"smartSearch",
"storageTemplateMigration",
"migration",
"backgroundTask",
"search",
Expand Down Expand Up @@ -9365,11 +9361,19 @@
},
"SystemConfigStorageTemplateDto": {
"properties": {
"enabled": {
"type": "boolean"
},
"hashVerificationEnabled": {
"type": "boolean"
},
"template": {
"type": "string"
}
},
"required": [
"enabled",
"hashVerificationEnabled",
"template"
],
"type": "object"
Expand Down
Loading

0 comments on commit 2e38fa7

Please sign in to comment.