Skip to content

Commit 7d51fd5

Browse files
authored
Merge branch 'master' into fix/fix_upstream_bug
2 parents 2b3d002 + 74954fa commit 7d51fd5

File tree

5 files changed

+21
-27
lines changed

5 files changed

+21
-27
lines changed

db/init/ob/schema.sql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,6 @@ INSERT INTO `plugin_handle` VALUES ('1722804548510507035', '50', 'apiKey', 'apiK
14001400
INSERT INTO `plugin_handle` VALUES ('1722804548510507037', '50', 'temperature', 'temperature', 2, 3, 5, '{\"required\":\"0\",\"rule\":\"\", \"placeholder\":\"optional,0,0.01~1\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14011401
INSERT INTO `plugin_handle` VALUES ('1722804548510507038', '50', 'maxTokens', 'maxTokens', 2, 3, 6, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14021402
INSERT INTO `plugin_handle` VALUES ('1722804548510507039', '50', 'stream', 'stream', 3, 3, 7, '{\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1403-
INSERT INTO `plugin_handle` VALUES ('1899802529972371600', '50', 'proxyEnabled', 'proxyEnabled', 2, 3, 8, '{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14041403
INSERT INTO `plugin_handle` VALUES ('1722804548510507040', '50', 'prompt', 'prompt', 2, 3, 9, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14051404

14061405
INSERT INTO `plugin_handle` VALUES ('1722804548510507041', '50', 'provider', 'provider', 3, 1, 0, '{\"required\":\"0\",\"defaultValue\":\"OpenAI\",\"placeholder\":\"provider\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
@@ -1410,23 +1409,15 @@ INSERT INTO `plugin_handle` VALUES ('1722804548510507044', '50', 'apiKey', 'apiK
14101409
INSERT INTO `plugin_handle` VALUES ('1722804548510507045', '50', 'temperature', 'temperature', 2, 1, 4, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14111410
INSERT INTO `plugin_handle` VALUES ('1722804548510507046', '50', 'maxTokens', 'maxTokens', 2, 1, 5, '{\"required\":\"0\",\"rule\":\"\", \"placeholder\":\"optional,0,0.01~1\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14121411
INSERT INTO `plugin_handle` VALUES ('1722804548510507047', '50', 'stream', 'stream', 3, 1, 6, '{\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1413-
INSERT INTO `plugin_handle` VALUES ('1899802529972371600', '50', 'proxyEnabled', 'proxyEnabled', 2, 1, 7, '{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14141412
INSERT INTO `plugin_handle` VALUES ('1722804548510507048', '50', 'prompt', 'prompt', 2, 1, 8, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1413+
INSERT INTO `plugin_handle` VALUES ('1899802529972371600', '50', 'proxyEnabled', 'proxyEnabled', 2, 1, 7, '{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14151414
INSERT INTO `plugin_handle` VALUES ('1899802529972371601', '50', 'fallbackEnabled', 'fallbackEnabled', 2, 1, 9, '{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14161415
INSERT INTO `plugin_handle` VALUES ('1899802529972371602', '50', 'fallbackProvider', 'fallbackProvider', 2, 1, 10, '{\"required\":\"0\",\"placeholder\":\"OPENAI\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14171416
INSERT INTO `plugin_handle` VALUES ('1899802529972371603', '50', 'fallbackBaseUrl', 'fallbackBaseUrl', 2, 1, 11, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14181417
INSERT INTO `plugin_handle` VALUES ('1899802529972371604', '50', 'fallbackApiKey', 'fallbackApiKey', 2, 1, 12, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14191418
INSERT INTO `plugin_handle` VALUES ('1899802529972371605', '50', 'fallbackModel', 'fallbackModel', 2, 1, 13, '{\"required\":\"0\",\"placeholder\":\"gpt-4.1\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14201419
INSERT INTO `plugin_handle` VALUES ('1899802529972371606', '50', 'fallbackTemperature', 'fallbackTemperature', 1, 1, 14, '{\"required\":\"0\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
14211420
INSERT INTO `plugin_handle` VALUES ('1899802529972371607', '50', 'fallbackMaxTokens', 'fallbackMaxTokens', 1, 1, 15, '{\"required\":\"0\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1422-
INSERT INTO `plugin_handle` VALUES ('1899802529972371601', '50', 'fallbackEnabled', 'fallbackEnabled', 2, 1, 9, '{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1423-
INSERT INTO `plugin_handle` VALUES ('1899802529972371602', '50', 'fallbackProvider', 'fallbackProvider', 2, 1, 10, '{\"required\":\"0\",\"placeholder\":\"OPENAI\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1424-
INSERT INTO `plugin_handle` VALUES ('1899802529972371603', '50', 'fallbackBaseUrl', 'fallbackBaseUrl', 2, 1, 11, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1425-
INSERT INTO `plugin_handle` VALUES ('1899802529972371604', '50', 'fallbackApiKey', 'fallbackApiKey', 2, 1, 12, '{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1426-
INSERT INTO `plugin_handle` VALUES ('1899802529972371605', '50', 'fallbackModel', 'fallbackModel', 2, 1, 13, '{\"required\":\"0\",\"placeholder\":\"gpt-4.1\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1427-
INSERT INTO `plugin_handle` VALUES ('1899802529972371606', '50', 'fallbackTemperature', 'fallbackTemperature', 1, 1, 14, '{\"required\":\"0\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1428-
INSERT INTO `plugin_handle` VALUES ('1899802529972371607', '50', 'fallbackMaxTokens', 'fallbackMaxTokens', 1, 1, 15, '{\"required\":\"0\"}', '2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
1429-
14301421

14311422
INSERT INTO `plugin_handle` VALUES ('1722804548510507049', '51', 'database', 'database', 1, 3, 2, '{\"required\":\"0\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2022-05-25 18:02:53', '2022-05-25 18:02:53');
14321423
INSERT INTO `plugin_handle` VALUES ('1722804548510507050', '51', 'master', 'master', 2, 3, 3, '{\"required\":\"0\",\"rule\":\"\"}', '2022-05-25 18:02:53', '2022-05-25 18:02:53');

db/init/og/create-table.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ COMMENT ON COLUMN "public"."field"."model_id" IS 'this field belongs to which mo
264264
COMMENT ON COLUMN "public"."field"."self_model_id" IS 'which model of this field is';
265265
COMMENT ON COLUMN "public"."field"."name" IS 'field name';
266266
COMMENT ON COLUMN "public"."field"."field_desc" IS 'field description';
267-
COMMENT ON COLUMN "public"."field"."required" IS 'whether to require (0 not required, 1 required)';
267+
COMMENT ON COLUMN "public"."field"."is_required" IS 'whether to require (0 not required, 1 required)';
268268
COMMENT ON COLUMN "public"."field"."ext" IS 'extended fields,can store genericTypes,eg..{"genericTypes":[model_id1,model_id2]}';
269269
COMMENT ON COLUMN "public"."field"."date_created" IS 'create time';
270270
COMMENT ON COLUMN "public"."field"."date_updated" IS 'update time';
@@ -444,7 +444,7 @@ COMMENT ON COLUMN "public"."param"."model_id" IS 'the model id, empty if not a m
444444
COMMENT ON COLUMN "public"."param"."type" IS '0-requestPathVariable,1-requestUrlParam,2-requestHeader,3-requestBody,4-responseHeader,5-responseBody';
445445
COMMENT ON COLUMN "public"."param"."name" IS 'the param name';
446446
COMMENT ON COLUMN "public"."param"."param_desc" IS 'the param description';
447-
COMMENT ON COLUMN "public"."param"."required" IS 'whether to require (0 not required, 1 required)';
447+
COMMENT ON COLUMN "public"."param"."is_required" IS 'whether to require (0 not required, 1 required)';
448448
COMMENT ON COLUMN "public"."param"."ext" IS 'extended fields';
449449
COMMENT ON COLUMN "public"."param"."date_created" IS 'create time';
450450
COMMENT ON COLUMN "public"."param"."date_updated" IS 'update time';
@@ -2449,10 +2449,10 @@ CREATE TABLE "public"."discovery" (
24492449
)
24502450
;
24512451
COMMENT ON COLUMN "public"."discovery"."id" IS 'primary key id';
2452-
COMMENT ON COLUMN "public"."discovery"."name" IS 'the discovery name';
2452+
COMMENT ON COLUMN "public"."discovery"."discovery_name" IS 'the discovery name';
24532453
COMMENT ON COLUMN "public"."discovery"."discovery_level" IS '0 selector,1 plugin 2 global';
24542454
COMMENT ON COLUMN "public"."discovery"."plugin_name" IS 'the plugin name';
2455-
COMMENT ON COLUMN "public"."discovery"."type" IS 'local,zookeeper,etcd,consul,nacos';
2455+
COMMENT ON COLUMN "public"."discovery"."discovery_type" IS 'local,zookeeper,etcd,consul,nacos';
24562456
COMMENT ON COLUMN "public"."discovery"."server_list" IS 'register server url (,)';
24572457
COMMENT ON COLUMN "public"."discovery"."props" IS 'the discovery pops (json) ';
24582458
COMMENT ON COLUMN "public"."discovery"."namespace_id" IS 'namespace id';

db/init/oracle/schema.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ comment on column PARAM.name
710710
is 'the param name';
711711
comment on column PARAM.param_desc
712712
is 'the param description';
713-
comment on column PARAM.required
713+
comment on column PARAM.is_required
714714
is 'whether to require (0 not required, 1 required)';
715715
comment on column PARAM.ext
716716
is 'extended fields';
@@ -881,7 +881,7 @@ comment on column FIELD.name
881881
is 'field name';
882882
comment on column FIELD.field_desc
883883
is 'field description';
884-
comment on column FIELD.required
884+
comment on column FIELD.is_required
885885
is 'whether to require (0 not required, 1 required)';
886886
comment on column FIELD.ext
887887
is 'extended fields,can store genericTypes,eg..{"genericTypes":[model_id1,model_id2]}';
@@ -2649,15 +2649,15 @@ create table discovery
26492649
-- Add comments to the columns
26502650
comment on column DISCOVERY.id
26512651
is 'primary key id';
2652-
comment on column DISCOVERY.name
2652+
comment on column DISCOVERY.discovery_name
26532653
is 'the discovery name';
26542654
comment on column DISCOVERY.discovery_level
26552655
is '0 selector,1 plugin 2 global';
26562656
comment on column DISCOVERY.plugin_name
26572657
is 'the plugin name';
26582658
comment on column DISCOVERY.namespace_id
26592659
is 'namespace id';
2660-
comment on column DISCOVERY.type
2660+
comment on column DISCOVERY.discovery_type
26612661
is 'local,zookeeper,etcd,consul,nacos';
26622662
comment on column DISCOVERY.server_list
26632663
is 'register server url (,)';
@@ -3221,15 +3221,15 @@ VALUES ('1844026099075534857', '1844026099075534849', 'SHENYU.BUTTON.PLUGIN.RULE
32213221
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32223222
VALUES ('1844026099075534858', '1844026099075534849', 'SHENYU.BUTTON.PLUGIN.SYNCHRONIZE', '', '', '', 2, 0, '', 1, 0, 'plugin:aiProxy:modify', 1);
32233223

3224-
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO resource (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
3224+
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32253225
VALUES ('1844026099075534900', '1844026099075534849', 'SHENYU.BUTTON.AI.PROXY.APIKEY.ADD', '', '', '', 2, 0, '', 1, 0, 'system:aiProxyApiKey:add', 1);
3226-
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO resource (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
3226+
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32273227
VALUES ('1844026099075534901', '1844026099075534849', 'SHENYU.BUTTON.AI.PROXY.APIKEY.LIST', '', '', '', 2, 1, '', 1, 0, 'system:aiProxyApiKey:list', 1);
3228-
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO resource (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
3228+
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32293229
VALUES ('1844026099075534902', '1844026099075534849', 'SHENYU.BUTTON.AI.PROXY.APIKEY.EDIT', '', '', '', 2, 2, '', 1, 0, 'system:aiProxyApiKey:edit', 1);
3230-
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO resource (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
3230+
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32313231
VALUES ('1844026099075534903', '1844026099075534849', 'SHENYU.BUTTON.AI.PROXY.APIKEY.DELETE', '', '', '', 2, 3, '', 1, 0, 'system:aiProxyApiKey:delete', 1);
3232-
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO resource (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
3232+
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(resource(id)) */ INTO "resource" (id, parent_id, title, name, url, component, resource_type, sort, icon, is_leaf, is_route, perms, status)
32333233
VALUES ('1844026099075534904', '1844026099075534849', 'SHENYU.BUTTON.AI.PROXY.APIKEY.DISABLE', '', '', '', 2, 4, '', 1, 0, 'system:aiProxyApiKey:disable', 1);
32343234

32353235
INSERT /*+ IGNORE_ROW_ON_DUPKEY_INDEX(permission(id)) */ INTO permission (id, object_id, resource_id)

db/init/pg/create-table.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ COMMENT ON COLUMN "public"."field"."model_id" IS 'this field belongs to which mo
261261
COMMENT ON COLUMN "public"."field"."self_model_id" IS 'which model of this field is';
262262
COMMENT ON COLUMN "public"."field"."name" IS 'field name';
263263
COMMENT ON COLUMN "public"."field"."field_desc" IS 'field description';
264-
COMMENT ON COLUMN "public"."field"."required" IS 'whether to require (0 not required, 1 required)';
264+
COMMENT ON COLUMN "public"."field"."is_required" IS 'whether to require (0 not required, 1 required)';
265265
COMMENT ON COLUMN "public"."field"."ext" IS 'extended fields,can store genericTypes,eg..{"genericTypes":[model_id1,model_id2]}';
266266
COMMENT ON COLUMN "public"."field"."date_created" IS 'create time';
267267
COMMENT ON COLUMN "public"."field"."date_updated" IS 'update time';
@@ -441,7 +441,7 @@ COMMENT ON COLUMN "public"."param"."model_id" IS 'the model id, empty if not a m
441441
COMMENT ON COLUMN "public"."param"."type" IS '0-requestPathVariable,1-requestUrlParam,2-requestHeader,3-requestBody,4-responseHeader,5-responseBody';
442442
COMMENT ON COLUMN "public"."param"."name" IS 'the param name';
443443
COMMENT ON COLUMN "public"."param"."param_desc" IS 'the param description';
444-
COMMENT ON COLUMN "public"."param"."required" IS 'whether to require (0 not required, 1 required)';
444+
COMMENT ON COLUMN "public"."param"."is_required" IS 'whether to require (0 not required, 1 required)';
445445
COMMENT ON COLUMN "public"."param"."ext" IS 'extended fields';
446446
COMMENT ON COLUMN "public"."param"."date_created" IS 'create time';
447447
COMMENT ON COLUMN "public"."param"."date_updated" IS 'update time';
@@ -2572,11 +2572,11 @@ CREATE TABLE "public"."discovery" (
25722572
)
25732573
;
25742574
COMMENT ON COLUMN "public"."discovery"."id" IS 'primary key id';
2575-
COMMENT ON COLUMN "public"."discovery"."name" IS 'the discovery name';
2575+
COMMENT ON COLUMN "public"."discovery"."discovery_name" IS 'the discovery name';
25762576
COMMENT ON COLUMN "public"."discovery"."discovery_level" IS '0 selector,1 plugin 2 global';
25772577
COMMENT ON COLUMN "public"."discovery"."plugin_name" IS 'the plugin name';
25782578
COMMENT ON COLUMN "public"."discovery"."namespace_id" IS 'the namespace id';
2579-
COMMENT ON COLUMN "public"."discovery"."type" IS 'local,zookeeper,etcd,consul,nacos';
2579+
COMMENT ON COLUMN "public"."discovery"."discovery_type" IS 'local,zookeeper,etcd,consul,nacos';
25802580
COMMENT ON COLUMN "public"."discovery"."server_list" IS 'register server url (,)';
25812581
COMMENT ON COLUMN "public"."discovery"."props" IS 'the discovery pops (json) ';
25822582
COMMENT ON COLUMN "public"."discovery"."date_created" IS 'create time';

shenyu-infra/shenyu-infra-etcd/src/test/java/org/apache/shenyu/infra/etcd/client/EtcdClientTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949

5050
import org.junit.jupiter.api.extension.ExtendWith;
5151
import org.mockito.junit.jupiter.MockitoExtension;
52+
import org.mockito.junit.jupiter.MockitoSettings;
53+
import org.mockito.quality.Strictness;
5254

55+
@MockitoSettings(strictness = Strictness.LENIENT)
5356
@ExtendWith(MockitoExtension.class)
5457
public class EtcdClientTest {
5558

0 commit comments

Comments
 (0)