Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/github_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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`.
- Hardened server-side outage handling so API clients (e.g. the screen client) can tell a
temporary outage from an authentication failure and avoid logging out:
- Database connectivity failures (Doctrine DBAL `ConnectionException`) now surface as
Expand Down
21 changes: 21 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)" "<version>" > public/release.json
cp public/release.json public/client/release.json
```
9 changes: 8 additions & 1 deletion infrastructure/display-api-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


################################
Expand Down