nic-chen commented on a change in pull request #2117: URL: https://github.com/apache/apisix-dashboard/pull/2117#discussion_r701518277
##########
File path: .github/workflows/backend-cli-test.yml
##########
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- etcd: [3.4.13]
+ etcd: [3.4.14]
Review comment:
we could update to 3.4.16
##########
File path: api/conf/schema.json
##########
@@ -2601,37 +2720,10 @@
},
"version": 0.1
},
- "dubbo-proxy": {
- "priority": 507,
- "schema": {
- "$comment": "this is a mark for our injected
plugin schema",
- "properties": {
- "disable": {
- "type": "boolean"
- },
- "method": {
- "minLength": 1,
- "type": "string"
- },
- "service_name": {
- "minLength": 1,
- "type": "string"
- },
- "service_version": {
- "pattern":
"^\\d+\\.\\d+\\.\\d+",
- "type": "string"
- }
- },
- "required": ["service_name", "service_version"],
- "type": "object"
- },
- "version": 0.1
- },
Review comment:
we should keep it.
##########
File path: api/conf/schema.json
##########
@@ -2666,87 +2758,8 @@
},
"version": 0.1
},
- "error-log-logger": {
- "metadata_schema": {
- "properties": {
- "batch_max_size": {
- "default": 1000,
- "minimum": 0,
- "type": "integer"
- },
- "buffer_duration": {
- "default": 60,
- "minimum": 1,
- "type": "integer"
- },
- "host": {
- "pattern":
"^\\*?[0-9a-zA-Z-._]+$",
- "type": "string"
- },
- "inactive_timeout": {
- "default": 3,
- "minimum": 1,
- "type": "integer"
- },
- "keepalive": {
- "default": 30,
- "minimum": 1,
- "type": "integer"
- },
- "level": {
- "default": "WARN",
- "enum": ["ALERT", "CRIT",
"DEBUG", "EMERG", "ERR", "ERROR", "INFO", "NOTICE", "STDERR", "WARN"],
- "type": "string"
- },
- "max_retry_count": {
- "default": 0,
- "minimum": 0,
- "type": "integer"
- },
- "name": {
- "default": "error-log-logger",
- "type": "string"
- },
- "port": {
- "minimum": 0,
- "type": "integer"
- },
- "retry_delay": {
- "default": 1,
- "minimum": 0,
- "type": "integer"
- },
- "timeout": {
- "default": 3,
- "minimum": 1,
- "type": "integer"
- },
- "tls": {
- "default": false,
- "type": "boolean"
- },
- "tls_server_name": {
- "type": "string"
- }
- },
- "required": ["host", "port"],
- "type": "object"
- },
- "priority": 1091,
- "schema": {
- "$comment": "this is a mark for our injected
plugin schema",
- "properties": {
- "disable": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "version": 0.1
- },
Review comment:
ditto
##########
File path: api/test/e2enew/upstream/upstream_retry.go
##########
@@ -0,0 +1,63 @@
+/*
+ * 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 upstream
+
+import (
+ "encoding/json"
+ "net/http"
+
+ "github.com/onsi/ginkgo"
+ "github.com/onsi/gomega"
+
+ "github.com/apisix/manager-api/test/e2enew/base"
+)
+
+// just test for schema check
+var _ = ginkgo.Describe("Upstream keepalive pool", func() {
+ ginkgo.It("create upstream with keepalive pool", func() {
+ createUpstreamBody := make(map[string]interface{})
+ createUpstreamBody["nodes"] = []map[string]interface{}{
+ {
+ "host": base.UpstreamIp,
+ "port": 1980,
+ "weight": 1,
+ },
+ }
+ createUpstreamBody["type"] = "roundrobin"
+ createUpstreamBody["retries"] = 5
+ createUpstreamBody["retry_timeout"] = 5.5
+ _createUpstreamBody, err := json.Marshal(createUpstreamBody)
+ gomega.Expect(err).To(gomega.BeNil())
+ base.RunTestCase(base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodPut,
+ Path: "/apisix/admin/upstreams/retry",
+ Body: string(_createUpstreamBody),
+ Headers: map[string]string{"Authorization":
base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ })
+ })
+ ginkgo.It("delete upstream", func() {
+ base.RunTestCase(base.HttpTestCase{
+ Object: base.ManagerApiExpect(),
+ Method: http.MethodDelete,
+ Path: "/apisix/admin/upstreams/retry",
+ Headers: map[string]string{"Authorization":
base.GetToken()},
+ ExpectStatus: http.StatusOK,
+ })
+ })
+})
Review comment:
Need dp test, please refer to APISIX related test
##########
File path: api/conf/schema.json
##########
@@ -3526,27 +3625,17 @@
"maximum": 599,
"minimum": 200,
"type": "integer"
+ },
+ "rejected_msg": {
+ "minLength": 1,
+ "type": "string"
}
},
"required": ["burst", "key", "rate"],
"type": "object"
},
"version": 0.1
},
- "log-rotate": {
- "priority": 100,
- "schema": {
- "$comment": "this is a mark for our injected
plugin schema",
- "additionalProperties": false,
- "properties": {
- "disable": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "version": 0.1
- },
Review comment:
ditto
##########
File path: api/conf/schema.json
##########
@@ -3586,20 +3675,6 @@
},
"version": 0.1
},
- "node-status": {
- "priority": 1000,
- "schema": {
- "$comment": "this is a mark for our injected
plugin schema",
- "additionalProperties": false,
- "properties": {
- "disable": {
- "type": "boolean"
- }
- },
- "type": "object"
- },
- "version": 0.1
- },
Review comment:
ditto
##########
File path: api/conf/schema.json
##########
@@ -4076,49 +4192,6 @@
},
"version": 0.1
},
- "skywalking": {
- "metadata_schema": {
- "additionalProperties": false,
- "properties": {
- "endpoint_addr": {
- "default":
"http://127.0.0.1:12800",
- "type": "string"
- },
- "report_interval": {
- "type": "integer"
- },
- "service_instance_name": {
- "default": "APISIX Instance
Name",
- "description": "User Service
Instance Name",
- "type": "string"
- },
- "service_name": {
- "default": "APISIX",
- "description": "service name
for skywalking",
- "type": "string"
- }
- },
- "type": "object"
- },
- "priority": -1100,
- "schema": {
- "$comment": "this is a mark for our injected
plugin schema",
- "additionalProperties": false,
- "properties": {
- "disable": {
- "type": "boolean"
- },
- "sample_ratio": {
- "default": 1,
- "maximum": 1,
- "minimum": 0.00001,
- "type": "number"
- }
- },
- "type": "object"
- },
- "version": 0.1
- },
Review comment:
ditto
##########
File path: .github/workflows/go-lint.yml
##########
@@ -12,44 +12,8 @@ on:
- 'api/**'
jobs:
- go-filter:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- submodule: true
-
- - uses: ./.github/actions/paths-filter
- id: changes
- with:
- filters: |
- go:
- - '**.go'
- working-directory: 'api'
- list-files: shell
- outputs:
- matches: ${{ steps.changes.outputs.go }}
- files: ${{ steps.changes.outputs.go_files }}
-
- golangci:
- runs-on: ubuntu-latest
- needs: go-filter
- if: needs.go-filter.outputs.matches == 'true'
- steps:
- - uses: actions/checkout@v2
-
- - name: golangci-lint
- uses: golangci/golangci-lint-action@v2
- with:
- version: latest
- working-directory: api
- args: --tests=false
- only-new-issues: true
-
Review comment:
why remove these?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
