From 4dac859ad5fca3e10330e522124078005d6719e8 Mon Sep 17 00:00:00 2001 From: sn0rt Date: Thu, 6 Apr 2023 17:46:34 +0800 Subject: [PATCH 1/2] fix: upgrade lua-resty-ldap to 0.2.2 Signed-off-by: sn0rt --- rockspec/apisix-master-0.rockspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rockspec/apisix-master-0.rockspec b/rockspec/apisix-master-0.rockspec index b920c51a05e2..ee8e3066d0db 100644 --- a/rockspec/apisix-master-0.rockspec +++ b/rockspec/apisix-master-0.rockspec @@ -78,7 +78,7 @@ dependencies = { "xml2lua = 1.5-2", "nanoid = 0.1-1", "lua-resty-mediador = 0.1.2-1", - "lua-resty-ldap = 0.2.0-0" + "lua-resty-ldap = 0.2.2-0" } build = { From c93159644a51b5da337ff71e306b128a4f72eab0 Mon Sep 17 00:00:00 2001 From: soulbird Date: Mon, 10 Apr 2023 21:58:05 +0800 Subject: [PATCH 2/2] fix(ci): write version into xds first (#9274) --- t/xds-library/main.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/xds-library/main.go b/t/xds-library/main.go index 4327d8305898..6ee3bb2eac62 100644 --- a/t/xds-library/main.go +++ b/t/xds-library/main.go @@ -34,7 +34,6 @@ import "C" import ( "context" "fmt" - "math/rand" "strconv" "time" "unsafe" @@ -84,7 +83,7 @@ func write_config(config_zone unsafe.Pointer, version_zone unsafe.Pointer) { "create_time": 1646972532, "uri": "/hello1", "priority": 0, -"id": "1", +"id": "2", "upstream_id": "1" }`) @@ -95,17 +94,21 @@ func write_config(config_zone unsafe.Pointer, version_zone unsafe.Pointer) { } +func get_version() string { + return strconv.FormatInt(time.Now().UnixNano()/1e6, 10) +} + func update_conf_version(zone unsafe.Pointer) { ctx := context.Background() + key := "version" + write_shdict(key, get_version(), zone) go func() { for { select { case <-ctx.Done(): return - case <-time.After(time.Second * time.Duration(rand.Intn(10))): - key := "version" - version := strconv.FormatInt(time.Now().UnixNano()/1e6, 10) - write_shdict(key, version, zone) + case <-time.After(time.Second * 5): + write_shdict("version", get_version(), zone) } } }()