From e70b7ba232457203c6b7522838476f8eb63d1ca7 Mon Sep 17 00:00:00 2001 From: Igor Zolotarev <63460867+yngvar-antonsson@users.noreply.github.com> Date: Wed, 2 Aug 2023 19:57:55 +0400 Subject: [PATCH] Throw an error when using Tarantool 3 (#2130) --- CHANGELOG.rst | 2 ++ cartridge.lua | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9bdfab05b..8b2a0caa6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,6 +41,8 @@ Changed - Don't perform invalid format check in Tarantool 2.10.4 and above. +- Throw an error when using Tarantool 3. + ------------------------------------------------------------------------------- [2.8.1] - 2023-07-20 ------------------------------------------------------------------------------- diff --git a/cartridge.lua b/cartridge.lua index 6dd4d38bc..2d8e2d6ed 100644 --- a/cartridge.lua +++ b/cartridge.lua @@ -23,6 +23,7 @@ local http = require('http.server') local fiber = require('fiber') local socket = require('socket') local json = require('json') +local tarantool_version = require('tarantool').version local rpc = require('cartridge.rpc') local auth = require('cartridge.auth') @@ -317,6 +318,10 @@ local function cfg(opts, box_opts) disable_errstack = '?boolean', }, '?table') + if tarantool_version:sub(1, 2) == '3.' then + return nil, CartridgeCfgError:new("Unsupported Tarantool version " .. tarantool_version) + end + if opts.enable_sychro_mode ~= nil then opts.enable_synchro_mode = opts.enable_sychro_mode log.warn('enable_sychro_mode is deprecated. Use enable_synchro_mode instead')