From 66f4e1e74bed7d14efebfd3150fc0fe77a37f6e5 Mon Sep 17 00:00:00 2001 From: Github Action Automation Date: Sat, 19 Aug 2023 08:34:29 +0000 Subject: [PATCH 1/7] Bump version to v1.74.0 --- VERSION | 2 +- parts/machine-learning/Makefile | 2 +- patches/Makefile | 2 +- snap/snapcraft.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index d2d9366..0b3dbbf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.73.0 +v1.74.0 diff --git a/parts/machine-learning/Makefile b/parts/machine-learning/Makefile index 688c752..b50103e 100644 --- a/parts/machine-learning/Makefile +++ b/parts/machine-learning/Makefile @@ -1,6 +1,6 @@ .PHONY: build build: - ./build.sh v1.73.0 + ./build.sh v1.74.0 .PHONY: install install: diff --git a/patches/Makefile b/patches/Makefile index df0c994..90f5567 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -1,4 +1,4 @@ -VERSION=v1.73.0 +VERSION=v1.74.0 SOURCE_FILE_PATH=https://raw.githubusercontent.com/immich-app/immich/${VERSION}/web/src/lib/components/shared-components/version-announcement-box.svelte download-patch: diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e42d0ca..fe8e9c3 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -182,7 +182,7 @@ parts: plugin: npm npm-node-version: "18.16.0" source: https://github.com/immich-app/immich.git - source-tag: v1.73.0 + source-tag: v1.74.0 source-subdir: server override-build: | snapcraftctl set-version "$(git describe --tags)-dist1" @@ -255,7 +255,7 @@ parts: plugin: npm npm-node-version: "18.16.0" source: https://github.com/immich-app/immich.git - source-tag: v1.73.0 + source-tag: v1.74.0 source-subdir: web override-build: | patch -p0 -i $SNAPCRAFT_PART_SRC/../../patches/src/001-version-announcement-box.patch -d $SNAPCRAFT_PART_BUILD From 5b328e94dbc5c5ddd89a51cec1d14b730fe4cc9e Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 10:51:32 +0200 Subject: [PATCH 2/7] Upstream changes to version announcement modal --- patches/001-version-announcement-box.patch | 4 ++-- patches/src/version-announcement-box-snap.svelte | 6 +++--- patches/src/version-announcement-box.svelte | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/001-version-announcement-box.patch b/patches/001-version-announcement-box.patch index 3c9c9b2..41ba6f7 100644 --- a/patches/001-version-announcement-box.patch +++ b/patches/001-version-announcement-box.patch @@ -1,5 +1,5 @@ ---- web/src/lib/components/shared-components/version-announcement-box.svelte 2023-07-20 20:45:53.673236581 +0200 -+++ web/src/lib/components/shared-components/version-announcement-box-snap.svelte 2023-07-20 21:19:55.952997300 +0200 +--- web/src/lib/components/shared-components/version-announcement-box.svelte 2023-08-19 10:50:26.428774805 +0200 ++++ web/src/lib/components/shared-components/version-announcement-box-snap.svelte 2023-08-19 10:51:08.320877048 +0200 @@ -48,20 +48,28 @@

🎉 NEW VERSION AVAILABLE 🎉

