From ad1c91e9663187d1d894a6169177efe2dd240418 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Wed, 10 Jun 2026 12:52:13 +0200 Subject: [PATCH] fix(client): restore the 2.x screen auto-upgrade path via /client/release.json 2.x screen clients poll /client/release.json to detect new releases. In 3.0 the release file moved to /release.json and the catch-all /client{subroutes} route answers the old path with the SPA's index.html, so already-running 2.x screens never detect the 3.0 release and require a manual reload of every screen. Ship a copy of release.json at the deprecated public/client/release.json location in both the production image build and the release tarball. Static files win over the Symfony catch-all in the nginx image, so 2.x clients pick up the new release timestamp on their next check and reload into the 3.0 client. The location is deprecated and only exists to provide the upgrade path; remove once 2.x clients are out of the field. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/github_build_release.yml | 7 +++++++ .gitignore | 3 ++- CHANGELOG.md | 6 ++++++ UPGRADE.md | 21 +++++++++++++++++++ infrastructure/display-api-service/Dockerfile | 9 +++++++- 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_build_release.yml b/.github/workflows/github_build_release.yml index 66a54656a..cc2e3fe58 100644 --- a/.github/workflows/github_build_release.yml +++ b/.github/workflows/github_build_release.yml @@ -76,12 +76,19 @@ jobs: launch.json - name: Write release.json + # The copy at public/client/release.json is DEPRECATED: it exists only + # to provide an upgrade path for still-running 2.x screen clients, + # which poll /client/release.json. Without it the Symfony catch-all + # /client{subroutes} route answers with the SPA's index.html and 2.x + # screens never detect the new release. Remove once 2.x clients are + # out of the field. run: | printf '{"releaseTimestamp": %s, "releaseTime": "%s", "releaseVersion": "%s"}\n' \ "$(date +%s)" \ "$(date -u)" \ "${{ github.ref_name }}" \ > public/release.json + cp public/release.json public/client/release.json cat public/release.json - name: Make assets dir diff --git a/.gitignore b/.gitignore index 16b605cf3..d0de69203 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,9 @@ # Ignore the public/fixtures folder. /public/fixtures -# Ignore release json file. +# Ignore release json file (and its deprecated copy for the 2.x client upgrade path). /public/release.json +/public/client/release.json ###> symfony/framework-bundle ### /.env.local diff --git a/CHANGELOG.md b/CHANGELOG.md index e74f06f55..b31317f55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Fixed the 2.x → 3.0 screen client auto-upgrade path: ship a copy of `release.json` at the + deprecated `/client/release.json` location polled by 2.x clients. Without it the catch-all + `/client` route answered with the SPA's HTML and already-running 2.x screens never detected + the new release (manual reload of every screen was required). The copy is deprecated and + will be removed once 2.x clients are out of the field. See `UPGRADE.md`. + ## [3.0.0-rc5] - 2026-06-10 - Added structured, channel-split application logging (ADR 011): per-domain Monolog channels with diff --git a/UPGRADE.md b/UPGRADE.md index 880e627c6..e16df0648 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -289,3 +289,24 @@ docker compose exec phpfpm bin/console app:feed:remove-deprecated-feed-sources - ``` Event database feeds should be recreated using `EventDatabaseApiV2FeedType`. + +#### 9 - Screen client auto-upgrade + +Running 2.x screen clients poll `/client/release.json` to detect new releases and reload +themselves. In 3.0 the release file lives at `/release.json` (site root); the old path is +a catch-all route serving the client SPA, so without further action 2.x screens would +never detect the upgrade and would need a manual reload. + +The 3.0 images and release tarball therefore ship a copy at `public/client/release.json`. +**This location is deprecated** and will be removed once 2.x clients are out of the field. +With those deploys, running 2.x screens reload into the 3.0 client on their next release +check (every 10 minutes by default) — no operator action required. + +If you deploy from source instead, nothing generates the release file — your deploy +process must write it (shape per `docs/release-example.json`): + +```shell +printf '{"releaseTimestamp": %s, "releaseTime": "%s", "releaseVersion": "%s"}\n' \ + "$(date +%s)" "$(date -u)" "" > public/release.json +cp public/release.json public/client/release.json +``` diff --git a/infrastructure/display-api-service/Dockerfile b/infrastructure/display-api-service/Dockerfile index 18263c4f1..3f07891c2 100644 --- a/infrastructure/display-api-service/Dockerfile +++ b/infrastructure/display-api-service/Dockerfile @@ -77,11 +77,18 @@ RUN APP_ENV=prod composer install --no-dev --optimize-autoloader --classmap-auth # The client polls /release.json to detect when a screen should refresh; # shape per docs/release-example.json. +# +# DEPRECATED: the copy at /client/release.json exists only to provide an +# upgrade path for still-running 2.x screen clients, which poll that path. +# Without it the Symfony catch-all /client{subroutes} route answers with the +# SPA's index.html and 2.x screens never detect the new release. Remove once +# 2.x clients are out of the field. RUN printf '{"releaseTimestamp": %s, "releaseTime": "%s", "releaseVersion": "%s"}\n' \ "${APP_RELEASE_TIMESTAMP}" \ "${APP_RELEASE_TIME}" \ "${APP_VERSION}" \ - > public/release.json + > public/release.json \ + && cp public/release.json public/client/release.json ################################