-
Notifications
You must be signed in to change notification settings - Fork 170
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
[cli] load openresty libraries when rover is active #598
Conversation
2a6e38a
to
f334564
Compare
gateway/bin/apicast
Outdated
@@ -109,3 +109,61 @@ for my $inc ($apicast_src, 'src') { | |||
my @args = ('resty', @resty_args, $bin, @ARGV); | |||
|
|||
exec '/usr/bin/env', @args; | |||
|
|||
__DATA__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the easiest way to distribute the lua helper.
gateway/bin/apicast
Outdated
@@ -109,3 +109,61 @@ for my $inc ($apicast_src, 'src') { | |||
my @args = ('resty', @resty_args, $bin, @ARGV); | |||
|
|||
exec '/usr/bin/env', @args; | |||
|
|||
__DATA__ | |||
#!/usr/bin/env resty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an explanation here about why this is needed. Like the one included in the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added more comments. Most of them are in the lua helper code.
* when rover.setup is activated it strips out all paths other than lua_modules * openresty ships shared code in $prefix/lualib/ directory
f334564
to
68fc003
Compare
Rover would remove all shared paths, including paths
where openresty distributes own code.
So try go get those paths and set them back after loading rover.
It is not really possible to write a test because APIcast crashes in the CLI (before generating nginx config) and we have no CLI tests.