Skip to content
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

move CLI from Puc Lua to LuaJit, reducing dependencies #799

Merged
merged 3 commits into from
Dec 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/setup_kong.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ KONG_VERSION=0.5.0
sudo apt-get update

# Installing dependencies required to build development rocks
sudo apt-get install wget curl tar make gcc unzip git liblua5.1-0-dev
sudo apt-get install wget curl tar make gcc unzip git

# Installing dependencies required for Kong
sudo apt-get install sudo netcat lua5.1 openssl libpcre3 dnsmasq uuid-dev
sudo apt-get install sudo netcat openssl libpcre3 dnsmasq uuid-dev

# Installing Kong and its dependencies
sudo apt-get install lsb-release
Expand Down
18 changes: 10 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
## [Unreleased][unreleased]

### Breaking changes

- Drop the Lua 5.1 dependency which was only used for Kong's CLI. The CLI now runs against LuaJIT, which is consistent with other Kong components (Luarocks and OpenResty) already relying on LuaJIT. Make sure the LuaJIT interpreter is included in your `$PATH`. [#799](https://github.com/Mashape/kong/pull/799)

### Added

- Added a `total` field in API responses, that counts the total number of entities in the table. [#635](https://github.com/Mashape/kong/pull/635)
- You can now specify a custom DNS resolver address that Kong will use when resolving hostnames. [#625](https://github.com/Mashape/kong/pull/635)
- A new `total` field in API responses, that counts the total number of entities in the response body. [#635](https://github.com/Mashape/kong/pull/635)
- Dnsmasq is now optional. You can specify a custom DNS resolver address that Kong will use when resolving hostnames. This can be configured in `kong.yml`. [#625](https://github.com/Mashape/kong/pull/635)

### Changed

- Removed the `dnsmasq_port` property, and introduced `dns_resolver` that also allows to specify a custom DNS server. [#625](https://github.com/Mashape/kong/pull/635)
- Disable access logs for `/status` endpoint.
- The `/status` endpoint now includes `database` statistics, while the previous stats have been moved to a `server` field. [#635](https://github.com/Mashape/kong/pull/635)
- Disabled access logs for `/status` endpoint

### Fixed

- In the API, the `next` link is not being displayed anymore if there are no more entities to return. [#635](https://github.com/Mashape/kong/pull/635)
- In the Admin API responses, the `next` link is not being displayed anymore if there are no more entities to be returned. [#635](https://github.com/Mashape/kong/pull/635)

## [0.5.4] - 2015/12/03

Expand All @@ -29,8 +32,8 @@
### Fixed

- Avoids additional URL encoding when proxying to an upstream service. [#691](https://github.com/Mashape/kong/pull/691)
- Fixing potential timing comparison bug in HMAC plugin. [#704](https://github.com/Mashape/kong/pull/704)
- Fixed a missing "env" statement in the Nginx configuration. [#706](https://github.com/Mashape/kong/pull/706)
- Potential timing comparison bug in HMAC plugin. [#704](https://github.com/Mashape/kong/pull/704)
- A missing "env" statement in the Nginx configuration. [#706](https://github.com/Mashape/kong/pull/706)

### Added

Expand Down Expand Up @@ -88,7 +91,6 @@ Several breaking changes are introduced. You will have to slightly change your c
- `strip_path` -> `strip_request_path`
- `target_url` -> `upstream_url`
- `plugins_configurations` have been renamed to `plugins`, and their `value` property has been renamed to `config` to avoid confusions. [#513](https://github.com/Mashape/kong/issues/513)
>>>>>>> dbocs(changelog) 0.5.0 changes
- The database schema has been updated to handle the separation of plugins outside of the core repository.
- The Key authentication and Basic authentication plugins routes have changed:

Expand Down
2 changes: 1 addition & 1 deletion bin/kong
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just concerned that some people might not have luajit in their PATH (only lua), and that this might break the CLI for them. We'll need to add a breaking change note to the changelog.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iic the debian package to install kong includes LuaJit. So my guess is that it wouldn't break anything (both LuaRocks and busted are running against LuaJit). Or am I missing something?

Then again, I have no idea how the debian package is generated and whether other distro's behave differently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But people are installing Kong from many different packages, as well as from source. I am more worried about source and development installations. It's worth putting a note in the Changelog.


-- Kong CLI entry-point (bin/kong).
--
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/db.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local Faker = require "kong.tools.faker"
local constants = require "kong.constants"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/migrations.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local Migrations = require "kong.tools.migrations"
local constants = require "kong.constants"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/quit.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/reload.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/restart.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/start.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/stop.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local constants = require "kong.constants"
local cutils = require "kong.cli.utils"
Expand Down
2 changes: 1 addition & 1 deletion kong/cli/version.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env lua
#!/usr/bin/env luajit

local cutils = require "kong.cli.utils"
local constants = require "kong.constants"
Expand Down