moonming commented on code in PR #11032:
URL: https://github.com/apache/apisix/pull/11032#discussion_r1524377271


##########
apisix/cli/ops.lua:
##########
@@ -487,11 +482,8 @@ Please modify "admin_key" in conf/config.yaml .
             port = 9443
         end
 
-        if enable_http2 == nil then
-            enable_http2 = false
-        end
-        if enable_http2 == true then
-            enable_http2_global = true
+        if enable_http2 ~= nil then
+            util.die("ERROR: enable_http2 is deprecated, you should use 
apisix.enable_http2.", "\n")

Review Comment:
   we need test cases for it.



##########
apisix/cli/ops.lua:
##########
@@ -487,11 +482,8 @@ Please modify "admin_key" in conf/config.yaml .
             port = 9443
         end
 
-        if enable_http2 == nil then
-            enable_http2 = false
-        end
-        if enable_http2 == true then
-            enable_http2_global = true
+        if enable_http2 ~= nil then
+            util.die("ERROR: enable_http2 is deprecated, you should use 
apisix.enable_http2.", "\n")

Review Comment:
   ditto



##########
apisix/cli/ops.lua:
##########
@@ -452,15 +449,13 @@ Please modify "admin_key" in conf/config.yaml .
                     port = 9080
                 end
 
-                if enable_http2 == nil then
-                    enable_http2 = false
-                end
-                if enable_http2 == true then
-                    enable_http2_global = true
+                if enable_http2 ~= nil then
+                    util.die("ERROR: enable_http2 is deprecated,"
+                            .. " you should use apisix.enable_http2.", "\n")

Review Comment:
   We need a more explicit error log. For instance, the port level 
"enable_http2" in node_listen has been deprecated from the 3.9 version, and you 
should use "enable_http2" in the apisix level.
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to