Skip to content

Commit 54fbc2e

Browse files
committed
fix: report the real HaRP version from /info as a semver string
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
1 parent 090268b commit 54fbc2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

haproxy_agent.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
from haproxyspoa.spoa_server import SpoaServer
2828
from pydantic import BaseModel, Field, ValidationError, computed_field, model_validator
2929

30+
# Reported by `/info`; AppAPI compares it against its minimum supported HaRP version.
31+
# Keep it in sync with the release tag and use a full `x.y.z` string: a bare float like `0.4`
32+
# is read as "0.4.0", which made every release look older than it is.
33+
HARP_VERSION = "0.4.3"
34+
3035
APPID_PATTERN = re.compile(r"(?:^|/)exapps/([^/]+)")
3136
# Matches `..` path segments in any literal/encoded form: separators can be `/` or %2F,
3237
# the dots themselves can be `.` or %2E (any case combination, e.g. `..`, `%2e.`, `%2E%2e`).
@@ -835,7 +840,7 @@ async def get_info(request: web.Request):
835840
k8s_status["reachable"] = False
836841

837842
return web.json_response({
838-
"version": 0.4,
843+
"version": HARP_VERSION,
839844
"docker": True,
840845
"kubernetes": k8s_status,
841846
})

0 commit comments

Comments
 (0)