[GitHub] [apisix] membphis closed issue #2138: test case: log-rotate.t is unstable
membphis closed issue #2138: URL: https://github.com/apache/apisix/issues/2138 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix] branch master updated: fix: log-rotate.t is unstable (#2164)
This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git The following commit(s) were added to refs/heads/master by this push: new d421683 fix: log-rotate.t is unstable (#2164) d421683 is described below commit d4216831e3c65ac26f4a600fa6b216471ecda6d7 Author: gy AuthorDate: Sun Sep 6 12:10:42 2020 +0800 fix: log-rotate.t is unstable (#2164) fix #2138 --- t/plugin/log-rotate.t | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/t/plugin/log-rotate.t b/t/plugin/log-rotate.t index 9896865..3cf08cb 100644 --- a/t/plugin/log-rotate.t +++ b/t/plugin/log-rotate.t @@ -51,17 +51,36 @@ __DATA__ content_by_lua_block { ngx.log(ngx.ERR, "start xx") ngx.sleep(2.5) - +local has_split_access_file = false +local has_split_error_file = false local lfs = require("lfs") -for file in lfs.dir(ngx.config.prefix() .. "/logs/") do -ngx.say(file) +for file_name in lfs.dir(ngx.config.prefix() .. "/logs/") do +if string.match(file_name, "__access.log$") then +has_split_access_file = true +end + +if string.match(file_name, "__error.log$") then +local f = assert(io.open(ngx.config.prefix() .. "/logs/" .. file_name, "r")) +local content = f:read("*all") +f:close() +local index = string.find(content, "start xx") +if index then +has_split_error_file = true +end +end end + +if not has_split_error_file or not has_split_error_file then + ngx.status = 500 +else + ngx.status = 200 +end } } --- request GET /t response_body_like eval -qr/\_error\.log[\s\S]*\_access\.log/ +--- error_code eval +[200] --- no_error_log [error]
[GitHub] [apisix] membphis merged pull request #2164: fix:log-rotate.t is unstable
membphis merged pull request #2164: URL: https://github.com/apache/apisix/pull/2164 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #432: Feat: manage api support route group
juzhiyuan commented on a change in pull request #432: URL: https://github.com/apache/apisix-dashboard/pull/432#discussion_r483949519 ## File path: api/route/route.go ## @@ -209,6 +223,15 @@ func updateRoute(c *gin.Context) { } }() logger.Info(rd) + if isCreateGroup { + if err := tx.Model({}).Create(routeGroup).Error; err != nil { + tx.Rollback() Review comment: @liuxiran Please take look :D This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #443: enhancement: add paging to the listUpstreamName
juzhiyuan commented on pull request #443: URL: https://github.com/apache/apisix-dashboard/pull/443#issuecomment-687608519 cc @nic-chen @gxthrj This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #443: enhancement: add paging to the listUpstreamName
juzhiyuan merged pull request #443: URL: https://github.com/apache/apisix-dashboard/pull/443 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[apisix-dashboard] branch master updated: feat: add paging to the listUpstreamName (#443)
This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git The following commit(s) were added to refs/heads/master by this push: new ce06449 feat: add paging to the listUpstreamName (#443) ce06449 is described below commit ce064494ab80f70fcac3976f405776ef3a9eafd9 Author: liuxiran AuthorDate: Sat Sep 5 21:04:49 2020 +0800 feat: add paging to the listUpstreamName (#443) --- api/route/upstream.go | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/route/upstream.go b/api/route/upstream.go index 0bff0cb..0135a85 100644 --- a/api/route/upstream.go +++ b/api/route/upstream.go @@ -74,10 +74,17 @@ func isUpstreamExist(c *gin.Context) { } func listUpstreamName(c *gin.Context) { + size, _ := strconv.Atoi(c.Query("size")) + page, _ := strconv.Atoi(c.Query("page")) db := conf.DB() upstreamList := []service.UpstreamDao{} var count int - if err := db.Order("name").Table("upstreams").Find().Count().Error; err != nil { + if size == 0 || page == 0 { + db = db.Order("name").Table("upstreams") + } else { + db = db.Order("name").Table("upstreams").Offset((page - 1) * size).Limit(size) + } + if err := db.Find().Count().Error; err != nil { e := errno.FromMessage(errno.UpstreamRequestError, err.Error()) logger.Error(e.Msg) c.AbortWithStatusJSON(http.StatusInternalServerError, e.Response())
[GitHub] [apisix-website] moonming opened a new issue #72: add reference to "Apache APISIX software"
moonming opened a new issue #72: URL: https://github.com/apache/apisix-website/issues/72 Please review and ensure that the project website meets these requirements. http://www.apache.org/foundation/marks/pmcs For example, I don't see a reference to "Apache APISIX software" on either the homepage or the download page. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Yiyiyimu commented on pull request #2173: optimize output of check-plugins-code
Yiyiyimu commented on pull request #2173: URL: https://github.com/apache/apisix/pull/2173#issuecomment-687573035 ### Original output Success ```bash + sudo sh ./utils/check-plugins-code.sh apisix/plugins/authz-keycloak.lua ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found passed. apisix/plugins/basic-auth.lua ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found ... ``` Failure ```bash apisix/plugins/uri-blocker.lua can't exit in rewrite or access phase ! ``` ### New output Success ```bash All passed. ``` Failure ```bash [RED]apisix/plugins/uri-blocker.lua can't exit in rewrite or access phase! ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Yiyiyimu opened a new pull request #2173: optimize output of check-plugins-code
Yiyiyimu opened a new pull request #2173: URL: https://github.com/apache/apisix/pull/2173 ### What this PR does / why we need it: fix #2172 ### Pre-submission checklist: * [x] Did you explain what problem does this PR solve? Or what new features have been added? * [ ] Have you added corresponding test cases? * [ ] Have you modified the corresponding document? * [x] Is this PR backward compatible? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix] Yiyiyimu opened a new issue #2172: bug: check-plugins-code not correctly configured
Yiyiyimu opened a new issue #2172: URL: https://github.com/apache/apisix/issues/2172 ### Issue description Currently check-plugins-code.sh use `sh` rather than `bash` so it would output errors as following. ### What's the actual result? ``` + sudo sh ./utils/check-plugins-code.sh apisix/plugins/authz-keycloak.lua ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found passed. apisix/plugins/basic-auth.lua ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found apisix/plugins/batch-requests.lua ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found passed. ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 23: ./utils/check-plugins-code.sh: [[: not found ./utils/check-plugins-code.sh: 24: ./utils/check-plugins-code.sh: [[: not found passed. ... ``` ### What's the expected result? ``` all passed ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org