You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/29 05:55:21 UTC

[GitHub] [apisix] Yiyiyimu opened a new pull request #2346: doc: update etcd installation step for v3.4

Yiyiyimu opened a new pull request #2346:
URL: https://github.com/apache/apisix/pull/2346


   ### What this PR does / why we need it:
   fix #2344 
   
   ### 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:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #2346: doc: update etcd installation step for v3.4

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #2346:
URL: https://github.com/apache/apisix/pull/2346#discussion_r497224277



##########
File path: bin/apisix
##########
@@ -998,19 +998,19 @@ local function init_etcd(show_output)
         local errmsg = string.format("got malformed version message: \"%s\" from etcd", res)
         local body, _, err = dkjson.decode(res)
         if err then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         local cluster_version = body["etcdcluster"]
         if not cluster_version then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         if compare_semantic_version(cluster_version, min_etcd_version) then
-            io.stderr:write("etcd cluster version ", cluster_version,

Review comment:
       I think it's strange here to use `error` since it exposes the coroutine stack traceback besides the error message, which is useless for administrator. Since it's not a programming fault or some systematical errors, i think output error message to stderr is better.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #2346: doc: update etcd installation step for v3.4

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #2346:
URL: https://github.com/apache/apisix/pull/2346#discussion_r497227404



##########
File path: bin/apisix
##########
@@ -998,19 +998,19 @@ local function init_etcd(show_output)
         local errmsg = string.format("got malformed version message: \"%s\" from etcd", res)
         local body, _, err = dkjson.decode(res)
         if err then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         local cluster_version = body["etcdcluster"]
         if not cluster_version then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         if compare_semantic_version(cluster_version, min_etcd_version) then
-            io.stderr:write("etcd cluster version ", cluster_version,

Review comment:
       thank you for the suggestion, but simply output is error is very likely to be overlooked, like in #2342. 
   Replace `error` with `write`+`exit`, to not expose the traceback




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] spacewander merged pull request #2346: doc: update etcd installation step for v3.4

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #2346:
URL: https://github.com/apache/apisix/pull/2346


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] tokers commented on a change in pull request #2346: doc: update etcd installation step for v3.4

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #2346:
URL: https://github.com/apache/apisix/pull/2346#discussion_r497224277



##########
File path: bin/apisix
##########
@@ -998,19 +998,19 @@ local function init_etcd(show_output)
         local errmsg = string.format("got malformed version message: \"%s\" from etcd", res)
         local body, _, err = dkjson.decode(res)
         if err then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         local cluster_version = body["etcdcluster"]
         if not cluster_version then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         if compare_semantic_version(cluster_version, min_etcd_version) then
-            io.stderr:write("etcd cluster version ", cluster_version,

Review comment:
       I think it's strange here to use `error` since it exposes the coroutine stack traceback besides the error message, which is useless for administrator. Since it's not a programming fault or some systemtical errors, i think output error message to stderr is better.




----------------------------------------------------------------
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:
users@infra.apache.org