Skip to content

Commit

Permalink
v2023.11.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Nov 7, 2023
1 parent f7e15d7 commit f98e5a7
Show file tree
Hide file tree
Showing 46 changed files with 273 additions and 156 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Docker Images

on:
push:
# We only need to build on tags. If we include branches, we build twice.
# We only want to build on tags--if we include branches, we build twice.
# branches:
# - main
# - alpha
Expand All @@ -14,69 +14,71 @@ jobs:
build:
name: Build Docker Images
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Set up Buildx
uses: docker/setup-buildx-action@v2
uses: actions/checkout@v4

# https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
# https://github.com/docker/metadata-action#tags-input
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: photostructure/server,ghcr.io/photostructure/photostructure-for-servers
images: |
photostructure/server
ghcr.io/photostructure/server
flavor: |
latest=false
tags: |
# always include the full semver (v1.2.3-alpha.1)
type=semver,pattern={{version}}
# tag as a prealpha build if it is such
type=raw,value=prealpha,enable=${{ contains(github.ref_name, 'prealpha') }}
# unless this is a prealpha build, update the alpha tag
type=raw,value=alpha,enable=${{ !contains(github.ref_name, 'prealpha') }}
# always update the beta tag unless it's an alpha build, so people on :beta get the beta and stable builds:
# always update the beta tag unless it's an alpha or prealpha build, so people on :beta get the beta and stable builds:
type=raw,value=beta,enable=${{ !contains(github.ref_name, 'alpha') }}
# if it's not alpha or beta, update :stable, :latest, and version tags.
# if it's not *alpha or beta, update :stable, :latest, and version tags.
type=raw,value=stable,enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=raw,value=latest,enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=semver,pattern=v{{major}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
type=semver,pattern=v{{major}}.{{minor}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
64 changes: 62 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,65 @@ This is a detailed list of changes in each version.

<!-- fix "tag context" for "next previous" context. I'd always done a search, clicked a thumb, and then clicked esc to go back to the search results. But... if you click a thumb from a search, and then click "next" or "previous", it ignores that you can from a search, and does the chronological next asset, which is very confusing/irritating. -->

## v2023.11.0-alpha.1

**To be released**

### 💔/🐛 Exclusion globs have been simplified

- Exclusion glob patterns are now applied both in and out of libraries: the
`excludeGlobsInLibrary` setting (introduced last build) was confusing, and
has been deleted.

- The `disableIgnorableFilters` setting was renamed to
`omitDefaultExcludeGlobs`, but does the same thing: if set to `true`, users
start with an empty set of exclusion globs, and use `excludeGlobsAdd` to
build up whatever set of patterns they want.

- See [the discord chat for details](https://discord.com/channels/818905168107012097/1170442569671512245)

### Additional improvements

- 🐛 Video transcodes in prior builds had a 2 minute timeout (due to a
misapplication of a default argument), which would slow down larger video
imports because transcode operations would timeout incorrectly and retry
(causing the system to bog down with the _same_ ffmpeg operation multiple
times)

-`ffmpegHwaccel` can now be safely kept at `auto`--PhotoStructure will
attempt the transcode with `-hwaccel=auto`, but if that fails (due to
missing hardware support for the necessary codecs, for example), we'll
automatically re-try that transcode operation without a `-hwaccel` argument.

- 🐛 `Asset.durationMs` is now properly copied from AssetFile variations up to
Asset. Prior builds could have missing duration timestamps in tag galleries.

Note that this is backfilled partially by a database migration that will be
applied automatically, as well as a step that invalidates all asset files
(and assets) that are videos and missing `.durationMs`.

- 🐛 Fixed `./start.sh` warnings and errors related to python `disttools` and
`setuptools`

- 🐛 Fixed [version health check
bug](https://discord.com/channels/818905168107012097/818907922767544340/1169801101806145566)
where running a newer version than what is advertised as being available was
marked as being "out of date". Also added channel advice if a more stable
channel is providing a newer release.

- 📦 `./photostructure info --version-check` is now a whole thing, and invalidates prior cache.

- 📦 Open Graph headers were simplified: we now only send one video or image
entry, using the closest available prerender to `openGraphTargetWidth`.
Previews seem to work properly now at least on Apple iMessages.

- 📦 New `checkBasenameMatches` setting (defaults to true) adds Yet Another
asset file's existing-asset adoption search strategy. This is a minor
deduplication improvement, and doesn't seem to adversely impact import
speed.

- 📦 Docker images should now include a proper set of labels

## v2023.11.0-prealpha.19

**Released 2023 November 2**
Expand Down Expand Up @@ -67,9 +126,10 @@ Several new settings were added to let you suit this feature to your taste:
require external network requests, those will be disabled by default with
this meta setting as well.

## Video improvements
### Video improvements

- 💔 **VLC support has been dropped.** Please use FFmpeg instead. [Setup instructions were updated for every platform.](/video)
- 💔 **VLC support has been dropped.** Please use FFmpeg instead. [Setup
instructions were updated for every platform.](/video)

- 🐛 Depending on how video files were encoded, metadata (like the video
duration) could have been missing in prior builds. PhotoStructure now
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ HEALTHCHECK CMD wget --quiet --output-document - http://localhost:1787/ping
# docker-entrypoint.sh handles dropping privileges down to the "node" user in order
# to support custom PUID/PGID
ENTRYPOINT [ "/usr/bin/tini", "--", "/opt/photostructure/docker-entrypoint.sh" ]

# Note: we don't set ENV here anymore. See docker-entrypoint.sh for details.
12 changes: 6 additions & 6 deletions VERSION.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"version": "2023.11.0-prealpha.19",
"version": "2023.11.0-alpha.1",
"versionMajor": 2023,
"versionMinor": 11,
"versionPatch": 0,
"versionPrerelease": [
"prealpha",
19
"alpha",
1
],
"release": "2023.11.0-prealpha.19+20231102163722",
"gitSha": "c53b4343a3ba13824535898a378fd5cd98ea5134",
"gitDate": "2023-11-02T23:37:22.000Z"
"release": "2023.11.0-alpha.1+20231107131203",
"gitSha": "9b2c00b1e0ce2ea9685b10dde99ce4a0c430b719",
"gitDate": "2023-11-07T21:12:03.000Z"
}
4 changes: 2 additions & 2 deletions bin/info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/info.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/list.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/list.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/logcat.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/logcat.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/logtail.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/logtail.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/photostructure.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/photostructure.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/sync.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/sync.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/web.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/web.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bin/worker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/worker.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions data/migrations/models/20231105_copy_asset_duration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- This file will run db/Migrations.copy_asset_duration
-- Video Asset.durationMs fields may not have been set correctly by earlier v2023 builds.
-- Note that this migration will also invalidate any prior Asset or AssetFile that is a video and a NULL durationMs.
94 changes: 60 additions & 34 deletions defaults.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Welcome to PhotoStructure! These are the settings for version 2023.9.0.
# Welcome to PhotoStructure! These are the settings for version 2023.11.0.
#
# Please see https://photostructure.com/environment-variables for more
# information about using environment variables with PhotoStructure.
Expand Down Expand Up @@ -1910,6 +1910,20 @@
# PS_ASSET_AGGREGATION="intersection"


# -------------------------------------------------
# PS_CHECK_BASENAME_MATCHES or checkBasenameMatches
# -------------------------------------------------
#
# Most cameras take JPG/RAW pairs with matching basenames (so "P01234" for
# "P01234.JPG"). When PhotoStructure is trying to find matching assets for a
# given file, may it check assets that have matching basename file variants?
#
# Note that image hash and other asset file comparisons will still be
# performed before determining a given asset is a match.
#
# PS_CHECK_BASENAME_MATCHES="true"


# --------------------------------------------------------
# PS_DATES_BEFORE_ARE_ESTIMATED or datesBeforeAreEstimated
# --------------------------------------------------------
Expand Down Expand Up @@ -2231,20 +2245,6 @@
# PS_DISABLE_ALL_FILTERS="false"


# -------------------------------------------------------
# PS_DISABLE_IGNORABLE_FILTERS or disableIgnorableFilters
# -------------------------------------------------------
#
# PhotoStructure has a (ton) of patterns used to avoid scanning system, cache,
# and application directory hierarchies. Setting this to "true" will disable
# all directory and file exclusion patterns.
#
# See the 'excludeGlobs*' settings for more precise editing of exclusion
# patterns.
#
# PS_DISABLE_IGNORABLE_FILTERS="false"


# ---------------------------------------
# PS_EXCLUDE_GLOBS_ADD or excludeGlobsAdd
# ---------------------------------------
Expand All @@ -2260,21 +2260,6 @@
# PS_EXCLUDE_GLOBS_ADD="[]"


# ----------------------------------------------------
# PS_EXCLUDE_GLOBS_IN_LIBRARY or excludeGlobsInLibrary
# ----------------------------------------------------
#
# Should "globs" match for files inside your library or originals directories?
#
# The defaults to false to make sure we don't skip directories that happen to
# match one of the (many) exclusion patterns.
#
# Set this to true to apply file and directory exclusion globs even inside
# your library directory hierarchy.
#
# PS_EXCLUDE_GLOBS_IN_LIBRARY="false"


# -----------------------------------------
# PS_EXCLUDE_GLOBS_OMIT or excludeGlobsOmit
# -----------------------------------------
Expand All @@ -2283,13 +2268,31 @@
# scanning system and application directories and otherwise irrelevant
# directories and files.
#
# The patterns provided here are removed from that default set.
# If you don't like one or two of them, add them here, and they will be
# removed from the excluded globs list.
#
# If you don't want ANY of the default exclusion globs, see
# "excludeGlobsOmitDefaults".
#
# See https://forum.photostructure.com/t/1458 for details.
#
# PS_EXCLUDE_GLOBS_OMIT="[]"


# ----------------------------------------------------------
# PS_EXCLUDE_GLOBS_OMIT_DEFAULTS or excludeGlobsOmitDefaults
# ----------------------------------------------------------
#
# Setting this to true will omit ALL default exclusion globs, and is
# equivalent to providing all default exclusion globs to the
# "excludeGlobsOmit" setting. You're then free to add whatever exclusion globs
# you want, using the "excludeGlobsAdd" setting.
#
# Aliases: "PS_OMIT_DEFAULT_EXCLUDE_GLOBS or PS_DISABLE_IGNORABLE_FILTERS"
#
# PS_EXCLUDE_GLOBS_OMIT_DEFAULTS="false"


# -------------------------------------------------
# PS_GLOBS_CASE_INSENSITIVE or globsCaseInsensitive
# -------------------------------------------------
Expand Down Expand Up @@ -4603,9 +4606,19 @@
# ----------------------------------
#
# FFmpeg supports both software and hardware encoders. Valid values include
# "auto" which should work for everyone, "cuda" for NVIDIA GPUs, or use
# "disable", "no", "false", or "" to disable. Run "ffmpeg -hwaccels" to see
# supported acceleration methods. See
# "auto" (which should "just work" for everyone), "h264_nvenc" for GPUs,
# "cuda" for NVIDIA GPUs, "dxva2" or "d3d11va" for Windows, or use "disable"
# to omit this argument.
#
# Run "ffmpeg -hwaccels" to see supported acceleration methods.
#
# Note that some hardware acceleration is only relevant for a handful of video
# codecs, so what might help for one transcode may not for another.
#
# Note that PhotoStructure will automatically retry "disable" if there are
# hwaccel errors.
#
# See
# https://forum.photostructure.com/t/hardware-accelerated-encoding-transcoding/166>,
# https://trac.ffmpeg.org/wiki/HWAccelIntro , and
# <https://github.com/NVIDIA/nvidia-docker for more details.
Expand Down Expand Up @@ -4870,6 +4883,19 @@
# PS_MIN_STREAM_CORR_PCT="50"


# --------------------------------------------------
# PS_OPEN_GRAPH_TARGET_WIDTH or openGraphTargetWidth
# --------------------------------------------------
#
# When generating OpenGraph header metadata, include the preview image closest
# to this number of pixels wide.
#
# See https://forum.photostructure.com/t/image-thumbnail-in-link-preview/1950
# for details.
#
# PS_OPEN_GRAPH_TARGET_WIDTH="800"


# ------------------------------------------
# PS_PLACEHOLDER_THUMBS or placeholderThumbs
# ------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "photostructure",
"productName": "PhotoStructure",
"author": "PhotoStructure, Inc. <[email protected]>",
"version": "2023.11.0-prealpha.19",
"version": "2023.11.0-alpha.1",
"description": "PhotoStructure for Servers",
"repository": {
"type": "git",
Expand All @@ -20,7 +20,7 @@
"@iarna/toml": "2.2.5",
"@parcel/watcher": "2.3.0",
"@photostructure/tz-lookup": "8.0.0",
"@sentry/node": "7.76.0",
"@sentry/node": "7.77.0",
"argon2": "0.31.1",
"axios": "^1.6.0",
"batch-cluster": "12.1.0",
Expand All @@ -41,11 +41,11 @@
"moo": "0.5.2",
"nearley": "2.20.1",
"papaparse": "5.4.1",
"picomatch": "2.3.1",
"picomatch": "3.0.1",
"platform-folders": "0.6.0",
"plist": "3.1.0",
"pug": "3.0.2",
"punycode": "2.3.0",
"punycode": "2.3.1",
"semver": "7.5.4",
"sharp": "0.32.6",
"source-map-support": "0.5.21",
Expand Down
2 changes: 1 addition & 1 deletion photostructure

Large diffs are not rendered by default.

Binary file modified public/3rd-party-licenses.txt.gz
Binary file not shown.
Binary file modified public/app/about.css.gz
Binary file not shown.
Binary file modified public/app/about.css.map.gz
Binary file not shown.
Binary file modified public/app/about.js.gz
Binary file not shown.
Binary file modified public/app/app.css.gz
Binary file not shown.
Binary file modified public/app/app.css.map.gz
Binary file not shown.
Binary file modified public/app/app.js.gz
Binary file not shown.
Binary file modified public/app/health.css.gz
Binary file not shown.
Binary file modified public/app/health.css.map.gz
Binary file not shown.
Binary file modified public/app/health.js.gz
Binary file not shown.
Binary file modified public/app/install.js.gz
Binary file not shown.
Binary file modified public/app/settings.css.gz
Binary file not shown.
Binary file modified public/app/settings.css.map.gz
Binary file not shown.
Binary file modified public/app/settings.js.gz
Binary file not shown.
Binary file modified public/app/splash.css.gz
Binary file not shown.
Binary file modified public/app/splash.css.map.gz
Binary file not shown.
Binary file modified public/app/splash.js.gz
Binary file not shown.
Loading

0 comments on commit f98e5a7

Please sign in to comment.