You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current tt environment selection approach is based on tarantool.yaml file location in file system hierarchy: tt searches for tarantool.yaml in current working dir. If it is found - uses it. If there is no env config file in current dir, searches for it in upper level directories recursively. git works similarly by searching .git directory in upper level dirs.
Advantages
Easy to use: no need to run a specific command to activate the environment, just cd.
Drawbacks
It is unclear, which environment is used. A user need to manually search for tarantool.yaml file in file system hierarchy to find out which environment will be used by the tt command in current directory.
User is unable to work with specific tt environment from any directory.
Accidental removal/renaming of the config file silently changes current user environment to system or any other. tt will not tell a user that something goes wrong.
What is the intended workflow for testing the same application with different Tarantool versions? Suppose, there /var/instances/app1 application. he/she must create two tarantool.yaml files in different locations. Make cd to activate a specific environment and start app1. This looks unusual for me.
nodejs/python approach
Nodejs/python approach is to use a script to setup the environment:
для работы многих скриптов явный вход в директорию всё равно требуется.
если мы например пишем кронскрипт, который ну например верифицирует рокспеки на предмет отсталости от репа - cd в кронскрипте писать всё равно придётся.
а вот если говорить о явном входе, то в большинстве случаев явный вход == переназначение переменных PATH, либо иных.
переназначение переменных можно записать внутри bash, но сложно внутри однострочной команды.
сложно == не всякий пользователь асилит
если например будет tt switch переключающее переменные, то написать tt switch && tt foobar - будет тривиальной ошибкой.
в рекомендациях будут говорить: "пишите /path/to/tt и /path/to/tarantool в ваших кронскриптах"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
tt env approach
Current tt environment selection approach is based on
tarantool.yaml
file location in file system hierarchy: tt searches fortarantool.yaml
in current working dir. If it is found - uses it. If there is no env config file in current dir, searches for it in upper level directories recursively.git
works similarly by searching .git directory in upper level dirs.Advantages
cd
.Drawbacks
tarantool.yaml
file in file system hierarchy to find out which environment will be used by the tt command in current directory.What is the intended workflow for testing the same application with different Tarantool versions? Suppose, there
/var/instances/app1
application. he/she must create twotarantool.yaml
files in different locations. Makecd
to activate a specific environment andstart app1
. This looks unusual for me.nodejs/python approach
Nodejs/python approach is to use a script to setup the environment:
nodejs
Python virtual env
Advantages
Drawbacks
Beta Was this translation helpful? Give feedback.
All reactions