Show app version in settings popover#145
Merged
Merged
Conversation
Bake APP_VERSION into the Docker image (release tag for releases, dev-<sha> for dev builds, dev locally) and expose it via GET /api/version. Signed-off-by: Jason Madigan <[email protected]>
Fetched from /api/version on first open, hidden if the request fails. Signed-off-by: Jason Madigan <[email protected]>
Fail the release build if the pushed image does not report the release tag, catching a dropped build-arg or non-semver tag. Signed-off-by: Jason Madigan <[email protected]>
Check the Settings default with APP_VERSION unset rather than via the import-time singleton, and use the fixture style of neighbouring route tests. Signed-off-by: Jason Madigan <[email protected]>
Defaults on. When false, /api/version returns 404 (so the settings popover shows nothing) and the OpenAPI version is a neutral placeholder, disclosing nothing. Signed-off-by: Jason Madigan <[email protected]>
Build a single-arch image with load, check the baked APP_VERSION against the release tag with a literal compare that logs both values, and only then run the multi-arch push. Stops a bad version reaching the public tags. Signed-off-by: Jason Madigan <[email protected]>
An empty value (docker run -e SHOW_APP_VERSION=) crashed settings validation at import; fall back to defaults instead. Tests build fresh Settings without the dotenv file and restore reloaded modules even if the reload itself fails. Signed-off-by: Jason Madigan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
APP_VERSION, the backend serves it atGET /api/version, and the settings popover shows it. Local runs fall back todev; dev images reportdev-<sha>matching their image tag.SHOW_APP_VERSION=falseturns it offSHOW_APP_VERSION=,MAX_UPLOAD_MB=) no longer crash Settings at boot.Test evidence
Backend pytest 260 passed, frontend vitest 95 passed,
make lintclean. Live-verified with uvicorn and a real browser:/api/versionreturns the env value, 404 when disabled, popover shows "Version 0.7.0-preview", line hidden when disabled.Closes #144