Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tt pack [rpm|tgz] требует наличия init.lua или instances.yml #954

Open
Satbek opened this issue Sep 25, 2024 · 1 comment
Labels
5sp feature A new functionality teamE

Comments

@Satbek
Copy link

Satbek commented Sep 25, 2024

При отсутствии в приложении файлов файлов init.luaи instances.yml tt pack возвращает ошибку
⨯ error collect applications info: there are no apps found in instance_enabled directory

В tarantool 3 файлы init.lua, instances.yml не нужны для запуска, можно написать приложение и без них. В 3ей версии вообще нет необходимых файлов для запуска, поэтому приложение может иметь произвольный вид без конкретного шаблона.

Ошибка возникает из-за проверки, что директория является приложением

tt/cli/util/util.go

Lines 682 to 696 in 22890dd

// IsApp detects if the passed path is an application.
func IsApp(path string) bool {
entry, err := os.Stat(path)
if err != nil {
return false
}
if entry.IsDir() {
// Check if the directory contains init.lua script or instances.yml file.
for _, fileTocheck := range [...]string{"init.lua", "instances.yml", "instances.yaml"} {
if fileInfo, err := os.Stat(filepath.Join(path, fileTocheck)); err == nil {
if !fileInfo.IsDir() {
return true
}
}

Предлагаю убрать эту проверку и паковать все директории, что указаны в конфиге в поле instances_enabled т.к. приложению Tarantool 3 не нужны специальные файлы для запуска.

@Satbek Satbek changed the title tt pack [rpm|tgz tt pack [rpm|tgz] требует наличия init.lua или instances.yml Sep 25, 2024
@oleg-jukovec oleg-jukovec added 5sp teamE feature A new functionality labels Sep 25, 2024
@psergee
Copy link
Collaborator

psergee commented Sep 30, 2024

Да, это касается не только pack'а, но и других команд.
#870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5sp feature A new functionality teamE
Projects
None yet
Development

No branches or pull requests

3 participants