From 64b9d82f206a11c677d9c8b3af128074d21e603b Mon Sep 17 00:00:00 2001 From: Qubad786 Date: Tue, 24 Dec 2024 20:15:16 +0500 Subject: [PATCH] Expose scale version in app config (#15266) --- src/middlewared/middlewared/plugins/apps/ix_apps/lifecycle.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/middlewared/middlewared/plugins/apps/ix_apps/lifecycle.py b/src/middlewared/middlewared/plugins/apps/ix_apps/lifecycle.py index d6ea09d1e7ca9..f439322fda9c3 100644 --- a/src/middlewared/middlewared/plugins/apps/ix_apps/lifecycle.py +++ b/src/middlewared/middlewared/plugins/apps/ix_apps/lifecycle.py @@ -5,6 +5,7 @@ import yaml from middlewared.service_exception import CallError +from middlewared.utils import sw_version from middlewared.utils.io import write_if_changed from .path import ( @@ -98,6 +99,7 @@ def add_context_to_values( 'operation': operation, 'app_metadata': app_metadata, f'is_{operation.lower()}': True, + 'scale_version': sw_version(), **({'upgrade_metadata': upgrade_metadata} if operation == 'UPGRADE' else {}) })