Skip to content

Commit 6093b03

Browse files
committed
increment version and fix CI pipeline
1 parent 7075e4d commit 6093b03

8 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
steps:
99
- uses: actions/checkout@v2
1010
- name: Unit test
11-
run: docker-compose up
11+
run: docker compose up

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openresty/openresty:stretch-fat
1+
FROM openresty/openresty:bullseye-fat
22

33
WORKDIR /app
44

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This module is licensed under the BSD license.
2-
Copyright (C) 2012-2020, Thought Foundry Inc.
2+
Copyright (C) 2012-2025, Thought Foundry Inc.
33
All rights reserved.
44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
55
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
66
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.markdown

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ Copyright and License
332332

333333
This module is licensed under the BSD license.
334334

335-
Copyright (C) 2012-2020, Thought Foundry Inc.
335+
Copyright (C) 2012-2025, Thought Foundry Inc.
336336

337337
All rights reserved.
338338

@@ -352,4 +352,3 @@ See Also
352352
* the ngx_lua module: http://wiki.nginx.org/HttpLuaModule
353353

354354
[Back to TOC](#table-of-contents)
355-

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: "3.7"
2-
31
services:
42
lua-resty-resolver:
53
build:
64
context: .
75
volumes:
86
- ".:/app"
97
image: lua-resty-resolver:latest
10-
command: make test
8+
command: make test

lib/resolver/client.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local ngx = require "ngx"
22
local setmetatable = setmetatable
33

44

5-
local _M = { _VERSION = '0.05' }
5+
local _M = { _VERSION = '0.06' }
66

77
local mt = { __index = _M }
88

@@ -30,7 +30,7 @@ local function sync(worker)
3030
if exp then
3131
if exp < next_sync then
3232
next_sync = exp
33-
end
33+
end
3434
hosts[#hosts+1] = {
3535
address = k:sub(address_start),
3636
exp = exp
@@ -40,7 +40,7 @@ local function sync(worker)
4040
end
4141

4242
if #hosts > 0 then
43-
if next_sync >= 1 then
43+
if next_sync >= 1 then
4444
next_sync = next_sync - 1
4545
end
4646
worker._hosts = hosts
@@ -85,7 +85,7 @@ function _M.get(self, exp_fallback_ok)
8585
hosts = self._hosts
8686
tot = #hosts
8787
end
88-
88+
8989
if tot < 1 then
9090
return nil, "no hosts available"
9191
end
@@ -94,7 +94,7 @@ function _M.get(self, exp_fallback_ok)
9494
local idx = self._next_idx
9595
local exp_idxs = {}
9696
local cnt = 0
97-
97+
9898
while not host and cnt < tot do
9999
if idx > tot then
100100
idx = 1
@@ -104,11 +104,11 @@ function _M.get(self, exp_fallback_ok)
104104

105105
if cur_host.exp > now then
106106
host = cur_host
107-
else
107+
else
108108
if not fallback_idx or cur_host.exp > hosts[fallback_idx].exp then
109109
fallback_idx = idx
110110
end
111-
111+
112112
exp_idxs[#exp_idxs+1] = idx
113113

114114
idx = idx + 1

lib/resolver/master.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local resolver = require "resty.dns.resolver"
44
local setmetatable = setmetatable
55

66

7-
local _M = { _VERSION = '0.05' }
7+
local _M = { _VERSION = '0.06' }
88

99
local mt = { __index = _M }
1010

@@ -42,7 +42,7 @@ resolve = function(master)
4242
while ns_cnt ~= 0 do
4343
local tries = {}
4444
answers, err = res:query(domain, master._qopts, tries)
45-
45+
4646
for i, err in ipairs(tries) do
4747
err = "resolver master failed to query DNS for domain '" .. domain .. "': " .. err
4848
ngx.log(ngx.DEBUG, err)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package = "lua-resty-resolver"
2-
version = "0.05-1"
2+
version = "0.06"
33
source = {
44
url = "git://github.com/jkeys089/lua-resty-resolver",
55
}

0 commit comments

Comments
 (0)