diff --git a/CHANGELOG.md b/CHANGELOG.md index 480d8ab..3254a34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog - FlowDeck +## v7.80.2 (2026-10-22) — /api/health : version lue depuis le fichier VERSION + +- La version de l'app FastAPI était une constante codée en dur + dans `app/main.py` (restée à **7.74.3**) : `/api/health` + affichait donc une version périmée alors que l'app déployée + était en 7.80.1 (signalé par Bruno). Elle est maintenant lue + depuis le fichier `VERSION` à la racine (source unique, même + repli `/app/VERSION` que le tableau de bord) — elle ne pourra + plus dériver. + ## v7.80.1 (2026-10-22) — Panneau Spark : bouton « Console ↗ » - **Bouton « Console ↗ »** dans la barre des discussions du diff --git a/VERSION b/VERSION index 87f85f9..4e816fc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.80.1 +7.80.2 diff --git a/app/main.py b/app/main.py index 5b8b1dd..95fa90d 100644 --- a/app/main.py +++ b/app/main.py @@ -190,9 +190,33 @@ async def lifespan(_app: FastAPI): pass +def _lire_version() -> str: + """Version de l'app depuis le fichier VERSION (source unique). + + Avant : une constante codée en dur dans FastAPI(...) — restée à + 7.74.3 alors que l'app était en 7.80.1, donc /api/health mentait. + Même logique de repli que dashboard._common._get_app_version. + """ + import os + + for chemin in ( + os.path.join(os.path.dirname(__file__), "..", "VERSION"), + "/app/VERSION", + ): + try: + if os.path.exists(chemin): + with open(chemin) as f: + v = f.read().strip() + if v: + return v + except Exception: + pass + return "0.0.0" + + app = FastAPI( title="FlowDeck", - version="7.74.3", + version=_lire_version(), docs_url="/docs", redoc_url="/redoc", lifespan=lifespan,