Skip to content

fix(client): restore the 2.x screen auto-upgrade path via /client/release.json#492

Merged
turegjorup merged 2 commits into
release/3.0.0from
fix/client-release-json-upgrade-path
Jun 10, 2026
Merged

fix(client): restore the 2.x screen auto-upgrade path via /client/release.json#492
turegjorup merged 2 commits into
release/3.0.0from
fix/client-release-json-upgrade-path

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Summary

2.x screen clients poll /client/release.json to detect new releases and reload themselves. In 3.0 the release file moved to /release.json (site root), and the catch-all /client{subroutes} route answers the old path with the SPA's index.html. The 2.x client's response.json() then fails silently, so already-running 2.x screens never detect the 3.0 release — every screen would need a manual reload after the server upgrade.

This PR ships a copy of release.json at the deprecated public/client/release.json location so v2 screens self-upgrade into the 3.0 client on their next release check (every 10 minutes by default). Static files win over the Symfony catch-all in the nginx image, so the copy is served as JSON. The location is deprecated and exists only to provide the upgrade path; remove once 2.x clients are out of the field.

Files Changed

  • infrastructure/display-api-service/Dockerfile - also write public/client/release.json in the production image build (the nginx image inherits it via COPY --from=app)
  • .github/workflows/github_build_release.yml - same copy in the release tarball
  • UPGRADE.md - new step 9: auto-upgrade works out of the box for image/tarball deploys; source deploys must generate both files in their deploy process (snippet included)
  • CHANGELOG.md - entry under [Unreleased]
  • .gitignore - ignore the new copy alongside /public/release.json

Test Plan

Verified live on os2display-clone.itkdev.dk (v2 develop → 3.0.0-rc5 upgrade test):

  1. Before: GET /client/release.json returned 200 text/html (SPA index); a v2 screen reattached to the API but stayed on the old client indefinitely.
  2. Manually placed the copy in the nginx container: GET /client/release.json returns 200 application/json with the rc5 timestamp.
  3. The stranded v2 screen detected the new releaseTimestamp on its next 10-minute check and reloaded into the 3.0.0-rc5 client without manual intervention.

To verify the build changes: build the production image and check public/client/release.json exists in both the app and nginx images with the same content as public/release.json; for the tarball, check the next release archive contains both files.

🤖 Generated with Claude Code

…ease.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) <noreply@anthropic.com>
@turegjorup turegjorup self-assigned this Jun 10, 2026
@turegjorup
turegjorup requested a review from tuj June 10, 2026 10:55
…elease-json-upgrade-path

# Conflicts:
#	CHANGELOG.md
@turegjorup
turegjorup merged commit 703a66a into release/3.0.0 Jun 10, 2026
20 checks passed
@turegjorup
turegjorup deleted the fix/client-release-json-upgrade-path branch June 10, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants