[GitHub] [apisix] membphis commented on a change in pull request #2374: chore: remove the folder 'logs' in root and replace baidu.com with github.com in test cases

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2374:
URL: https://github.com/apache/apisix/pull/2374#discussion_r503682853



##
File path: bin/apisix
##
@@ -1065,6 +1065,9 @@ local openresty_args = [[openresty  -p ]] .. apisix_home 
.. [[ -c ]]
.. apisix_home .. [[/conf/nginx.conf]]
 
 function _M.start(...)
+
+local cmd_logs = "mkdir -p " ..  apisix_home .. "/logs"

Review comment:
   I create a new issue about this discuss.
   
   we can continue to talk in this issue: 
https://github.com/apache/apisix/issues/2405
   
   





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] membphis opened a new issue #2405: CLI: What if the user start apisix by sudo? Does the worker still have permission to write logs?

2020-10-12 Thread GitBox


membphis opened a new issue #2405:
URL: https://github.com/apache/apisix/issues/2405


   > What if the user start apisix by sudo? Does the worker still have 
permission to write logs?
   
   @dabue we need to confirm this case.
   
   original commit: https://github.com/apache/apisix/pull/2374/files#r503639787



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] membphis commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


membphis commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503673586



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia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[apisix] sober-wang commented on issue #1873: doc: The `doc/admin-api.md#consumer` & `doc/zh-cn/admin-api.md#consumer` doc, the consumer 'id' meaning confused.

2020-10-12 Thread GitBox


sober-wang commented on issue #1873:
URL: https://github.com/apache/apisix/issues/1873#issuecomment-707492597


   How to create a new X-API-KEY ?
   Would we always use the `edd1c9f034335f136f87ad84b625c8f1` ?
   If my URI include usernaem and password . What should I write the HTTP Body?



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] idbeta commented on pull request #2368: WIP: add uri fuzzing test

2020-10-12 Thread GitBox


idbeta commented on pull request #2368:
URL: https://github.com/apache/apisix/pull/2368#issuecomment-707491225


   As I mentioned in the summary above, using python as a new testing method is 
a supplement to the current test method. It can do some special operations, 
which are more difficult to implement in the current test method.



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] membphis commented on a change in pull request #2309: feat(http-logger): support for specified the log formats via admin API

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2309:
URL: https://github.com/apache/apisix/pull/2309#discussion_r503667225



##
File path: apisix/plugins/http-logger.lua
##
@@ -117,12 +139,52 @@ local function send_http_data(conf, log_message)
 end
 
 
-function _M.log(conf)
-local entry = log_util.get_full_log(ngx, conf)
+local function gen_log_format(metadata)
+local log_format = {}
+if metadata == nil then
+return log_format
+end
+
+for k, var_name in pairs(metadata.value.log_format) do
+if var_name:sub(1, 1) == "$" then

Review comment:
   thx, fixed





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 #2404: chore: fix broken link

2020-10-12 Thread GitBox


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


   Signed-off-by: yiyiyimu 
   
   ### What this PR does / why we need it:
   fix broken link with https://github.com/tcort/markdown-link-check. 
   This tool supports **GitHub actions**, do we need to deploy one in apisix?
   
   ### 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?
   * [ ] 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-website] Yiyiyimu commented on issue #78: add apisix/doc to website for better view

2020-10-12 Thread GitBox


Yiyiyimu commented on issue #78:
URL: https://github.com/apache/apisix-website/issues/78#issuecomment-707484937


   I think netlify support this feature: [use multiple repo to build one 
website](https://community.netlify.com/t/support-guide-can-i-deploy-multiple-repositories-in-a-single-site/179).
 I'm not sure if docusaurus supports it



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] ShiningRush commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


ShiningRush commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503665014



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwHDgHTgY35ibgQsptyLy8Ca5HTC\nrnoocP2AcKtM+qwOMGiNHpeh+/zfB91C9AszvS8H2ao5nq4u0/JavPO4A4WmVYol\n7Qv9ACY/8uaKC79syahut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K85KDwLDANBgkqhkiG9w0BAQsFADB/\nMR4wHAYDVQQKExVta2NlcnQgZGV2ZWxvcG1lbnQgQ0ExKjAoBgNVBAsMIWp1bnh1\nY2hlbkBqdW54dWRlQWlyIChqdW54dSBjaGVuKTExMC8GA1UEAwwobWtjZXJ0IGp1\nbnh1Y2hlbkBqdW54dWRlQWlyIChqdW54dSBjaGVuKTAeFw0xOTA2MDEwMDAwMDBa\nFw0zMDA3MDgwNzQ4MDJaMFUxJzAlBgNVBAoTHm1rY2VydCBkZXZlbG9wbWVudCBj\nZXJ0aWZpY2F0ZTEqMCgGA1UECwwhanVueHVjaGVuQGp1bnh1ZGVBaXIgKGp1bnh1\nIGNoZW4pMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix] muxueqz opened a new pull request #2403: Fix the format

2020-10-12 Thread GitBox


muxueqz opened a new pull request #2403:
URL: https://github.com/apache/apisix/pull/2403


   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   * [ ] 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?
   * [ ] 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-dashboard] ShiningRush commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


ShiningRush commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503665014



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\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w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix-website] Yiyiyimu opened a new issue #78: add apisix/doc to website for better view

2020-10-12 Thread GitBox


Yiyiyimu opened a new issue #78:
URL: https://github.com/apache/apisix-website/issues/78


   In https://github.com/apache/apisix/pull/1724, sshniro use docsify to build 
a website for the doc, but I think we didn't actually present that link to 
users and he hasn't maintained that repo anymore.
   
   I think maybe we could directly add the doc here. I just don't know how to 
sync apisix/doc here.



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] nic-chen closed issue #536: bug: race detected during execution of test

2020-10-12 Thread GitBox


nic-chen closed issue #536:
URL: https://github.com/apache/apisix-dashboard/issues/536


   



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] nic-chen commented on issue #536: bug: race detected during execution of test

2020-10-12 Thread GitBox


nic-chen commented on issue #536:
URL: 
https://github.com/apache/apisix-dashboard/issues/536#issuecomment-707482065


   fixed.



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] nic-chen commented on issue #466: bug: a related to route basic-auth consumer should not be deleted

2020-10-12 Thread GitBox


nic-chen commented on issue #466:
URL: 
https://github.com/apache/apisix-dashboard/issues/466#issuecomment-707481610


   it's not a bug here.



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] nic-chen closed issue #466: bug: a related to route basic-auth consumer should not be deleted

2020-10-12 Thread GitBox