diff --git a/patches/src/version-announcement-box-snap.svelte b/patches/src/version-announcement-box-snap.svelte index e6296e8..6d9a660 100644 --- a/patches/src/version-announcement-box-snap.svelte +++ b/patches/src/version-announcement-box-snap.svelte @@ -2,16 +2,16 @@ import { getGithubVersion } from '$lib/utils/get-github-version'; import { onMount } from 'svelte'; import FullScreenModal from './full-screen-modal.svelte'; - import type { ServerVersionReponseDto } from '@api'; + import type { ServerVersionResponseDto } from '@api'; import Button from '../elements/buttons/button.svelte'; - export let serverVersion: ServerVersionReponseDto; + export let serverVersion: ServerVersionResponseDto; let showModal = false; let githubVersion: string; $: serverVersionName = semverToName(serverVersion); - function semverToName({ major, minor, patch }: ServerVersionReponseDto) { + function semverToName({ major, minor, patch }: ServerVersionResponseDto) { return `v${major}.${minor}.${patch}`; } diff --git a/patches/src/version-announcement-box.svelte b/patches/src/version-announcement-box.svelte index a59ab0e..af98568 100644 --- a/patches/src/version-announcement-box.svelte +++ b/patches/src/version-announcement-box.svelte @@ -2,16 +2,16 @@ import { getGithubVersion } from '$lib/utils/get-github-version'; import { onMount } from 'svelte'; import FullScreenModal from './full-screen-modal.svelte'; - import type { ServerVersionReponseDto } from '@api'; + import type { ServerVersionResponseDto } from '@api'; import Button from '../elements/buttons/button.svelte'; - export let serverVersion: ServerVersionReponseDto; + export let serverVersion: ServerVersionResponseDto; let showModal = false; let githubVersion: string; $: serverVersionName = semverToName(serverVersion); - function semverToName({ major, minor, patch }: ServerVersionReponseDto) { + function semverToName({ major, minor, patch }: ServerVersionResponseDto) { return `v${major}.${minor}.${patch}`; } From 18f7d25fb037c8861673f52fc16f4fc83527a1ac Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 11:41:01 +0200 Subject: [PATCH 3/7] I _think_ all dependencies are included already --- snap/snapcraft.yaml | 52 --------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fe8e9c3..316cb85 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -196,58 +196,6 @@ parts: cp -r bin $SNAPCRAFT_PART_INSTALL/usr/src/app cp package.json $SNAPCRAFT_PART_INSTALL/usr/src/app cp start-server.sh start-microservices.sh $SNAPCRAFT_PART_INSTALL/usr/src/app - stage-packages: - - libc-ares2 - - libicu66 - - libnghttp2-14 - - libnode64 - - libuv1 - - libaec0 - - libcairo-gobject2 - - libcairo2 - - libcfitsio8 - - libcurl3-gnutls - - libdatrie1 - - libexif12 - - libfftw3-double3 - - libfribidi0 - - libgdk-pixbuf2.0-0 - - libgif7 - - libgraphite2-3 - - libgsf-1-114 - - libharfbuzz0b - - libhdf5-103 - - libilmbase24 - - libimagequant0 - - libjbig0 - - libjpeg-turbo8 - - liblcms2-2 - - liblqr-1-0 - - libltdl7 - - libmagickcore-6.q16-6 - - libmatio9 - - libnspr4 - - libnss3 - - libopenexr24 - - libopenjp2-7 - - libopenslide0 - - liborc-0.4-0 - - libpango-1.0-0 - - libpangocairo-1.0-0 - - libpangoft2-1.0-0 - - libpixman-1-0 - - libpoppler-glib8 - - libpoppler97 - - librsvg2-2 - - libsz2 - - libthai0 - - libtiff5 - - libwebp6 - - libwebpdemux2 - - libwebpmux3 - - libxcb-render0 - - libxcb-shm0 - - libxml2 after: - dependencies From 23626767147de336d1c4af80279f3780df86d456 Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 12:10:07 +0200 Subject: [PATCH 4/7] Change typesense loglevel Upstream added this, looks good! --- src/bin/typesense | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/typesense b/src/bin/typesense index 48a1520..4fc49eb 100755 --- a/src/bin/typesense +++ b/src/bin/typesense @@ -8,4 +8,5 @@ if [ -z $TYPESENSE_API_KEY ]; then exit 1 fi -$SNAP/bin/typesense-server 2>&1 | grep -Ev "raft_server.cpp:546|raft_server.h:60|Running GC for aborted requests" +export GLOG_minloglevel=1 +$SNAP/bin/typesense-server From ab66c0e06f3b9873fb29e46eafcce80891ca07c1 Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 13:18:10 +0200 Subject: [PATCH 5/7] Remove edge snap test --- .github/workflows/system-tests-edge.yaml | 53 ------------------------ 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/system-tests-edge.yaml diff --git a/.github/workflows/system-tests-edge.yaml b/.github/workflows/system-tests-edge.yaml deleted file mode 100644 index 803a7a7..0000000 --- a/.github/workflows/system-tests-edge.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: Run System Tests on Edge Snap - -on: - push: - branches: - - 'bump/**' - paths-ignore: - - 'docs/**' - - '*.md' - - 'LICENSE' - - pull_request: - branches: [ "master" ] - paths-ignore: - - 'docs/**' - - '*.md' - - 'LICENSE' - - workflow_dispatch: - -jobs: - build-and-test-snap: - runs-on: ubuntu-latest - - services: - selenium: - image: selenium/standalone-chrome:latest - options: --shm-size=2gb - ports: - - 4444:4444 - - steps: - - uses: actions/checkout@v3 - - - name: Install package - run: | - sudo snap install --edge immich-distribution - - - name: Install requirements - run: pip install -r tests/requirements.txt - - - name: Run Selenium Tests - run: make ci -C tests - - - name: Upload test report - uses: actions/upload-artifact@v3 - if: always() - with: - name: selenium-test-report - path: | - tests/report.html - tests/assets/style.css - tests/latest_logs From 65d73396dfbed9ca461cf4f9780cb19817a1b48a Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 13:30:05 +0200 Subject: [PATCH 6/7] Detect duplicate jobs with code --- .github/workflows/system-tests.yaml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/system-tests.yaml b/.github/workflows/system-tests.yaml index 710bb75..18a2a1b 100644 --- a/.github/workflows/system-tests.yaml +++ b/.github/workflows/system-tests.yaml @@ -19,9 +19,31 @@ on: workflow_dispatch: jobs: - build-and-test-snap: + prepare: runs-on: ubuntu-latest + outputs: + runjob: ${{ steps.detect.outputs.runjob }} + + steps: + - uses: actions/checkout@v3 + + - name: Detect if this commit already have an active workflow running + id: detect + env: + GH_TOKEN: ${{ github.token }} + run: | + sleep $(( RANDOM % 10 )) + if gh run list --status in_progress --json headSha --jq ".[].headSha" | grep -q "$GITHUB_SHA"; then + echo "This commit already have an active workflow running, canceling this one." + echo "runjob=yes" >> $GITHUB_OUTPUT + fi + + build-and-test: + runs-on: ubuntu-latest + needs: [ prepare ] + if: ${{ needs.prepare.outputs.runjob == 'yes' }} + services: selenium: image: selenium/standalone-chrome:latest @@ -37,11 +59,6 @@ jobs: run: | sudo snap install --dangerous *.snap - # - name: Install package - # run: | - # sudo snap install --edge immich-distribution - - - name: Install requirements run: pip install -r tests/requirements.txt From 0f003ca9b18363d69cdab99a884b11e43eea0c58 Mon Sep 17 00:00:00 2001 From: Stefan Berggren Date: Sat, 19 Aug 2023 16:19:32 +0200 Subject: [PATCH 7/7] Split build and test to separate jobs --- .github/workflows/system-tests.yaml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/system-tests.yaml b/.github/workflows/system-tests.yaml index 18a2a1b..05fb7fc 100644 --- a/.github/workflows/system-tests.yaml +++ b/.github/workflows/system-tests.yaml @@ -39,11 +39,26 @@ jobs: echo "runjob=yes" >> $GITHUB_OUTPUT fi - build-and-test: + build: + name: Build Snap Package runs-on: ubuntu-latest needs: [ prepare ] if: ${{ needs.prepare.outputs.runjob == 'yes' }} + steps: + - uses: actions/checkout@v3 + - uses: snapcore/action-build@v1 + - uses: actions/cache/save@v3 + with: + path: "*.snap" + key: ${{ github.workflow }}-${{ github.sha }} + + test: + name: Install and Test Snap Package + runs-on: ubuntu-latest + needs: [ prepare, build ] + if: ${{ needs.prepare.outputs.runjob == 'yes' }} + services: selenium: image: selenium/standalone-chrome:latest @@ -53,11 +68,13 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: snapcore/action-build@v1 - + - uses: actions/cache/restore@v3 + with: + path: "*.snap" + key: ${{ github.workflow }}-${{ github.sha }} + - name: Install package - run: | - sudo snap install --dangerous *.snap + run: sudo snap install --dangerous *.snap - name: Install requirements run: pip install -r tests/requirements.txt