-
Notifications
You must be signed in to change notification settings - Fork 2k
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
change: avoided running any init_by_lua* code inside signaller process and when testing Nginx configuration. #1377
change: avoided running any init_by_lua* code inside signaller process and when testing Nginx configuration. #1377
Conversation
It should be doable to write a test for this behaviour with Test::Nginx (e.g. some side-effect triggered by Food for thought: Executing
We could address 1. with a new directive to optionally run the handler in signaller processes ( |
@thibaultcha Now tests are added, and I also disable running |
@spacewander Good call on |
t/157-disable-init-by-lua.t
Outdated
} | ||
} | ||
--- no_error_log | ||
[error] |
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.
@spacewander Mind renaming this test suite to 159-disable-init-by-lua.t
? See #1394 which already deals with 2 test suites named 157-*.t
.
@thibaultcha |
67cec36
to
1e6091e
Compare
…when testing the nginx configuration. Signed-off-by: Thibault Charbonnier <[email protected]>
1e6091e
to
a70f549
Compare
I have pushed a new commit which fixes the false positive found in the first test case. It is less fancy, but more robust and simpler. |
For future reference: lua-nginx-module/src/ngx_http_lua_module.c Line 798 in b687530
When |
@Lekensteyn yes, I also have it on my TODO list already to fix a few other edge-cases that I believe aren' addressed yet. PRs welcome! |
Previously, when Nginx is run as a signaller like
nginx -p . -s stop
, the code ininit_by_lua*
will be executed. Now this probably unexpected behavior is avoided.I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.