nic-chen closed issue #466:
URL: https://github.com/apache/apisix-dashboard/issues/466


   



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] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503660827



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwHDgHTgY35ibgQsptyLy8Ca5HTC\nrnoocP2AcKtM+qwOMGiNHpeh+/zfB91C9AszvS8H2ao5nq4u0/JavPO4A4WmVYol\n7Qv9ACY/8uaKC79syah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pK85KDwLDANBgkqhkiG9w0BAQsFADB/\nMR4wHAYDVQQKExVta2NlcnQgZGV2ZWxvcG1lbnQgQ0ExKjAoBgNVBAsMIWp1bnh1\nY2hlbkBqdW54dWRlQWlyIChqdW54dSBjaGVuKTExMC8GA1UEAwwobWtjZXJ0IGp1\nbnh1Y2hlbkBqdW54dWRlQWlyIChqdW54dSBjaGVuKTAeFw0xOTA2MDEwMDAwMDBa\nFw0zMDA3MDgwNzQ4MDJaMFUxJzAlBgNVBAoTHm1rY2VydCBkZXZlbG9wbWVudCBj\nZXJ0aWZpY2F0ZTEqMCgGA1UECwwhanVueHVjaGVuQGp1bnh1ZGVBaXIgKGp1bnh1\nIGNoZW4pMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix] dabue commented on a change in pull request #2374: chore: remove the folder 'logs' in root and replace baidu.com with github.com in test cases

2020-10-12 Thread GitBox


dabue commented on a change in pull request #2374:
URL: https://github.com/apache/apisix/pull/2374#discussion_r503659750



##
File path: bin/apisix
##
@@ -1065,6 +1065,9 @@ local openresty_args = [[openresty  -p ]] .. apisix_home 
.. [[ -c ]]
.. apisix_home .. [[/conf/nginx.conf]]
 
 function _M.start(...)
+
+local cmd_logs = "mkdir -p " ..  apisix_home .. "/logs"

Review comment:
   > @dabue @membphis
   
   The directory logs is required when the APISIX is running. On the first 
running, it needs to be created if we keep the logs removed from the root, and 
should have the appropriate permissions.
   when the directory already exists, whether the directory is created by the 
first running or is from the beginning,  the permission to write logs are same.
   I'll do a test to verify it.





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 #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503654569



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwHDgHTgY35ibgQsptyLy8Ca5HTC\nrnoocP2AcKtM+qwOMGiNHpeh+/zfB91C9AszvS8H2ao5nq4u0/JavPO4A4WmVYol\n7Qv9ACY/8uaKC79syahutbkMjwGsQgYsq9G0QpcLSCuOb4vBbOb130mptSM9NzKg\nTjSxF2D8ob//roZMc1ueTpqAY6WedKV3y3BIBDKuAQKBgQDgGyEsxwR9QtA5EH/h\nJ4GiTQn0aep8G2LSlAtHGndL3sxaGGLt2pk3lNIeRAbOS3APmYskBN418JIF/Ren\nE0CYSrTaxpTs9UXXkgKNJ63Z6r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VuKTAeFw0xOTA2MDEwMDAwMDBa\nFw0zMDA3MDgwNzQ4MDJaMFUxJzAlBgNVBAoTHm1rY2VydCBkZXZlbG9wbWVudCBj\nZXJ0aWZpY2F0ZTEqMCgGA1UECwwhanVueHVjaGVuQGp1bnh1ZGVBaXIgKGp1bnh1\nIGNoZW4pMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #521: feat: Refactor Frondend with Admin API

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #521:
URL: https://github.com/apache/apisix-dashboard/pull/521#discussion_r503653883



##
File path: src/pages/Route/transform.ts
##
@@ -77,6 +77,8 @@ export const transformStepData = ({
   'redirectURI',
   'ret_code',
   'redirectOption',
+  !Object.keys(step3Data.plugins).length ? 'plugins' : '',

Review comment:
   Why we need `!`? @LiteSun 





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] ShiningRush commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


ShiningRush commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503651711



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0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A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[apisix-dashboard] branch fe-refactor updated (3a27ca9 -> 3dfd9f0)

2020-10-12 Thread sunyi
This is an automated email from the ASF dual-hosted git repository.

sunyi pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from 3a27ca9  feat: remove RouteGroup
 add eed086c  feat(Route): omit empty plugins and script
 add 3dfd9f0  Merge branch fe-refactor of 
github.com:apache/incubator-apisix-dashboard into fe-refactor

No new revisions were added by this update.

Summary of changes:
 src/pages/Route/transform.ts | 2 ++
 1 file changed, 2 insertions(+)



[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503648630



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwH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yuan commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503648630



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7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qLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix-dashboard] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503647173



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwHDgHTgY35ibgQsptyLy8Ca5HTC\nrnoocP2AcKtM+qwOMGiNHpeh+/zfB91C9AszvS8H2ao5nq4u0/JavPO4A4WmVYol\n7Qv9ACY/8uaKC79syahutbkMjwGsQgYsq9G0QpcLSCuOb4vBbOb130mptSM9NzKg\nTjSxF2D8ob//roZMc1ueTpqAY6WedKV3y3BIBDKuAQKBgQDgGyEsxwR9QtA5EH/h\nJ4GiTQn0aep8G2LSlAtHGndL3sxaGGLt2pk3lNIeRAbOS3APmYskBN418JIF/Ren\nE0CYSrTaxpTs9UXXkgKNJ63Z6r+btswTAVVXG5Zoi/5JR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MDAwMDBa\nFw0zMDA3MDgwNzQ4MDJaMFUxJzAlBgNVBAoTHm1rY2VydCBkZXZlbG9wbWVudCBj\nZXJ0aWZpY2F0ZTEqMCgGA1UECwwhanVueHVjaGVuQGp1bnh1ZGVBaXIgKGp1bnh1\nIGNoZW4pMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix-dashboard] ShiningRush commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


ShiningRush commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503647162



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20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jAYgglyb3V0ZS5j
 

[GitHub] [apisix] idbeta commented on issue #2388: bug: 2020/10/11 11:29:46 [error] 24#24: *18483 [lua] config_etcd.lua:433: failed to fetch data from etcd: /apisix/routes is not a dir, etcd key: /ap

2020-10-12 Thread GitBox


idbeta commented on issue #2388:
URL: https://github.com/apache/apisix/issues/2388#issuecomment-707462749


   If you are using APISIX 1.5 ( installed with "wget 
http://www.apache.org/dist/apisix/1.5/apache-apisix-1.5-src.tar.gz; ), 
   you should start etcd like this: 
   ```shell
   etcd -enable-v2 &
   ```



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 #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503646130



##
File path: api/internal/handler/ssl/ssl_test.go
##
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ssl
+
+import (
+   "encoding/json"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+func TestSSL(t *testing.T) {
+   // init
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+   assert.Nil(t, err)
+   err = store.InitStores()
+   assert.Nil(t, err)
+
+   handler := {
+   sslStore: store.GetStore(store.HubKeySsl),
+   }
+   assert.NotNil(t, handler)
+
+   //create
+   ctx := droplet.NewContext()
+   ssl := {}
+   reqBody := `{
+"id": "1",
+ "key": "-BEGIN PRIVATE 
KEY-\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDGO0J9xrOcmvgh\npkqHIYHCw35FTfIT5uXOSzdF49M2ZAKBQwFG0ovYT8bc0glNLB+hpDhJPL531qSP\nl1ZOe0W1ofP1u0T5Zzc9Rub/kn7RMPq0BsSC6J3rF+rQEwh1PM8qUuD8DxZ7jaOL\niMNL6SyuZIPsS1kPPBtsioukdo666tbjNMixhQbI9Wpg55abdXRFh3i7Zu/9siF1\njCGcsskjOaUOY4sYQ3i5WU/HIIRhA82XuIL+Sxd32P8bKi2UT1sqFXRjAVR7KRWo\nIVvkmSLoZb9ucV6MsccDrRYBf6rLbI1tFj9l2rY6GTFlT+6z7K/ZI60DGi/hsBfl\nDeEQ5WuxAgMBAAECggEAVHQQyucpxHGdfzCKlfGnh+Oj20Du/p2jkHUpEkSSypxn\nGM0EMTkoTTsHvTJath8zRrlhJYqUlxfCOk6+fWc1dsGN30Yuh5b6yMd5SK8QCm20\nkZhEhoU2Kl+hMY66TsBefmia46hF6tOYNq1IjwHDgHTgY35ibgQsptyLy8Ca5HTC\nrnoocP2AcKtM+qwOMGiNHpeh+/zfB91C9AszvS8H2ao5nq4u0/JavPO4A4WmVYol\n7Qv9ACY/8uaKC79syahutbkMjwGsQgYsq9G0QpcLSCuOb4vBbOb130mptSM9NzKg\nTjSxF2D8ob//roZMc1ueTpqAY6WedKV3y3BIBDKuAQKBgQDgGyEsxwR9QtA5EH/h\nJ4GiTQn0aep8G2LSlAtHGndL3sxaGGLt2pk3lNIeRAbOS3APmYskBN418JIF/Ren\nE0CYSrTaxpTs9UX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IChqdW54dSBjaGVuKTAeFw0xOTA2MDEwMDAwMDBa\nFw0zMDA3MDgwNzQ4MDJaMFUxJzAlBgNVBAoTHm1rY2VydCBkZXZlbG9wbWVudCBj\nZXJ0aWZpY2F0ZTEqMCgGA1UECwwhanVueHVjaGVuQGp1bnh1ZGVBaXIgKGp1bnh1\nIGNoZW4pMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxjtCfcaznJr4\nIaZKhyGBwsN+RU3yE+blzks3RePTNmQCgUMBRtKL2E/G3NIJTSwfoaQ4STy+d9ak\nj5dWTntFtaHz9btE+Wc3PUbm/5J+0TD6tAbEguid6xfq0BMIdTzPKlLg/A8We42j\ni4jDS+ksrmSD7EtZDzwbbIqLpHaOuurW4zTIsYUGyPVqYOeWm3V0RYd4u2bv/bIh\ndYwhnLLJIzmlDmOLGEN4uVlPxyCEYQPNl7iC/ksXd9j/GyotlE9bKhV0YwFUeykV\nqCFb5Jki6GW/bnFejLHHA60WAX+qy2yNbRY/Zdq2OhkxZU/us+yv2SOtAxov4bAX\n5Q3hEOVrsQIDAQABo3kwdzAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYB\nBQUHAwEwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBRU+EbJj+Hp62gCrNvb3yQk\nYnPHXDAhBgNVHREEGjAYgglyb3V0ZS5j
 

[GitHub] [apisix-dashboard] ShiningRush commented on pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


ShiningRush commented on pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#issuecomment-707462025


   I see that there are still some problems in the code, but they do not affect 
the main function, we can fix it later.



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] spacewander commented on a change in pull request #2309: feat(http-logger): support for specified the log formats via admin API

2020-10-12 Thread GitBox


spacewander commented on a change in pull request #2309:
URL: https://github.com/apache/apisix/pull/2309#discussion_r503644982



##
File path: apisix/plugins/http-logger.lua
##
@@ -117,12 +139,52 @@ local function send_http_data(conf, log_message)
 end
 
 
-function _M.log(conf)
-local entry = log_util.get_full_log(ngx, conf)
+local function gen_log_format(metadata)
+local log_format = {}
+if metadata == nil then
+return log_format
+end
+
+for k, var_name in pairs(metadata.value.log_format) do
+if var_name:sub(1, 1) == "$" then

Review comment:
   `var_name:byte(1, 1)` is already enough?





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 closed pull request #552: refactor-api

2020-10-12 Thread GitBox


juzhiyuan closed pull request #552:
URL: https://github.com/apache/apisix-dashboard/pull/552


   



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] moonming commented on a change in pull request #2374: chore: remove the folder 'logs' in root and replace baidu.com with github.com in test cases

2020-10-12 Thread GitBox


moonming commented on a change in pull request #2374:
URL: https://github.com/apache/apisix/pull/2374#discussion_r503639787



##
File path: bin/apisix
##
@@ -1065,6 +1065,9 @@ local openresty_args = [[openresty  -p ]] .. apisix_home 
.. [[ -c ]]
.. apisix_home .. [[/conf/nginx.conf]]
 
 function _M.start(...)
+
+local cmd_logs = "mkdir -p " ..  apisix_home .. "/logs"

Review comment:
   I don't think is ​​a good idea to create directories.  What if the user 
start apisix by sudo?  Does the worker still have permission to write logs?





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 fe-refactor updated (725538a -> 3a27ca9)

2020-10-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from 725538a  feat: remove Debug
 add 3a27ca9  feat: remove RouteGroup

No new revisions were added by this update.

Summary of changes:
 config/routes.ts|  12 ---
 src/helpers.tsx |   5 --
 src/locales/en-US/menu.ts   |   1 -
 src/locales/zh-CN/menu.ts   |   1 -
 src/pages/Route/locales/en-US.ts|   2 -
 src/pages/Route/locales/zh-CN.ts|   2 -
 src/pages/RouteGroup/Create.tsx |  98 
 src/pages/RouteGroup/List.tsx   | 115 
 src/pages/RouteGroup/components/Preview.tsx |  28 ---
 src/pages/RouteGroup/components/Step1.tsx   |  59 --
 src/pages/RouteGroup/constants.ts   |  31 
 src/pages/RouteGroup/index.ts   |  18 -
 src/pages/RouteGroup/locales/en-US.ts   |  19 -
 src/pages/RouteGroup/locales/zh-CN.ts   |  19 -
 src/pages/RouteGroup/service.ts |  46 ---
 src/pages/RouteGroup/typing.d.ts|  23 --
 16 files changed, 479 deletions(-)
 delete mode 100644 src/pages/RouteGroup/Create.tsx
 delete mode 100644 src/pages/RouteGroup/List.tsx
 delete mode 100644 src/pages/RouteGroup/components/Preview.tsx
 delete mode 100644 src/pages/RouteGroup/components/Step1.tsx
 delete mode 100644 src/pages/RouteGroup/constants.ts
 delete mode 100644 src/pages/RouteGroup/index.ts
 delete mode 100644 src/pages/RouteGroup/locales/en-US.ts
 delete mode 100644 src/pages/RouteGroup/locales/zh-CN.ts
 delete mode 100644 src/pages/RouteGroup/service.ts
 delete mode 100644 src/pages/RouteGroup/typing.d.ts



[GitHub] [apisix] moonming commented on a change in pull request #2374: chore: remove the folder 'logs' in root and replace baidu.com with github.com in test cases

2020-10-12 Thread GitBox


moonming commented on a change in pull request #2374:
URL: https://github.com/apache/apisix/pull/2374#discussion_r503641456



##
File path: bin/apisix
##
@@ -1065,6 +1065,9 @@ local openresty_args = [[openresty  -p ]] .. apisix_home 
.. [[ -c ]]
.. apisix_home .. [[/conf/nginx.conf]]
 
 function _M.start(...)
+
+local cmd_logs = "mkdir -p " ..  apisix_home .. "/logs"

Review comment:
   @dabue @membphis 





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] nic-chen closed issue #539: bug: [refactor] test case run failed sometimes

2020-10-12 Thread GitBox


nic-chen closed issue #539:
URL: https://github.com/apache/apisix-dashboard/issues/539


   



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] juzhiyuan commented on issue #2402: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


juzhiyuan commented on issue #2402:
URL: https://github.com/apache/apisix/issues/2402#issuecomment-707454496


   Just transferred the issue to the apisix repository, cc @membphis 



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] liuxiran opened a new issue #2402: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


liuxiran opened a new issue #2402:
URL: https://github.com/apache/apisix/issues/2402


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [x] Question or discussion
   - [ ] Bug
   - [ ] Requirements
   - [ ] Feature or performance improvement
   - [ ] Other
   
   ___
   ### Question
   - What do you want to know?
   
   I'm confused about the option select item in the consumer-restriction plugin
   
![image](https://user-images.githubusercontent.com/2561857/94222544-3adfc000-ff20-11ea-8c4e-b4448e045b34.png)
what does it mean?
   
   ___
   ### Bug
   - Which version of Apache APISIX Dashboard, OS, and Browser?
   
   - What happened?
   If possible, provide a way to reproduce the error.
   
   ___
   ### Requirement or improvement
   - Please describe your requirements or improvement suggestions.
   



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 fe-refactor updated (f42a3ac -> 725538a)

2020-10-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from f42a3ac  feat(Route): remove Upstream header
 add 725538a  feat: remove Debug

No new revisions were added by this update.

Summary of changes:
 config/routes.ts |   4 --
 src/pages/Route/Debug.tsx|  55 -
 src/pages/Route/locales/en-US.ts |   1 -
 src/pages/Route/locales/zh-CN.ts |   1 -
 src/pages/Route/service.ts   |  10 +---
 src/pages/Route/transform.ts | 102 ---
 src/pages/Route/typing.d.ts  |  22 -
 7 files changed, 1 insertion(+), 194 deletions(-)
 delete mode 100644 src/pages/Route/Debug.tsx



[apisix-dashboard] branch fe-refactor updated (02c87d5 -> f42a3ac)

2020-10-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from 02c87d5  fix(Route): check if data.plugins
 add f42a3ac  feat(Route): remove Upstream header

No new revisions were added by this update.

Summary of changes:
 src/components/Upstream/UpstreamForm.tsx   |   2 +-
 src/pages/Route/Create.tsx |  19 +-
 .../Route/components/CreateStep4/CreateStep4.tsx   |   9 +-
 .../components/Step2/HttpHeaderRewriteView.tsx | 221 -
 .../Route/components/Step2/RequestRewriteView.tsx  |   1 -
 src/pages/Route/components/Step2/index.tsx |  10 +-
 src/pages/Route/constants.ts   |   5 +-
 src/pages/Route/transform.ts   |  51 +
 src/pages/Route/typing.d.ts|  12 --
 src/typings.d.ts   |   2 +-
 10 files changed, 11 insertions(+), 321 deletions(-)
 delete mode 100644 src/pages/Route/components/Step2/HttpHeaderRewriteView.tsx



[GitHub] [apisix] moonming commented on pull request #2368: WIP: add uri fuzzing test

2020-10-12 Thread GitBox


moonming commented on pull request #2368:
URL: https://github.com/apache/apisix/pull/2368#issuecomment-707453182


   > @idbeta You can link to the issues found in this PR here.
   > 
   > 
   > 
   > Prove that this PR is very useful.
   
   Can test nginx find those issue too? Why we need a new testing method?



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] moonming commented on pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


moonming commented on pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#issuecomment-707452129


   This change seems to be of little use to the current code



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] moonming commented on pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


moonming commented on pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#issuecomment-707451754


   Is there a long sleep in the project?



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] membphis closed pull request #2306: 1.fix generation of uuid;

2020-10-12 Thread GitBox


membphis closed pull request #2306:
URL: https://github.com/apache/apisix/pull/2306


   



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] membphis merged pull request #2401: add milestone info in README.md and README_CN.md

2020-10-12 Thread GitBox


membphis merged pull request #2401:
URL: https://github.com/apache/apisix/pull/2401


   



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: doc: added milestone info in README.md and README_CN.md (#2401)

2020-10-12 Thread membphis
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 97cec5d  doc: added milestone info in README.md and README_CN.md 
(#2401)
97cec5d is described below

commit 97cec5d42242f1d7bde9d59ce2bace10e3b3269d
Author: li1234yun 
AuthorDate: Tue Oct 13 10:38:56 2020 +0800

doc: added milestone info in README.md and README_CN.md (#2401)
---
 README.md| 4 
 README_CN.md | 4 
 2 files changed, 8 insertions(+)

diff --git a/README.md b/README.md
index ed415c5..bdba061 100644
--- a/README.md
+++ b/README.md
@@ -265,6 +265,10 @@ Using AWS's 8 core server, APISIX's QPS reach to 140,000 
with a latency of only
 
 Benchmark comparison test [details 
data](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)
 
+## Milestones
+- [2.0](https://github.com/apache/apisix/milestone/7)
+- [2.1](https://github.com/apache/apisix/milestone/8)
+
 ## Videos And Articles
 - [APISIX technology selection, testing and continuous 
integration](https://medium.com/@ming_wen/apache-apisixs-technology-selection-testing-and-continuous-integration-313221b02542)
 - [Analysis of Excellent Performance of Apache APISIX Microservices 
Gateway](https://medium.com/@ming_wen/analysis-of-excellent-performance-of-apache-apisix-microservices-gateway-fc77db4090b5)
diff --git a/README_CN.md b/README_CN.md
index 571ecfb..13080d1 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -263,6 +263,10 @@ Dashboard 默认只允许 127.0.0.1 访问。你可以自行修改 `conf/config.
 
 
性能对比测试[详细内容如下](https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01)。
 
+## 开发计划
+- [2.0](https://github.com/apache/apisix/milestone/7)
+- [2.1](https://github.com/apache/apisix/milestone/8)
+
 ## 视频和文章
 - 2020.1.17 [API 网关 Apache APISIX 和 Kong 
的选型对比](https://mp.weixin.qq.com/s/c51apneVj0O9yxiZAHF34Q)
 - 2019.12.14 [从 0 到 1:Apache APISIX 的 Apache 
之路](https://zhuanlan.zhihu.com/p/99620158)



[GitHub] [apisix] membphis closed issue #2400: can you consider the project roadmap?

2020-10-12 Thread GitBox


membphis closed issue #2400:
URL: https://github.com/apache/apisix/issues/2400


   



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 fe-refactor updated (a2ad7d2 -> 02c87d5)

2020-10-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from a2ad7d2  fix(Upstream): use shorthand object
 add 02c87d5  fix(Route): check if data.plugins

No new revisions were added by this update.

Summary of changes:
 src/pages/Route/transform.ts | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)



[apisix-dashboard] branch fe-refactor updated (a2ad7d2 -> 02c87d5)

2020-10-12 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a change to branch fe-refactor
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


from a2ad7d2  fix(Upstream): use shorthand object
 add 02c87d5  fix(Route): check if data.plugins

No new revisions were added by this update.

Summary of changes:
 src/pages/Route/transform.ts | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)



[GitHub] [apisix] juzhiyuan commented on pull request #2401: add milestone info in README.md and README_CN.md

2020-10-12 Thread GitBox


juzhiyuan commented on pull request #2401:
URL: https://github.com/apache/apisix/pull/2401#issuecomment-707447567


   Hi @li1234yun, I just modified your PR: adding `resolve #ISSUE_NO` will 
close that issue once this PR is merged.
   
   
![image](https://user-images.githubusercontent.com/2106987/95808824-eae66300-0d3f-11eb-89c4-6fc221c859df.png)
   



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] membphis commented on issue #516: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


membphis commented on issue #516:
URL: 
https://github.com/apache/apisix-dashboard/issues/516#issuecomment-707447392


   @liuxiran LGTM, welcome to create an issue under `apache/apisix` ,then we 
can fix it.



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] li1234yun opened a new pull request #2401: add milestone info in README.md and README_CN.md

2020-10-12 Thread GitBox


li1234yun opened a new pull request #2401:
URL: https://github.com/apache/apisix/pull/2401


   add milestone info in README.md and README_CN.md



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] membphis commented on pull request #2368: WIP: add uri fuzzing test

2020-10-12 Thread GitBox


membphis commented on pull request #2368:
URL: https://github.com/apache/apisix/pull/2368#issuecomment-707435806


   @idbeta You can link to the issues found in this PR here.
   
   Prove that this PR is very useful.



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] li1234yun commented on issue #2400: can you consider the project roadmap?

2020-10-12 Thread GitBox


li1234yun commented on issue #2400:
URL: https://github.com/apache/apisix/issues/2400#issuecomment-707435540


   I will add milestone link in README file later.



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] juzhiyuan commented on issue #2400: can you consider the project roadmap?

2020-10-12 Thread GitBox


juzhiyuan commented on issue #2400:
URL: https://github.com/apache/apisix/issues/2400#issuecomment-707434151


   Welcome to send a PR to have the milestones more clearer in the README file 
樂 



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] juzhiyuan commented on issue #2400: can you consider the project roadmap?

2020-10-12 Thread GitBox


juzhiyuan commented on issue #2400:
URL: https://github.com/apache/apisix/issues/2400#issuecomment-707433837


   You could find the milestones here 
https://github.com/apache/apisix/milestones



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] liuxiran edited a comment on issue #516: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


