Skip to content

refactor: migrate shared-link repository to kysely #28926

refactor: migrate shared-link repository to kysely

refactor: migrate shared-link repository to kysely #28926

Triggered via pull request January 12, 2025 20:44
Status Failure
Total duration 3m 59s
Artifacts

test.yml

on: pull_request
Test & Lint Server
1m 54s
Test & Lint Server
Unit Test CLI
0s
Unit Test CLI
Unit Test CLI (Windows)
0s
Unit Test CLI (Windows)
Test & Lint Web
0s
Test & Lint Web
End-to-End Lint
0s
End-to-End Lint
Medium Tests (Server)
1m 57s
Medium Tests (Server)
End-to-End Tests (Server & CLI)
3m 32s
End-to-End Tests (Server & CLI)
End-to-End Tests (Web)
0s
End-to-End Tests (Web)
Unit Test Mobile
0s
Unit Test Mobile
Unit Test ML
0s
Unit Test ML
Fit to window
Zoom out
Zoom in

Annotations

13 errors and 5 warnings
TypeORM Checks
Process completed with exit code 1.
src/services/shared-link.service.spec.ts > SharedLinkService > addAssets > should add assets to a shared link: server/src/services/shared-link.service.spec.ts#L257
AssertionError: expected "spy" to be called with arguments: [ { id: '123', …(12) } ] Received: 1st spy call: Array [ Object { "album": undefined, "allowDownload": true, "allowUpload": true, + "assetIds": Array [ + "asset-3", + ], "assets": Array [ Object { "checksum": Object { "data": Array [ 102, 105, 108, 101, 32, 104, 97, 115, 104, ], "type": "Buffer", }, "createdAt": 2023-02-23T05:06:29.716Z, "deletedAt": null, "deviceAssetId": "device-asset-id", "deviceId": "device-id", "duplicateId": null, "duration": null, "encodedVideoPath": null, "exifInfo": Object { "exifImageHeight": 3840, "exifImageWidth": 2160, "fileSizeInByte": 5000, }, "faces": Array [], "fileCreatedAt": 2023-02-23T05:06:29.716Z, "fileModifiedAt": 2023-02-23T05:06:29.716Z, "files": Array [ Object { "assetId": "asset-id", "createdAt": 2023-02-23T05:06:29.716Z, "id": "file-1", "path": "/uploads/user-id/thumbs/path.jpg", "type": "preview", "updatedAt": 2023-02-23T05:06:29.716Z, }, Object { "assetId": "asset-id", "createdAt": 2023-02-23T05:06:29.716Z, "id": "file-2", "path": "/uploads/user-id/webp/path.ext", "type": "thumbnail", "updatedAt": 2023-02-23T05:06:29.716Z, }, ], "id": "asset-id", "isArchived": false, "isExternal": false, "isFavorite": true, "isOffline": false, "isVisible": true, "livePhotoVideo": null, "livePhotoVideoId": null, "localDateTime": 2023-02-23T05:06:29.716Z, "originalFileName": "asset-id.jpg", "originalPath": "/original/path.jpg", "owner": Object { "assets": Array [], "createdAt": 2021-01-01T00:00:00.000Z, "deletedAt": null, "email": "[email protected]", "id": "user-id", "isAdmin": false, "metadata": Array [ Object { "key": "preferences", "user": Object { "email": "[email protected]", "id": "user-id", "isAdmin": false, "metadata": Array [], }, "userId": "user-id", "value": Object { "avatar": Object { "color": "primary", }, }, }, ], "name": "immich_name", "oauthId": "", "password": "immich_password", "profileImagePath": "", "quotaSizeInBytes": null, "quotaUsageInBytes": 0, "shouldChangePassword": false, "storageLabel": null, "tags": Array [], "updatedAt": 2021-01-01T00:00:00.000Z, }, "ownerId": "user-id", "sharedLinks": Array [], "sidecarPath": null, "status": "active", "tags": Array [], "thumbhash": Object { "data": Array [ 110, 86, 155, 149, 166, 229, ], "type": "Buffer", }, "type": "IMAGE", "updatedAt": 2023-02-23T05:06:29.716Z, - }, - Object { - "id": "asset-3", }, ], "createdAt": 2025-01-12T20:46:51.051Z, "description": null, "expiresAt": 2025-01-13T20:46:51.051Z, "id": "123", "key": Object { "data": Array [ 44, 43, 100,
Test & Lint Server
Process completed with exit code 1.
src/api/specs/asset.e2e-spec.ts > /asset > GET /assets/:id > should work with a shared link: e2e/src/api/specs/asset.e2e-spec.ts#L297
AssertionError: expected 401 to be 200 // Object.is equality - Expected + Received - 200 + 401 ❯ src/api/specs/asset.e2e-spec.ts:297:22
src/api/specs/asset.e2e-spec.ts > /asset > GET /assets/:id > should not send people data for shared links for un-authenticated users: e2e/src/api/specs/asset.e2e-spec.ts#L327
AssertionError: expected 401 to be 200 // Object.is equality - Expected + Received - 200 + 401 ❯ src/api/specs/asset.e2e-spec.ts:327:27
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /share/${key} > should have correct asset count in meta tag for non-empty album: e2e/src/api/specs/shared-link.e2e-spec.ts#L97
AssertionError: expected '<!doctype html>\n<html>\n <head>\n …' to contain '<meta name="description" content="1 s…' - Expected + Received - <meta name="description" content="1 shared photos & videos" /> + <!doctype html> + <html> + <head> + <!-- (used for SSR) --> + <!-- metadata:tags --> + + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> + <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" /> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" /> + <link rel="icon" type="image/png" sizes="48x48" href="/favicon-48.png" /> + <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png" /> + <link rel="icon" type="image/png" sizes="144x144" href="/favicon-144.png" /> + <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180.png" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/Overpass.DCP28BvT.ttf" crossorigin="anonymous" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/OverpassMono.XkUhFDDw.ttf" crossorigin="anonymous" /> + + <link rel="modulepreload" href="/_app/immutable/entry/start.9KJMwAVo.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/entry.CPGo1nC2.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index-client.Bq_4at91.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index.BFqC5wTN.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/control.CYgJF_JY.js"> + <link rel="modulepreload" href="/_app/immutable/entry/app.DM86aUN4.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/preload-helper.C1FmrZbK.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-client.DqMPutSq.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-errors.CAIzt49F.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/legacy-client.BO5A-5fP.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/if.Cw0s6vaE.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/disclose-version.Bg9kRutz.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/svelte-component.2Np7AOWv.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/this.BAuFNLfh.js"> + <style> + /* prevent FOUC */ + html { + height: 100%; + width: 100%; + } + + body, + html { + margin: 0; + padding: 0; + } + + @Keyframes delayedVisibility { + to { + visibility: visible; + } + } + + @Keyframes loadspin { + 100% { + transform: rotate(360deg); + } + } + + #stencil { + --stencil-width: 150px; + display: flex; + width: var(--stencil-width); + margin-left: auto; + margin-right: auto; + margin-top: calc(50vh - var(--stencil-width) / 2); + margin-bottom: 100vh; + place-items: center; + justify-content: center; + overflow: hidden; + visibility: hidden; + animation: + 0s linear 0.3s forwards delayedVisibility, + loadspin 8s linear infinite; + } + + .bg-immich-bg { + background-color: white; + } + + .dark .dark\:bg-immich-dark-bg { + background-color: black; + } + </style> + <script> + /** + * Prevent FOUC on page load. + */ + const colorThemeKeyName = 'color-theme'; + + let theme = localStorage.getItem(colorThemeKeyName); + if (!theme) { + theme = { value: 'light', system: true }; + } else if (theme === 'dark' || theme === 'light') { + theme = { value: theme, system: false }; + localStorage.setItem(colorThemeKeyName, JSON.stringify(theme)); + } else { + theme = JSON.parse(theme); + } + + let themeValue = theme.value; + if (theme.system
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /share/${key} > should have correct asset count in meta tag for empty album: e2e/src/api/specs/shared-link.e2e-spec.ts#L106
AssertionError: expected '<!doctype html>\n<html>\n <head>\n …' to contain '<meta name="description" content="0 s…' - Expected + Received - <meta name="description" content="0 shared photos & videos" /> + <!doctype html> + <html> + <head> + <!-- (used for SSR) --> + <!-- metadata:tags --> + + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> + <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" /> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" /> + <link rel="icon" type="image/png" sizes="48x48" href="/favicon-48.png" /> + <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png" /> + <link rel="icon" type="image/png" sizes="144x144" href="/favicon-144.png" /> + <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180.png" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/Overpass.DCP28BvT.ttf" crossorigin="anonymous" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/OverpassMono.XkUhFDDw.ttf" crossorigin="anonymous" /> + + <link rel="modulepreload" href="/_app/immutable/entry/start.9KJMwAVo.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/entry.CPGo1nC2.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index-client.Bq_4at91.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index.BFqC5wTN.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/control.CYgJF_JY.js"> + <link rel="modulepreload" href="/_app/immutable/entry/app.DM86aUN4.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/preload-helper.C1FmrZbK.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-client.DqMPutSq.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-errors.CAIzt49F.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/legacy-client.BO5A-5fP.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/if.Cw0s6vaE.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/disclose-version.Bg9kRutz.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/svelte-component.2Np7AOWv.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/this.BAuFNLfh.js"> + <style> + /* prevent FOUC */ + html { + height: 100%; + width: 100%; + } + + body, + html { + margin: 0; + padding: 0; + } + + @Keyframes delayedVisibility { + to { + visibility: visible; + } + } + + @Keyframes loadspin { + 100% { + transform: rotate(360deg); + } + } + + #stencil { + --stencil-width: 150px; + display: flex; + width: var(--stencil-width); + margin-left: auto; + margin-right: auto; + margin-top: calc(50vh - var(--stencil-width) / 2); + margin-bottom: 100vh; + place-items: center; + justify-content: center; + overflow: hidden; + visibility: hidden; + animation: + 0s linear 0.3s forwards delayedVisibility, + loadspin 8s linear infinite; + } + + .bg-immich-bg { + background-color: white; + } + + .dark .dark\:bg-immich-dark-bg { + background-color: black; + } + </style> + <script> + /** + * Prevent FOUC on page load. + */ + const colorThemeKeyName = 'color-theme'; + + let theme = localStorage.getItem(colorThemeKeyName); + if (!theme) { + theme = { value: 'light', system: true }; + } else if (theme === 'dark' || theme === 'light') { + theme = { value: theme, system: false }; + localStorage.setItem(colorThemeKeyName, JSON.stringify(theme)); + } else { + theme = JSON.parse(theme); + } + + let themeValue = theme.value; + if (theme.system
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /share/${key} > should have correct asset count in meta tag for shared asset: e2e/src/api/specs/shared-link.e2e-spec.ts#L113
AssertionError: expected '<!doctype html>\n<html>\n <head>\n …' to contain '<meta name="description" content="1 s…' - Expected + Received - <meta name="description" content="1 shared photos & videos" /> + <!doctype html> + <html> + <head> + <!-- (used for SSR) --> + <!-- metadata:tags --> + + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> + <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" /> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" /> + <link rel="icon" type="image/png" sizes="48x48" href="/favicon-48.png" /> + <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png" /> + <link rel="icon" type="image/png" sizes="144x144" href="/favicon-144.png" /> + <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180.png" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/Overpass.DCP28BvT.ttf" crossorigin="anonymous" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/OverpassMono.XkUhFDDw.ttf" crossorigin="anonymous" /> + + <link rel="modulepreload" href="/_app/immutable/entry/start.9KJMwAVo.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/entry.CPGo1nC2.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index-client.Bq_4at91.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index.BFqC5wTN.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/control.CYgJF_JY.js"> + <link rel="modulepreload" href="/_app/immutable/entry/app.DM86aUN4.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/preload-helper.C1FmrZbK.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-client.DqMPutSq.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-errors.CAIzt49F.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/legacy-client.BO5A-5fP.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/if.Cw0s6vaE.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/disclose-version.Bg9kRutz.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/svelte-component.2Np7AOWv.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/this.BAuFNLfh.js"> + <style> + /* prevent FOUC */ + html { + height: 100%; + width: 100%; + } + + body, + html { + margin: 0; + padding: 0; + } + + @Keyframes delayedVisibility { + to { + visibility: visible; + } + } + + @Keyframes loadspin { + 100% { + transform: rotate(360deg); + } + } + + #stencil { + --stencil-width: 150px; + display: flex; + width: var(--stencil-width); + margin-left: auto; + margin-right: auto; + margin-top: calc(50vh - var(--stencil-width) / 2); + margin-bottom: 100vh; + place-items: center; + justify-content: center; + overflow: hidden; + visibility: hidden; + animation: + 0s linear 0.3s forwards delayedVisibility, + loadspin 8s linear infinite; + } + + .bg-immich-bg { + background-color: white; + } + + .dark .dark\:bg-immich-dark-bg { + background-color: black; + } + </style> + <script> + /** + * Prevent FOUC on page load. + */ + const colorThemeKeyName = 'color-theme'; + + let theme = localStorage.getItem(colorThemeKeyName); + if (!theme) { + theme = { value: 'light', system: true }; + } else if (theme === 'dark' || theme === 'light') { + theme = { value: theme, system: false }; + localStorage.setItem(colorThemeKeyName, JSON.stringify(theme)); + } else { + theme = JSON.parse(theme); + } + + let themeValue = theme.value; + if (theme.system
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /share/${key} > should have fqdn og:image meta tag for shared asset: e2e/src/api/specs/shared-link.e2e-spec.ts#L120
AssertionError: expected '<!doctype html>\n<html>\n <head>\n …' to contain '<meta property="og:image" content="ht…' - Expected + Received - <meta property="og:image" content="http:// + <!doctype html> + <html> + <head> + <!-- (used for SSR) --> + <!-- metadata:tags --> + + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> + <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" /> + <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" /> + <link rel="icon" type="image/png" sizes="48x48" href="/favicon-48.png" /> + <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png" /> + <link rel="icon" type="image/png" sizes="144x144" href="/favicon-144.png" /> + <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180.png" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/Overpass.DCP28BvT.ttf" crossorigin="anonymous" /> + <link rel="preload" as="font" type="font/ttf" href="/_app/immutable/assets/OverpassMono.XkUhFDDw.ttf" crossorigin="anonymous" /> + + <link rel="modulepreload" href="/_app/immutable/entry/start.9KJMwAVo.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/entry.CPGo1nC2.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index-client.Bq_4at91.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/index.BFqC5wTN.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/control.CYgJF_JY.js"> + <link rel="modulepreload" href="/_app/immutable/entry/app.DM86aUN4.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/preload-helper.C1FmrZbK.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-client.DqMPutSq.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/fetch-errors.CAIzt49F.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/legacy-client.BO5A-5fP.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/if.Cw0s6vaE.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/disclose-version.Bg9kRutz.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/svelte-component.2Np7AOWv.js"> + <link rel="modulepreload" href="/_app/immutable/chunks/this.BAuFNLfh.js"> + <style> + /* prevent FOUC */ + html { + height: 100%; + width: 100%; + } + + body, + html { + margin: 0; + padding: 0; + } + + @Keyframes delayedVisibility { + to { + visibility: visible; + } + } + + @Keyframes loadspin { + 100% { + transform: rotate(360deg); + } + } + + #stencil { + --stencil-width: 150px; + display: flex; + width: var(--stencil-width); + margin-left: auto; + margin-right: auto; + margin-top: calc(50vh - var(--stencil-width) / 2); + margin-bottom: 100vh; + place-items: center; + justify-content: center; + overflow: hidden; + visibility: hidden; + animation: + 0s linear 0.3s forwards delayedVisibility, + loadspin 8s linear infinite; + } + + .bg-immich-bg { + background-color: white; + } + + .dark .dark\:bg-immich-dark-bg { + background-color: black; + } + </style> + <script> + /** + * Prevent FOUC on page load. + */ + const colorThemeKeyName = 'color-theme'; + + let theme = localStorage.getItem(colorThemeKeyName); + if (!theme) { + theme = { value: 'light', system: true }; + } else if (theme === 'dark' || theme === 'light') { + theme = { value: theme, system: false }; + localStorage.setItem(colorThemeKeyName, JSON.stringify(theme)); + } else { + theme = JSON.parse(theme); + } + + let themeValue = theme.value; + if (theme.system) { + if (wi
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /shared-links/me > should get data for correct shared link: e2e/src/api/specs/shared-link.e2e-spec.ts#L170
AssertionError: expected 401 to be 200 // Object.is equality - Expected + Received - 200 + 401 ❯ src/api/specs/shared-link.e2e-spec.ts:170:22
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /shared-links/me > should return unauthorized for password protected link: e2e/src/api/specs/shared-link.e2e-spec.ts#L200
AssertionError: expected { message: 'Invalid share key', …(3) } to deeply equal { error: 'Unauthorized', …(3) } - Expected + Received Object { "correlationId": Any<String>, "error": "Unauthorized", - "message": "Invalid password", + "message": "Invalid share key", "statusCode": 401, } ❯ src/api/specs/shared-link.e2e-spec.ts:200:20
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /shared-links/me > should get data for correct password protected link: e2e/src/api/specs/shared-link.e2e-spec.ts#L208
AssertionError: expected 401 to be 200 // Object.is equality - Expected + Received - 200 + 401 ❯ src/api/specs/shared-link.e2e-spec.ts:208:22
src/api/specs/shared-link.e2e-spec.ts > /shared-links > GET /shared-links/me > should return metadata for album shared link: e2e/src/api/specs/shared-link.e2e-spec.ts#L221
AssertionError: expected 401 to be 200 // Object.is equality - Expected + Received - 200 + 401 ❯ src/api/specs/shared-link.e2e-spec.ts:221:22
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
OpenAPI Clients
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
Test & Lint Server
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636