-
Notifications
You must be signed in to change notification settings - Fork 403
Closed
Copy link
Labels
Description
If an application role uses a new Tarantool feature, it's best not to load it on older Tarantool versions because it may result in confusing failures at runtime. Indeed, a role may check the Tarantool version in the validate() callback, like this:
local tarantool = require('tarantool')
local version = require('version')
return {
validate = function()
if version.fromstr(tarantool.version) < version.new(3, 4, 1) then
error('Cannot run on Tarantool < 3.4.1')
end
end,
apply = function() end,
stop = function() end,
}However, it's not really convenient. Also, it generates a confusing error message:
2024-12-25 14:43:39.817 [87390] main utils.c:700 E> LuajitError: Wrong config for role my_role: /tmp/test/my_role.lua:7: Cannot run on Tarantool < 3.4.1
It'd be nice if it a role could specify the minimal supported Tarantool version.
Jira: TNTP-1016
Reactions are currently unavailable