liuxiran edited a comment on issue #516:
URL: 
https://github.com/apache/apisix-dashboard/issues/516#issuecomment-707241621


   furthermore, the schema below would be better for users:
   ```json
   {
 "definitions": {
"consumers": {
"type": "string",
  "enum": [
 "consumer #0",
 "consumer #1",
 "consumer #2",
 "consumer #3",
 "consumer #4",
 "consumer #5"
]
 }
},
 "type": "object",
 "oneOf": [
   {
 "title": "blacklist",
 "properties": {
   "blacklist": {
 "items": {
   "$ref": "#/definitions/consumers"
 },
 "minItems": 1,
 "type": "array"
   }
 },
 "required": [
   "blacklist"
 ]
   },
   {
 "title": "whitelist",
 "properties": {
   "whitelist": {
 "items": {
   "$ref": "#/definitions/consumers"
 },
 "minItems": 1,
 "type": "array"
   }
 },
 "required": [
   "whitelist"
 ]
   }
 ]
   }
   ```
   ![2020-10-13 
09-36-55屏幕截图](https://user-images.githubusercontent.com/2561857/95805324-bcfd2080-0d37-11eb-8dcf-6ff5909ac727.png)
   



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] li1234yun opened a new issue #2400: can you consider the project roadmap?

2020-10-12 Thread GitBox


