Container image reports placeholder version v0.0.0+unknown #56
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/yunjin#56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the web app is run from a source checkout, the footer shows the real version (e.g.
Yunjin v2026.9.26.1). When the same app is served from the published container image, the footer shows the placeholderYunjin v0.0.0+unknowninstead.The container should report the real application version in the footer (and anywhere else the version is used), matching a source-checkout run.
Findings (root cause confirmed, not guessed):
src/yunjin/__init__.pyresolves the version viaimportlib.metadata.version("yunjin")and falls back to"0.0.0+unknown"when the package metadata is missing (PackageNotFoundError).uv syncinstalls the project itself, so the metadata exists → real version in the footer.Containerfilebuilder stage runsuv sync --frozen --no-dev --no-install-project(the app runs from/app/srcviaPYTHONPATH), so noyunjindist-info exists anywhere in the image → the placeholder fallback fires.--build-arg VERSIONon release builds, but it only sets the OCI labelorg.opencontainers.image.version; the app never sees it.uv sync --frozen --no-dev --no-install-project+PYTHONPATH=srcprintsversion: 0.0.0+unknown.Plan of attack:
--no-install-project, add theREADME.md+src/build inputs) so the version metadata frompyproject.tomllands in the venv.importlib.metadatastays the single source of truth — no new env var, no drift risk.PYTHONPATH=/app/srcstill takes precedence over site-packages, so code keeps running from the source tree (the alembic.ini-relativeinit_dbbehaviour is preserved).docs/container.md(describes the two-stage build) in the same change.containerjob: boot the built image, assert the footer shows thepyproject.tomlversion — the only automated check that can catch this at the layer where it broke.Branch:
feat/container-version-and-favicon(shared with the favicon issue).