From 7c8cb62872854a985716bfc00d7cc0a4f93e477a Mon Sep 17 00:00:00 2001 From: Lorenzo Susini Date: Thu, 2 Nov 2023 11:02:30 +0000 Subject: [PATCH] update(userspace/falco): introduce new engine_version_semver key in versions endpoint Signed-off-by: Lorenzo Susini --- userspace/falco/versions_info.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/userspace/falco/versions_info.cpp b/userspace/falco/versions_info.cpp index c7ddb4e0d21..678ea76c2e5 100644 --- a/userspace/falco/versions_info.cpp +++ b/userspace/falco/versions_info.cpp @@ -72,7 +72,12 @@ nlohmann::json falco::versions_info::as_json() const version_info["driver_api_version"] = driver_api_version; version_info["driver_schema_version"] = driver_schema_version; version_info["default_driver_version"] = default_driver_version; - version_info["engine_version"] = engine_version; + // note: the 'engine_version' key below must be removed in the next major bump (0.x.y -> 1.0.0) + // the two keys are kept for existing tooling that relies on the old key + // (falcoctl will match old rules artifacts configs by using this key, and the new ones using + // the engine_version_semver key) + version_info["engine_version"] = std::to_string(FALCO_ENGINE_VERSION_MINOR); + version_info["engine_version_semver"] = engine_version; for (const auto& pv : plugin_versions) { version_info["plugin_versions"][pv.first] = pv.second;