li1234yun opened a new issue #2400:
URL: https://github.com/apache/apisix/issues/2400


   1. I don't find the project roadmap, can you consider about it? 
   2. By the way, I want to ask the release date of version 2.  ^_^



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] membphis commented on issue #2392: request help: why this route not work

2020-10-12 Thread GitBox


membphis commented on issue #2392:
URL: https://github.com/apache/apisix/issues/2392#issuecomment-707423464


   > ```shell
   > "uri": "/hello-_~!*();:@&=+$,/[]",
   > ```
   
   that is an invalid path for APISIX. the `*` mainly use for prefix matching.
   
   the admin API should return `400` for this case.
   
   here is the link of the APISIX router: 
https://github.com/api7/lua-resty-radixtree#prefix-match



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 issue #516: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


juzhiyuan commented on issue #516:
URL: 
https://github.com/apache/apisix-dashboard/issues/516#issuecomment-707408884


   ok then cc @membphis to taake a look



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] pahud commented on issue #2399: bug: broken link of AWS deployment, due to repo deleted

2020-10-12 Thread GitBox


pahud commented on issue #2399:
URL: https://github.com/apache/apisix/issues/2399#issuecomment-707405349


   Yes, I will refresh the doc and open a PR for this repo today.



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] dabue commented on a change in pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


dabue commented on a change in pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#discussion_r503581194



##
File path: apisix/core/utils.lua
##
@@ -194,4 +196,22 @@ function _M.validate_header_value(value)
 end
 
 
+local function sleep(sec)
+if sec <= max_sleep_interval then
+ngx_sleep(sec)
+return
+end
+ngx_sleep(max_sleep_interval)
+if exiting() then
+return
+end
+sec = sec - max_sleep_interval
+sleep(sec)
+end
+
+
+function _M.sleep(sec)

Review comment:
   I‘ve updated it.’





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] liuxiran commented on issue #516: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


liuxiran commented on issue #516:
URL: 
https://github.com/apache/apisix-dashboard/issues/516#issuecomment-707241621


   furthermore, the schema below would be better for users:
   ```json
   {
 "definitions": {
   "consumers": {
 "type": "string",
 "enum": [
   "option #0",
   "option #1",
   "option #2",
   "option #3",
   "option #4",
   "option #5"
 ]
   }
 },
 "type": "object",
 "oneOf": [
   {
 "title": "blacklist",
 "properties": {
   "blacklist": {
 "$ref": "#/definitions/consumers"
   }
 },
 "required": [
   "blacklist"
 ]
   },
   {
 "title": "whitelist",
 "properties": {
   "whitelist": {
 "$ref": "#/definitions/consumers"
   }
 },
 "required": [
   "whitelist"
 ]
   }
 ]
   }
   ```
   
