Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

custom migrations expect ./?/init.lua in the path setting #6867

Closed
Tieske opened this issue Feb 25, 2021 · 0 comments · Fixed by #6993
Closed

custom migrations expect ./?/init.lua in the path setting #6867

Tieske opened this issue Feb 25, 2021 · 0 comments · Fixed by #6993
Labels
core/db/migrations task/feature Requests for new features in Kong

Comments

@Tieske
Copy link
Member

Tieske commented Feb 25, 2021

If you create a custom plugin in a non standard location and set lua_package_path = /usr/local/custom/?.lua, then migrations fail. Since the core file is init.lua, and is required as kong.plugins.<name>.migrations.

So the migrations expect the init.lua to be part of the path; lua_package_path = /usr/local/custom/?.lua;/usr/local/custom/?/init.lua.

The init.lua is a common Lua idiom, but should not be required for custom plugins.

@gszr gszr added core/db/migrations task/feature Requests for new features in Kong labels Feb 25, 2021
Tieske added a commit that referenced this issue Apr 2, 2021
When a custom plugin is load that is not located in the Kong tree
the user manually sets the Lua-path to locate the plugin. In that
case the assumption that the 'init' files will be found might be
wrong.

Fixes #6867
locao pushed a commit that referenced this issue Apr 16, 2021
When a custom plugin is load that is not located in the Kong tree
the user manually sets the Lua-path to locate the plugin. In that
case the assumption that the 'init' files will be found might be
wrong.

Fixes #6867
@guanlan guanlan closed this as completed May 26, 2021
@Kong Kong locked and limited conversation to collaborators May 26, 2021
dndx pushed a commit that referenced this issue May 28, 2021
When a custom plugin is load that is not located in the Kong tree
the user manually sets the Lua-path to locate the plugin. In that
case the assumption that the 'init' files will be found might be
wrong.

Fixes #6867
Fixes #7340

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
core/db/migrations task/feature Requests for new features in Kong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants