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

improved versions checks on OpenResty and Serf #1221

Closed
wants to merge 31 commits into from

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented May 17, 2016

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.

thibaultcha and others added 30 commits April 27, 2016 15:18
- 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
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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)

Copy link
Contributor

@hutchic hutchic May 30, 2016

Choose a reason for hiding this comment

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

ah neat TIL thanks 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

TIL ??? enlighten me

Copy link
Contributor

Choose a reason for hiding this comment

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

Today I learnt

@thibaultcha
Copy link
Member

Please rebase on refactor/cli (which was rebased on next)

@Tieske
Copy link
Member Author

Tieske commented Jun 10, 2016

replaced by #1307

@Tieske Tieske closed this Jun 10, 2016
@Tieske Tieske deleted the refactor/versions branch June 10, 2016 19:10
Tieske added a commit that referenced this pull request Jul 1, 2016
Tieske added a commit that referenced this pull request Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants