-
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
improved versions checks on OpenResty and Serf #1221
Conversation
- new UNIX configuration file - defaults are stored in a Lua module - on/off/true/false alias for booleans - overriding rules with precedence - defaults - file-level - ENV variables (prefixed by KONG_) - custom from Lua table (loader argument) - testing configuration - new nginx and ngx_lua configuration properties
- start as the previous CLI - init_by_lua to migrate when Kong is running 'embedded' in a custom nginx instance
new syslog logging for reports uses ngx_lua UDP sockets, also usable in CLI since resty is the new interpreter.
- We were making too many full migrations in the tests, considerably slowing down Cassandra testing, unecessarily because the same behavior was being tested several times. - Cassandra DAO tests now use 'kong_tests' by default
offset = offset, | ||
["next"] = next_url, | ||
} | ||
end |
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.
object calisthenics says we can/should avoid this else
result = {
data = rows,
total = total_count,
offset = offset,
["next"] = next_url,
}
if #rows == 0 then
result = [[{"data":[],"total":0}]]
end
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.
It would create a table, which is immediately disposed of again. Current code is more performant.
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.
interesting result isn't just a variable?
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.
result
is just a variable, but when assigning { data = rows, .... }
a new table is created (the outer curly braces in this construct)
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.
ah neat TIL
thanks 👍
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.
TIL
??? enlighten me
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.
Today I learnt
Please rebase on refactor/cli (which was rebased on next) |
replaced by #1307 |
* add better version information, replaces PR #1221
closes #1212, #946 and #947
adds versions checks, for Serf and Nginx, against branch
refactor/cli
Note: dnsmasq is absent now, so no checks against that dependency.