![image](https://user-images.githubusercontent.com/2561857/95773237-abdcf100-0cf0-11eb-8c58-4ad70b9f2e7b.png)
   
   
![image](https://user-images.githubusercontent.com/2561857/95772978-3113d600-0cf0-11eb-807e-1a4b2d16d4cd.png)
   



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] liuxiran commented on issue #516: [Question] what does the option select item mean in the consumer-restriction plugin

2020-10-12 Thread GitBox


liuxiran commented on issue #516:
URL: 
https://github.com/apache/apisix-dashboard/issues/516#issuecomment-707228768


   the correct schema:
   ```json
   {
 "type": "object",
 "oneOf": [
   {
 "title": "blacklist",
 "properties": {
   "blacklist": {
 "items": {
   "type": "string"
 },
 "minItems": 1,
 "type": "array"
   }
 },
 "required": [
   "blacklist"
 ]
   },
   {
 "title": "whitelist",
 "properties": {
   "whitelist": {
 "items": {
   "type": "string"
 },
 "minItems": 1,
 "type": "array"
   }
 },
 "required": [
   "whitelist"
 ]
   }
 ]
   }
   ```
   
   
![image](https://user-images.githubusercontent.com/2561857/95771016-eba1d980-0cec-11eb-9b20-0317e186b6bc.png)
   



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 closed issue #2334: test: replace `baidu.com` to another domain in test cases

2020-10-12 Thread GitBox


Yiyiyimu closed issue #2334:
URL: https://github.com/apache/apisix/issues/2334


   



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 closed issue #2370: chore: remove folder `logs` in root

2020-10-12 Thread GitBox


Yiyiyimu closed issue #2370:
URL: https://github.com/apache/apisix/issues/2370


   



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 merged pull request #2374: chore: remove the folder 'logs' in root and replace baidu.com with github.com in test cases

2020-10-12 Thread GitBox


Yiyiyimu merged pull request #2374:
URL: https://github.com/apache/apisix/pull/2374


   



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 (b8e4b85 -> 40577ee)

2020-10-12 Thread shuyangw
This is an automated email from the ASF dual-hosted git repository.

shuyangw pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git.


from b8e4b85  change(hmac-auth): split schema to adapt different occasions 
(#2386)
 add 40577ee  chore: remove the folder 'logs'  in root and replace 
baidu.com with github.com in test cases (#2374)

No new revisions were added by this update.

Summary of changes:
 bin/apisix   | 3 +++
 logs/placeholder.txt | 0
 t/node/route-domain-with-local-dns.t | 4 ++--
 t/node/route-domain.t| 4 ++--
 4 files changed, 7 insertions(+), 4 deletions(-)
 delete mode 100644 logs/placeholder.txt



[GitHub] [apisix] membphis commented on issue #1195: feature: support multiple ports like stream listen in http and https listen port.

2020-10-12 Thread GitBox


membphis commented on issue #1195:
URL: https://github.com/apache/apisix/issues/1195#issuecomment-707199631


   > Apache APISIX is now using style 1,
   
   APISIX is using style 2 or 3 (only one port) currently.



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] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503379287



##
File path: .github/workflows/api_ci.yml
##
@@ -49,6 +49,16 @@ jobs:
 export GO111MOUDULE=on
 sudo apt install golang-1.14-go
 
+- name: generate json schema
+  working-directory: ./api
+  run: |
+wget https://github.com/apache/apisix/archive/master.zip
+mkdir ./build-tools/apisix/
+unzip master.zip
+sudo mv ./apisix-master/apisix/* ./build-tools/apisix/
+rm -rf ./apisix-master
+cd ./build-tools/ && lua schema-sync.lua > ../conf/schema.json

Review comment:
   if `scheme.json` is not correct, `manager api` will not be able to run: 
   
https://github.com/apache/apisix-dashboard/pull/551/files#diff-662a29145b19ca440fb3bca6c8605c50R45-R48





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] membphis commented on a change in pull request #2339: feature: breaker request by api

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2339:
URL: https://github.com/apache/apisix/pull/2339#discussion_r503378670



##
File path: t/plugin/api-breaker.t
##
@@ -464,15 +518,15 @@ passed
 
 
 
-=== TEST 17: max_breaker_seconds = 35
+=== TEST 18: add plugin, max_breaker_seconds = 17

Review comment:
   
![image](https://user-images.githubusercontent.com/6814606/95765173-0faced00-0ce4-11eb-8dc7-03eb60d880a3.png)
   





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 #2399: bug: broken link of AWS deployment, due to repo deleted

2020-10-12 Thread GitBox


Yiyiyimu opened a new issue #2399:
URL: https://github.com/apache/apisix/issues/2399


   ### Issue description
   In https://github.com/apache/apisix/tree/master/doc#aws
   > See [this 
guide](https://github.com/pahud/cdk-samples/blob/master/typescript/apisix/README.md)
 by [Pahud Hsieh](https://github.com/pahud) and learn how to provision the 
recommended architecture 100% in AWS CDK.
   
   The guide provided by Pahud just got deleted, due to Pahud deprecated that 
repo. Could we place that guide in the `doc` folder?
   I think @pahud is happy to help~
   



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] membphis commented on pull request #2340: feature: limit-count use redis cluster

2020-10-12 Thread GitBox


membphis commented on pull request #2340:
URL: https://github.com/apache/apisix/pull/2340#issuecomment-707193555


   When one or more Redis is abnormal, test cases need to be added.



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] membphis opened a new issue #2398: test: add more test cases for plugin `limit-count`

2020-10-12 Thread GitBox


membphis opened a new issue #2398:
URL: https://github.com/apache/apisix/issues/2398


   in PR https://github.com/apache/apisix/pull/2340 
   
   https://github.com/apache/apisix/pull/2340#issuecomment-707193555



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] membphis commented on a change in pull request #2340: feature: limit-count use redis cluster

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2340:
URL: https://github.com/apache/apisix/pull/2340#discussion_r503374436



##
File path: t/plugin/limit-count-redis-cluster.t
##
@@ -0,0 +1,228 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+BEGIN {
+if ($ENV{TEST_NGINX_CHECK_LEAK}) {
+$SkipReason = "unavailable for the hup tests";
+
+} else {
+$ENV{TEST_NGINX_USE_HUP} = 1;
+undef $ENV{TEST_NGINX_USE_STAP};
+}
+}
+
+use t::APISIX 'no_plan';
+
+repeat_each(1);
+no_long_string();
+no_shuffle();
+no_root_location();
+run_tests;

Review comment:
   one blank line before this line





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] membphis commented on a change in pull request #2340: feature: limit-count use redis cluster

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2340:
URL: https://github.com/apache/apisix/pull/2340#discussion_r503374195



##
File path: t/plugin/limit-count-redis-cluster.t
##
@@ -0,0 +1,228 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+BEGIN {

Review comment:
   they were useless I think, we should remove them





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] membphis commented on a change in pull request #2340: feature: limit-count use redis cluster

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2340:
URL: https://github.com/apache/apisix/pull/2340#discussion_r503373211



##
File path: bin/apisix
##
@@ -190,6 +190,7 @@ http {
 lua_shared_dict balancer_ewma10m;
 lua_shared_dict balancer_ewma_locks  10m;
 lua_shared_dict balancer_ewma_last_touched_at 10m;
+lua_shared_dict redis_cluster_slot_locks 100k;

Review comment:
   that is not a good plugin name, we should add a prefix about the plugin 
name





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] membphis commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


membphis commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503370849



##
File path: .github/workflows/api_ci.yml
##
@@ -49,6 +49,16 @@ jobs:
 export GO111MOUDULE=on
 sudo apt install golang-1.14-go
 
+- name: generate json schema
+  working-directory: ./api
+  run: |
+wget https://github.com/apache/apisix/archive/master.zip
+mkdir ./build-tools/apisix/
+unzip master.zip
+sudo mv ./apisix-master/apisix/* ./build-tools/apisix/
+rm -rf ./apisix-master
+cd ./build-tools/ && lua schema-sync.lua > ../conf/schema.json

Review comment:
   I think we need to check if the `conf/schema.json` is the correct





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] membphis commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


membphis commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503369395



##
File path: api/build-tools/schema-sync.lua
##
@@ -0,0 +1,133 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local json = require("json")
+
+-- simulate loading modules to avoid errors that will cause fail to read json 
schema
+local fake_module_list = {
+'cjson',
+'cjson.safe',
+'bit',
+'lfs',
+'ngx.process',
+'ngx.re',
+'net.url',
+'opentracing.tracer',
+'pb',
+'prometheus',
+'protoc',
+
+'resty.cookie',
+'resty.core.regex',
+'resty.hmac',
+'resty.http',
+'resty.ipmatcher',
+'resty.jit-uuid',
+'resty.jwt',
+'resty.kafka.producer',
+'resty.limit.count',
+'resty.limit.conn',
+'resty.limit.req',
+'resty.logger.socket',
+'resty.lock',
+'resty.openidc',
+'resty.random',
+'resty.redis',
+'resty.signal',
+'resty.string',
+
+'apisix.consumer',
+'apisix.core.json',
+'apisix.core.schema',
+'apisix.upstream',
+'apisix.utils.log-util',
+'apisix.utils.batch-processor',
+'apisix.plugins.skywalking.client',
+'apisix.plugins.skywalking.tracer',
+'apisix.plugins.zipkin.codec',
+'apisix.plugins.zipkin.random_sampler',
+'apisix.plugins.zipkin.reporter'
+}
+for _, name in ipairs(fake_module_list) do
+package.loaded[name] = {}
+end
+
+ngx = {}
+ngx.re = {}
+ngx.timer = {}
+ngx.location = {}
+ngx.socket = {}
+ngx.re.gmatch = empty_function

Review comment:
   should define this function first





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] membphis commented on a change in pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#discussion_r503366943



##
File path: apisix/core/utils.lua
##
@@ -194,4 +196,22 @@ function _M.validate_header_value(value)
 end
 
 
+local function sleep(sec)
+if sec <= max_sleep_interval then
+ngx_sleep(sec)
+return
+end
+ngx_sleep(max_sleep_interval)
+if exiting() then
+return
+end
+sec = sec - max_sleep_interval
+sleep(sec)
+end
+
+
+function _M.sleep(sec)

Review comment:
   `_M.sleep = sleep` is enough

##
File path: apisix/core/utils.lua
##
@@ -194,4 +196,22 @@ function _M.validate_header_value(value)
 end
 
 
+local function sleep(sec)
+if sec <= max_sleep_interval then
+ngx_sleep(sec)
+return

Review comment:
   `return ngx_sleep(sec)`
   use proper tail recursion is good here

##
File path: apisix/core/utils.lua
##
@@ -194,4 +196,22 @@ function _M.validate_header_value(value)
 end
 
 
+local function sleep(sec)
+if sec <= max_sleep_interval then
+ngx_sleep(sec)
+return
+end
+ngx_sleep(max_sleep_interval)
+if exiting() then
+return
+end
+sec = sec - max_sleep_interval
+sleep(sec)

Review comment:
   `return sleep(sec)` ditto





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] membphis removed a comment on pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


membphis removed a comment on pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#issuecomment-707181445


   > local function sleep(sec)
   > if sec <= max_sleep_interval then
   > ngx_sleep(sec)
   > return
   > end
   > ngx_sleep(max_sleep_interval)
   > if exiting() then
   > return
   > end
   > sec = sec - max_sleep_interval
   > sleep(sec)
   > end
   
   missing`while true do ... end`, so your current way is wrong @dabue 



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] membphis commented on pull request #2397: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


membphis commented on pull request #2397:
URL: https://github.com/apache/apisix/pull/2397#issuecomment-707181445


   > local function sleep(sec)
   > if sec <= max_sleep_interval then
   > ngx_sleep(sec)
   > return
   > end
   > ngx_sleep(max_sleep_interval)
   > if exiting() then
   > return
   > end
   > sec = sec - max_sleep_interval
   > sleep(sec)
   > end
   
   missing`while true do ... end`, so your current way is wrong @dabue 



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] membphis commented on issue #2170: feature(core): implement `core.sleep`

2020-10-12 Thread GitBox


membphis commented on issue #2170:
URL: https://github.com/apache/apisix/issues/2170#issuecomment-707179118


   it is fine, let us do it ^_^



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] membphis edited a comment on issue #2393: request help: long uri did not work

2020-10-12 Thread GitBox


membphis edited a comment on issue #2393:
URL: https://github.com/apache/apisix/issues/2393#issuecomment-707174657


   the input URI is invalid. the admin API should return `400` for this case.
   
   
![image](https://user-images.githubusercontent.com/6814606/95761451-ea69b000-0cde-11eb-9115-b5ebf75884c7.png)
   



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] membphis commented on issue #2393: request help: long uri did not work

2020-10-12 Thread GitBox


membphis commented on issue #2393:
URL: https://github.com/apache/apisix/issues/2393#issuecomment-707174657


   the input URI is invalid. the admin API should return 400 for this case
   
   
![image](https://user-images.githubusercontent.com/6814606/95761451-ea69b000-0cde-11eb-9115-b5ebf75884c7.png)
   



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] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503313144



##
File path: api/build-tools/schema-sync.lua
##
@@ -0,0 +1,147 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+package.loaded["apisix.core.schema"] = {}

Review comment:
   done.





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] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503303623



##
File path: api/conf/conf.go
##
@@ -54,6 +58,11 @@ func setEnvironment() {
} else {
ENV = env
}
+
+   if env := os.Getenv("APIX_DAG_LIB_PATH"); env != "" {
+   DagLibPath = env

Review comment:
   I think we should do this in a new pr.





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] nic-chen commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


nic-chen commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503302402



##
File path: api/internal/handler/consumer/consumer.go
##
@@ -101,6 +102,10 @@ func (h *Handler) Create(c droplet.Context) (interface{}, 
error) {
}
input.ID = input.Username
 
+   if err := utils.SchemaCheck("main.consumer", input); err != nil {

Review comment:
   done.





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] tokers commented on pull request #2395: improve: refactor apisix command line tool

2020-10-12 Thread GitBox


tokers commented on pull request #2395:
URL: https://github.com/apache/apisix/pull/2395#issuecomment-707083816


   > many thx @tokers for your nice job. that is a big change, need time to 
read it first.
   > 
   > please wait for more time.
   
   OK, great care must be taken for these big changes.



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] juzhiyuan commented on a change in pull request #2339: feature: breaker request by api

2020-10-12 Thread GitBox


juzhiyuan commented on a change in pull request #2339:
URL: https://github.com/apache/apisix/pull/2339#discussion_r503199140



##
File path: t/plugin/api-breaker.t
##
@@ -464,15 +518,15 @@ passed
 
 
 
-=== TEST 17: max_breaker_seconds = 35
+=== TEST 18: add plugin, max_breaker_seconds = 17

Review comment:
   Did upload fail?
   
   
![image](https://user-images.githubusercontent.com/2106987/95736533-f3e02180-0cb8-11eb-8590-de10382805a8.png)
   





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] liuhengloveyou commented on pull request #2340: feature: limit-count use redis cluster

2020-10-12 Thread GitBox


liuhengloveyou commented on pull request #2340:
URL: https://github.com/apache/apisix/pull/2340#issuecomment-707031088


   The limit-count plugin used to support REIDS, the new Redis-Cluster has the 
same functional logic except that redis connections are differently.
   
   Now added new code, in order not to change the old code, copy part of the 
functional logic code. It's not pretty. 
   
   We need to come up with a solution to refactor the old code and reuse the 
common parts. @moonming @membphis 



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] idbeta commented on issue #2393: request help: long uri did not work

2020-10-12 Thread GitBox


idbeta commented on issue #2393:
URL: https://github.com/apache/apisix/issues/2393#issuecomment-707029013


   ping @membphis 



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] idbeta commented on issue #2392: request help: why this route not work

2020-10-12 Thread GitBox


idbeta commented on issue #2392:
URL: https://github.com/apache/apisix/issues/2392#issuecomment-707026660


   ping @membphis 



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] membphis commented on pull request #2395: improve: refactor apisix command line tool

2020-10-12 Thread GitBox


membphis commented on pull request #2395:
URL: https://github.com/apache/apisix/pull/2395#issuecomment-707024027


   many thx @tokers for your nice job. that is a big change, need time to read 
it first. 
   
   please wait for more time.



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] membphis commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

2020-10-12 Thread GitBox


membphis commented on issue #2394:
URL: https://github.com/apache/apisix/issues/2394#issuecomment-707018790


   > @membphis Can you tell me what is the triggering condition of this bug?
   
   The `item.modifiedIndex` maybe updated in here: 
   
   https://github.com/apache/apisix/blob/v1.5/apisix/init.lua#L251
   
   It has changed to `string` object. 
   
   So we need to fetch the original value from `modifiedIndex_org`.
   



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] idbeta commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

2020-10-12 Thread GitBox


idbeta commented on issue #2394:
URL: https://github.com/apache/apisix/issues/2394#issuecomment-707015113


   @membphis Can you tell me what is the triggering condition of this bug?



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] Scorpiofu opened a new issue #553: Dockerfile build failed,operation not permitted, copyfile...

2020-10-12 Thread GitBox


Scorpiofu opened a new issue #553:
URL: https://github.com/apache/apisix-dashboard/issues/553


   modify the base image,from node:12 to node:14.8.0
   



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] membphis commented on a change in pull request #2339: feature: breaker request by api

2020-10-12 Thread GitBox


membphis commented on a change in pull request #2339:
URL: https://github.com/apache/apisix/pull/2339#discussion_r503172641



##
File path: t/plugin/api-breaker.t
##
@@ -464,15 +518,15 @@ passed
 
 
 
-=== TEST 17: max_breaker_seconds = 35
+=== TEST 18: add plugin, max_breaker_seconds = 17

Review comment:
   ![Uploading image.png…]()
   

##
File path: t/plugin/api-breaker.t
##
@@ -384,41 +390,89 @@ passed
 
 
 
-=== TEST 15: max_breaker_seconds = 20
+=== TEST 12: default value
+--- request
+GET /api_breaker?code=500
+--- error_code: 500
+--- no_error_log
+[error]
+
+
+
+=== TEST 13: trigger default value of unhealthy.http_statuses breaker
+--- request eval
+["GET /api_breaker?code=200", "GET /api_breaker?code=500", "GET 
/api_breaker?code=503", "GET /api_breaker?code=500", "GET 
/api_breaker?code=500", "GET /api_breaker?code=500"]
+--- error_code eval
+[200, 500, 503, 500, 500, 502]
+--- no_error_log
+[error]
+
+
+
+=== TEST 14: trigger timeout 2 second
+--- config
+location /sleep1 {
+proxy_pass "http://127.0.0.1:1980/sleep1;;
+}
+--- request eval
+["GET /api_breaker?code=500", "GET /api_breaker?code=500", "GET 
/api_breaker?code=500", "GET /api_breaker?code=200", "GET /sleep1", "GET 
/sleep1", "GET /sleep1", "GET /api_breaker?code=200", "GET 
/api_breaker?code=200", "GET /api_breaker?code=200", "GET 
/api_breaker?code=200","GET /api_breaker?code=200"]
+--- error_code eval
+[500, 500, 500, 502, 200, 200, 200, 200, 200, 200, 200,200]
+--- no_error_log
+[error]
+
+
+
+=== TEST 15: trigger timeout again 4 second
+--- config
+location /sleep1 {

Review comment:
   ditto

##
File path: t/plugin/api-breaker.t
##
@@ -384,41 +390,89 @@ passed
 
 
 
-=== TEST 15: max_breaker_seconds = 20
+=== TEST 12: default value
+--- request
+GET /api_breaker?code=500
+--- error_code: 500
+--- no_error_log
+[error]
+
+
+
+=== TEST 13: trigger default value of unhealthy.http_statuses breaker
+--- request eval
+["GET /api_breaker?code=200", "GET /api_breaker?code=500", "GET 
/api_breaker?code=503", "GET /api_breaker?code=500", "GET 
/api_breaker?code=500", "GET /api_breaker?code=500"]
+--- error_code eval
+[200, 500, 503, 500, 500, 502]
+--- no_error_log
+[error]
+
+
+
+=== TEST 14: trigger timeout 2 second
+--- config
+location /sleep1 {

Review comment:
   do we really need it? please confirm!
   
   You are writing test cases, if the case is incorrect, it means your work is 
meaningless.





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] membphis commented on issue #2394: bug:prometheus metrics 500 Internal Server Error

2020-10-12 Thread GitBox


membphis commented on issue #2394:
URL: https://github.com/apache/apisix/issues/2394#issuecomment-707008901


   this bug should have been fixed in `master` branch, you can make a try with 
the latest version.
   
   
https://github.com/apache/apisix/blob/master/apisix/plugins/prometheus/exporter.lua#L197



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] membphis commented on a change in pull request #551: feature: sync json schema from APISIX and check schema when create or update resource

2020-10-12 Thread GitBox


membphis commented on a change in pull request #551:
URL: https://github.com/apache/apisix-dashboard/pull/551#discussion_r503160439



##
File path: api/build-tools/schema-sync.lua
##
@@ -0,0 +1,147 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+package.loaded["apisix.core.schema"] = {}

Review comment:
   we need some comment here for why we set `package.loaded`.
   
   and we can use a `for .. do` for this process which is simpler.
   
   eg:
   
   ```lua
   local fake_module_list = {
   'cjson', 
   'cjson',
   -- ...
   }
   for _, name in ipairs(fake_module_list) do
   package.loaded[name] = {}
   end
   ```





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] idbeta edited a comment on pull request #2368: WIP: add uri fuzzing test

2020-10-12 Thread GitBox


idbeta edited a comment on pull request #2368:
URL: https://github.com/apache/apisix/pull/2368#issuecomment-706501275


   > @idbeta code style: 
https://github.com/apache/apisix/pull/2368/checks?check_run_id=1234621149#step:6:124
   > 
   > You need to write a summary first. Why we need this PR?
   
   ok, I added a summary, please take a look at it



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




  1   2   >