fix(server): don't delete offline library files from disk when clearing trash #28145
test.yml
on: pull_request
pre-job
8s
ShellCheck
7s
OpenAPI Clients
1m 46s
TypeORM Checks
1m 42s
Test & Lint Server
1m 59s
Unit Test CLI
0s
Unit Test CLI (Windows)
0s
Test & Lint Web
0s
End-to-End Lint
45s
Medium Tests (Server)
1m 52s
End-to-End Tests (Server & CLI)
3m 9s
End-to-End Tests (Web)
3m 4s
Unit Test Mobile
0s
Unit Test ML
0s
Annotations
10 errors and 6 warnings
TypeORM Checks
Process completed with exit code 1.
|
src/api/specs/asset.e2e-spec.ts > /asset > DELETE /assets > should permanently delete an asset from trash:
e2e/src/api/specs/asset.e2e-spec.ts#L809
AssertionError: expected 1 to be +0 // Object.is equality
- Expected
+ Received
- 0
+ 1
❯ src/api/specs/asset.e2e-spec.ts:809:27
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should scan external library with exclusion pattern:
e2e/src/api/specs/library.e2e-spec.ts#L325
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:325:28
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should set an asset offline if its file is missing:
e2e/src/api/specs/library.e2e-spec.ts#L482
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:482:28
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should set an asset offline if its file is not in any import path:
e2e/src/api/specs/library.e2e-spec.ts#L514
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:514:28
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should set an asset offline if its file is covered by an exclusion pattern:
e2e/src/api/specs/library.e2e-spec.ts#L569
AssertionError: expected [ { …(25) }, { …(25) }, { …(25) } ] to deeply equal [ ObjectContaining{…} ]
- Expected
+ Received
Array [
- ObjectContaining {
+ Object {
+ "checksum": "z4XsKxV2vTn71ZpzEKrjU9wZjEA=",
+ "deviceAssetId": "offline.png",
+ "deviceId": "Library Import",
+ "duplicateId": null,
+ "duration": "0:00:00.00000",
+ "fileCreatedAt": "2024-12-18T14:05:43.958Z",
+ "fileModifiedAt": "2024-12-18T14:05:43.958Z",
+ "hasMetadata": true,
+ "id": "74f7873d-1383-48ff-816b-e775941872ab",
+ "isArchived": false,
+ "isFavorite": false,
+ "isOffline": false,
+ "isTrashed": false,
+ "libraryId": "82bd9090-efeb-411f-a3a6-53c52cb54593",
+ "livePhotoVideoId": null,
+ "localDateTime": "2024-12-18T14:05:43.958Z",
+ "originalFileName": "offline.png",
+ "originalMimeType": "image/png",
+ "originalPath": "/test-assets/temp/offline/offline.png",
+ "ownerId": "ce8db20b-6eed-4561-98b9-481faba21f30",
+ "people": Array [],
+ "resized": true,
+ "thumbhash": "gQcCFwAI9wiIh4hwj3CI+AiIcH/4AAAA",
+ "type": "IMAGE",
+ "updatedAt": "2024-12-18T14:05:44.308Z",
+ },
+ Object {
+ "checksum": "hNpZqb2K/xOq4imfDL1cjDcsFUc=",
+ "deviceAssetId": "assetA.png",
+ "deviceId": "Library Import",
+ "duplicateId": null,
+ "duration": "0:00:00.00000",
+ "fileCreatedAt": "2024-12-18T14:05:41.450Z",
+ "fileModifiedAt": "2024-12-18T14:05:41.450Z",
+ "hasMetadata": true,
+ "id": "7aa5ddf8-9cb9-44f0-bd0e-f8e80a1c29ad",
+ "isArchived": false,
+ "isFavorite": false,
+ "isOffline": false,
+ "isTrashed": false,
+ "libraryId": "82bd9090-efeb-411f-a3a6-53c52cb54593",
+ "livePhotoVideoId": null,
+ "localDateTime": "2024-12-18T14:05:41.450Z",
"originalFileName": "assetA.png",
+ "originalMimeType": "image/png",
+ "originalPath": "/test-assets/temp/directoryA/assetA.png",
+ "ownerId": "ce8db20b-6eed-4561-98b9-481faba21f30",
+ "people": Array [],
+ "resized": true,
+ "thumbhash": "AAgCBwAAAAAAAAAAAAAAAAAAAAAAAAAA",
+ "type": "IMAGE",
+ "updatedAt": "2024-12-18T14:05:44.305Z",
+ },
+ Object {
+ "checksum": "g/4BWK1Mu77PbilCsmOLyR60I3U=",
+ "deviceAssetId": "offline2.png",
+ "deviceId": "Library Import",
+ "duplicateId": null,
+ "duration": "0:00:00.00000",
+ "fileCreatedAt": "2024-12-18T14:05:29.090Z",
+ "fileModifiedAt": "2024-12-18T14:05:29.090Z",
+ "hasMetadata": true,
+ "id": "08df6a4a-caa3-41a5-a5fe-10c0aaada3bf",
+ "isArchived": false,
+ "isFavorite": false,
+ "isOffline": false,
+ "isTrashed": false,
+ "libraryId": "82bd9090-efeb-411f-a3a6-53c52cb54593",
+ "livePhotoVideoId": null,
+ "localDateTime": "2024-12-18T14:05:29.090Z",
+ "originalFileName": "offline2.png",
+ "originalMimeType": "image/png",
+ "originalPath": "/test-assets/temp/offline/offline2.png",
+ "ownerId": "ce8db20b-6eed-4561-98b9-481faba21f30",
+ "people": Array [],
+ "resized": true,
+ "thumbhash": "AgcGPwAI9wiIh4hwj3CI+AiIcH/4AAAA",
+ "type": "IMAGE",
+ "updatedAt": "2024-12-18T14:05:44.303Z",
},
]
❯ src/api/specs/library.e2e-spec.ts:569:31
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should set an offline asset to online if its file exists, is in an import path, and not covered by an exclusion pattern:
e2e/src/api/specs/library.e2e-spec.ts#L633
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:633:30
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should not set an offline asset to online if its file exists, is not covered by an exclusion pattern, but is outside of all import paths:
e2e/src/api/specs/library.e2e-spec.ts#L687
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:687:30
|
src/api/specs/library.e2e-spec.ts > /libraries > POST /libraries/:id/scan > should not set an offline asset to online if its file exists, is in an import path, but is covered by an exclusion pattern:
e2e/src/api/specs/library.e2e-spec.ts#L755
AssertionError: expected 2 to be 1 // Object.is equality
- Expected
+ Received
- 1
+ 2
❯ src/api/specs/library.e2e-spec.ts:755:30
|
End-to-End Tests (Server & CLI)
Process completed with exit code 1.
|
ShellCheck
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
pre-job
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
End-to-End Lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
TypeORM Checks
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
OpenAPI Clients
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Test & Lint Server
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|