-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
chore(deps) bump OpenResty compatibility #2489
Conversation
This is still waiting for a Lapis release. Lapis is not getting a release because apparently it needs to be stable on cqueues or something first. Yet it is currently *broken on OpenResty 1.11.2.2 for now, due to some LuaJIT/lua-cjson incompatibilities. At this point, I think we need to consider forking it and uploading the current master branch of Lapis onto our own LuaRocks |
local prefix = "" | ||
local len | ||
|
||
for pref in str:gmatch("\n(%s+)") do |
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.
Slightly inconsistent usage of the string
library... I could update that.
4fbc402
to
d67de02
Compare
since Penlight got an update, should we reenable 52 compatibility? see also #2375 (comment) |
32c895c
to
9ea7728
Compare
Yes - although I think this should be part of another PR (I will submit it soon after merging this one) |
OpenResty 1.11.2.4 bumps its LuaJIT version, and among the changes in there, the hashing of Lua strings has seen an update in OpenResty's LuaJIT of 1.11.2.3. Now, `next()` might not yield results in the same order as it used to, hence `json.encode()` isn't either, hence some JWT tests are broken, due to the base64-encoding being different than it used to (different JSON value to encode because order of keys differs). Ideally, we should think about building a "safe" iterator (consistent), maybe with `__pairs` once we enable Lua 5.2 compat. This is to be emphasized once Kong starts forging JWT tokens, if ever, as the iteration order might be different accross platforms, or after such a change from LuaJIT.
Due to the change in OpenResty's LuaJIT introduced in 1.11.2.3 (new hashing for string interning), the iteration order of `pairs()` has changed. Since we should not rely on it anyways, this hard-codes the order of execution of plugins as of Kong 0.10.1, to ensure backwards-compatibility. * hard-code `PRIORITY` fields as per 0.10.1 order * new unit tests to ensure all plugins have their unique priority
* LuaSocket/lua_pack: ensure LuaJIT v2.1 compat * Lapis has been forked to https://github.com/Mashape/lapis and a new release has been drafted from Lapis `v1.6.0`. This Kong-specific release (`v1.6.0.1`) removes lua-cjson (the non-OpenResty module) and luaossl from its list of dependencies, as they are not compatible with Kong and/or OpenResty 1.11.2.3+
9ea7728
to
b4d9dd7
Compare
Summary
Bump OpenResty compatibility to
1.11.2.3
and fix a few issues along the way, especially regarding the recent LuaJIT string hashing updates.Full changelog
1.11.2.3
1.11.2.3
bump1.11.2.2
to the best of my knowledgeTODO
upstreams/{upstream}/targets/active
route.