Copilot commented on code in PR #6309:
URL: https://github.com/apache/shenyu/pull/6309#discussion_r3006291005


##########
db/init/mysql/schema.sql:
##########
@@ -1285,7 +1267,6 @@ INSERT INTO `plugin_handle` VALUES 
('1529402613204172930', '36', 'maxBatchSize',
 INSERT INTO `plugin_handle` VALUES ('1529402613204172931', '36', 
'maxBatchCount', 'maxBatchCount', 1, 3, 10, 
'{\"required\":\"0\",\"defaultValue\":4096}', '2022-06-30 21:00:00', 
'2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172932', '36', 'lingerMs', 
'lingerMs', 1, 3, 11, '{\"required\":\"0\",\"defaultValue\":2000}', '2022-06-30 
21:00:00', '2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172933', '36', 'retries', 
'retries', 1, 3, 12, '{\"required\":\"0\",\"defaultValue\":10}', '2022-06-30 
21:00:00', '2022-06-30 21:00:00');
-INSERT INTO `plugin_handle` VALUES ('1529402613204172934', '36', 
'maxReservedAttempts', 'maxReservedAttempts', 1, 3, 13, 
'{\"required\":\"0\",\"defaultValue\":11}', '2022-06-30 21:00:00', '2022-06-30 
21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172935', '36', 
'baseRetryBackoffMs', 'baseRetryBackoffMs', 1, 3, 14, 
'{\"required\":\"0\",\"defaultValue\":100}', '2022-06-30 21:00:00', '2022-06-30 
21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172936', '36', 
'maxRetryBackoffMs', 'maxRetryBackoffMs', 1, 3, 15, 
'{\"required\":\"0\",\"defaultValue\":50000}', '2022-06-30 21:00:00', 
'2022-06-30 21:00:00');

Review Comment:
   In MySQL init seed data for plugin_id=36 (Tencent CLS logging), the 
`maxReservedAttempts` plugin_handle row is missing between `retries` and 
`baseRetryBackoffMs`. This field is still part of the plugin config model, so 
MySQL installs will have incomplete handle metadata. Please add the missing row 
back.



##########
shenyu-admin/src/main/resources/sql-script/h2/schema.sql:
##########
@@ -857,7 +839,6 @@ INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172925', '36', 'maxBatchCount', 'maxBatchCount', 1, 3, 10, 
'{"required":"0","defaultValue":4096}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172922', '36', 'lingerMs', 'lingerMs', 1, 3, 11, 
'{"required":"0","defaultValue":2000}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172926', '36', 'retries', 'retries', 1, 3, 12, 
'{"required":"0","defaultValue":10}');
-INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172927', '36', 'maxReservedAttempts', 'maxReservedAttempts', 1, 
3, 13, '{"required":"0","defaultValue":11}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172929', '36', 'baseRetryBackoffMs', 'baseRetryBackoffMs', 1, 3, 
14, '{"required":"0","defaultValue":100}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172930', '36', 'maxRetryBackoffMs', 'maxRetryBackoffMs', 1, 3, 
15, '{"required":"0","defaultValue":50000}');

Review Comment:
   The H2 seed data for plugin_handle under plugin_id=36 is missing 
`maxReservedAttempts` (it goes from `retries` to `baseRetryBackoffMs`). This 
field is part of the Tencent CLS logging config and still exists in other DB 
init scripts, so H2 users will have an incomplete plugin handle definition. 
Please add back the `maxReservedAttempts` row.



##########
shenyu-admin/src/main/resources/sql-script/h2/schema.sql:
##########
@@ -1019,7 +999,6 @@ INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1899802529972371603', '50', 'fallbackBaseUrl', 'fallbackBaseUrl', 2, 1, 10, 
'{"required":"0","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1899802529972371604', '50', 'fallbackApiKey', 'fallbackApiKey', 2, 1, 11, 
'{"required":"0","rule":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1899802529972371605', '50', 'fallbackModel', 'fallbackModel', 2, 1, 12, 
'{"required":"0","placeholder":"gpt-4.1","rule":""}');

Review Comment:
   The H2 seed data for the AI proxy plugin handles is missing 
`fallbackTemperature` (there is `fallbackModel` and then `fallbackMaxTokens` 
with a gap in sort/order). `fallbackTemperature` is used in `AiProxyHandle` and 
exists in other DB init scripts, so H2 setup will be inconsistent. Please 
restore the `fallbackTemperature` plugin_handle row.
   ```suggestion
   INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1899802529972371605', '50', 'fallbackModel', 'fallbackModel', 2, 1, 12, 
'{"required":"0","placeholder":"gpt-4.1","rule":""}');
   INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1899802529972371606', '50', 'fallbackTemperature', 'fallbackTemperature', 1, 
1, 13, '{"required":"0"}');
   ```



##########
shenyu-admin/src/main/resources/sql-script/h2/schema.sql:
##########
@@ -838,7 +821,6 @@ INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172906', '34', 'sampleRate', 'sampleRate', 2, 3, 10, 
'{"required":"0","defaultValue":"1","placeholder":"optional,0,0.01~1"}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172907', '34', 'maxRequestBody', 'maxRequestBody', 1, 3, 11, 
'{"required":"0","defaultValue":524288,"placeholder":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172908', '34', 'maxResponseBody', 'maxResponseBody', 1, 3, 12, 
'{"required":"0","defaultValue":524288,"placeholder":""}');
-INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172909', '34', 'bufferQueueSize', 'bufferQueueSize', 1, 3, 13, 
'{"required":"0","defaultValue":50000,"placeholder":""}');
 INSERT IGNORE INTO plugin_handle (`id`, 
`plugin_id`,`field`,`label`,`data_type`,`type`,`sort`,`ext_obj`) VALUES 
('1529402613204172910', '35', 'topic', 'topic', 2, 3, 1, 
'{"required":"1","defaultValue":"shenyu-access-logging"}');

Review Comment:
   The H2 seed data for plugin_handle appears to have dropped the 
`bufferQueueSize` entry for plugin_id=34 (it jumps from `maxResponseBody` 
straight to plugin_id=35). `bufferQueueSize` is still referenced by logging 
global config and is present in other DB init scripts (e.g., Oracle), so H2 
init will be inconsistent and the dashboard may miss this field. Please restore 
the `bufferQueueSize` plugin_handle row (and keep the Tars removals scoped to 
plugin_id=13).



##########
db/init/mysql/schema.sql:
##########
@@ -1266,7 +1249,6 @@ INSERT INTO `plugin_handle` VALUES 
('1529402613204172911', '34', 'ioThreadCount'
 INSERT INTO `plugin_handle` VALUES ('1529402613204172912', '34', 'sampleRate', 
'sampleRate', 2, 3, 10, 
'{\"required\":\"0\",\"defaultValue\":\"1\",\"placeholder\":\"optional,0,0.01~1\"}',
 '2022-06-30 21:00:00', '2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172913', '34', 
'maxRequestBody', 'maxRequestBody', 1, 3, 11, 
'{\"required\":\"0\",\"defaultValue\":524288}', '2022-06-30 21:00:00', 
'2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172914', '34', 
'maxResponseBody', 'maxResponseBody', 1, 3, 12, 
'{\"required\":\"0\",\"defaultValue\":524288}', '2022-06-30 21:00:00', 
'2022-06-30 21:00:00');
-INSERT INTO `plugin_handle` VALUES ('1529402613204172915', '34', 
'bufferQueueSize', 'bufferQueueSize', 1, 3, 13, 
'{\"required\":\"0\",\"defaultValue\":50000}', '2022-06-30 21:00:00', 
'2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172916', '35', 'topic', 
'topic', 2, 3, 1, 
'{\"required\":\"1\",\"defaultValue\":\"shenyu-access-logging\"}', '2022-06-30 
21:00:00', '2022-06-30 21:00:00');
 INSERT INTO `plugin_handle` VALUES ('1529402613204172917', '35', 'serviceUrl', 
'serviceUrl', 2, 3, 2, 
'{\"required":"1",\"defaultValue\":\"pulsar://localhost:6650\"}', '2022-06-30 
21:00:00', '2022-06-30 21:00:00');

Review Comment:
   In MySQL init seed data, plugin_handle for plugin_id=34 (logging SLS/ES/etc 
global config) is missing the `bufferQueueSize` row: it goes from 
`maxResponseBody` directly to the next plugin. `bufferQueueSize` is still 
referenced in code and present in other DB init scripts, so this likely breaks 
default configuration/UI for MySQL installs. Please restore that plugin_handle 
row and keep Tars removals limited to plugin_id=13.



##########
db/init/mysql/schema.sql:
##########
@@ -1446,7 +1394,6 @@ INSERT INTO `plugin_handle` VALUES 
('1899802529972371602', '50', 'fallbackProvid
 INSERT INTO `plugin_handle` VALUES ('1899802529972371603', '50', 
'fallbackBaseUrl', 'fallbackBaseUrl', 2, 1, 10, 
'{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 
17:20:50.233');
 INSERT INTO `plugin_handle` VALUES ('1899802529972371604', '50', 
'fallbackApiKey', 'fallbackApiKey', 2, 1, 11, 
'{\"required\":\"0\",\"rule\":\"\"}', '2024-01-02 17:20:50.233', '2024-01-02 
17:20:50.233');
 INSERT INTO `plugin_handle` VALUES ('1899802529972371605', '50', 
'fallbackModel', 'fallbackModel', 2, 1, 12, 
'{\"required\":\"0\",\"placeholder\":\"gpt-4.1\",\"rule\":\"\"}', '2024-01-02 
17:20:50.233', '2024-01-02 17:20:50.233');

Review Comment:
   In MySQL init seed data for the AI proxy plugin handles (plugin_id=50), the 
`fallbackTemperature` row is missing (there is `fallbackModel` and then 
`fallbackMaxTokens`). This field is used by `AiProxyHandle`, so MySQL installs 
will be missing a configurable handle. Please restore the `fallbackTemperature` 
plugin_handle row.
   ```suggestion
   INSERT INTO `plugin_handle` VALUES ('1899802529972371605', '50', 
'fallbackModel', 'fallbackModel', 2, 1, 12, 
'{\"required\":\"0\",\"placeholder\":\"gpt-4.1\",\"rule\":\"\"}', '2024-01-02 
17:20:50.233', '2024-01-02 17:20:50.233');
   INSERT INTO `plugin_handle` VALUES ('1899802529972371606', '50', 
'fallbackTemperature', 'fallbackTemperature', 1, 1, 13, '{\"required\":\"0\"}', 
'2024-01-02 17:20:50.233', '2024-01-02 17:20:50.233');
   ```



##########
db/init/mysql/schema.sql:
##########
@@ -1336,17 +1317,14 @@ INSERT INTO `plugin_handle` VALUES 
('1676473313352380416', '43', 'logGroupId', '
 INSERT INTO `plugin_handle` VALUES ('1676473453001732096', '43', 
'logStreamId', 'logStreamId', 2, 3, 2, '{\"required\":\"1\",\"rule\":\"\"}', 
'2023-07-05 14:09:53.224', '2023-07-07 22:50:00.607');
 INSERT INTO `plugin_handle` VALUES ('1676473657121730560', '43', 
'accessKeyId', 'AccessKey', 2, 3, 4, '{\"required\":\"1\",\"rule\":\"\"}', 
'2023-07-05 14:10:41.897', '2023-07-07 22:50:00.608');
 INSERT INTO `plugin_handle` VALUES ('1676474055324758016', '43', 
'accessKeySecret', 'accessKey', 2, 3, 5, '{\"required\":\"1\",\"rule\":\"\"}', 
'2023-07-05 14:12:16.828', '2023-07-07 22:50:00.609');
-INSERT INTO `plugin_handle` VALUES ('1676474340008947712', '43', 'regionName', 
'regionName', 2, 3, 6, '{\"required\":\"1\",\"rule\":\"\"}', '2023-07-05 
14:13:24.703', '2023-07-07 22:50:00.610');
 INSERT INTO `plugin_handle` VALUES ('1676474810655993856', '43', 
'totalSizeInBytes', 'totalSizeInBytes', 1, 3, 8, 
'{\"required\":\"0\",\"defaultValue\":\"104857600\",\"rule\":\"\"}', 
'2023-07-05 14:15:16.913', '2023-07-07 22:50:00.611');
 INSERT INTO `plugin_handle` VALUES ('1676475051081887744', '43', 'maxBlockMs', 
'maxBlockMs', 1, 3, 9, 
'{\"required\":\"0\",\"defaultValue\":\"0\",\"rule\":\"\"}', '2023-07-05 
14:16:14.236', '2023-07-07 22:50:00.612');
 INSERT INTO `plugin_handle` VALUES ('1676475293634293760', '43', 
'ioThreadCount', 'ioThreadCount', 1, 3, 10, 
'{\"required\":\"0\",\"defaultValue\":\"1\",\"rule\":\"\"}', '2023-07-05 
14:17:12.065', '2023-07-07 22:50:00.612');
 INSERT INTO `plugin_handle` VALUES ('1676475611772252160', '43', 
'batchSizeThresholdInBytes', 'batchSizeThresholdInBytes', 1, 3, 11, 
'{\"required\":\"0\",\"defaultValue\":\"524288\",\"rule\":\"\"}', '2023-07-05 
14:18:27.915', '2023-07-07 22:50:00.614');
 INSERT INTO `plugin_handle` VALUES ('1676475862545494016', '43', 
'batchCountThreshold', 'batchCountThreshold', 1, 3, 12, 
'{\"required\":\"0\",\"defaultValue\":\"4096\",\"rule\":\"\"}', '2023-07-05 
14:19:27.704', '2023-07-07 22:50:00.615');
 INSERT INTO `plugin_handle` VALUES ('1676476047950508032', '43', 'lingerMs', 
'lingerMs', 1, 3, 12, 
'{\"required\":\"0\",\"defaultValue\":\"2000\",\"rule\":\"\"}', '2023-07-05 
14:20:11.908', '2023-07-07 22:50:00.616');
-INSERT INTO `plugin_handle` VALUES ('1676476207938039808', '43', 'retries', 
'retries', 1, 3, 13, 
'{\"required\":\"0\",\"defaultValue\":\"100\",\"rule\":\"\"}', '2023-07-05 
14:20:50.052', '2023-07-07 22:50:00.617');
 INSERT INTO `plugin_handle` VALUES ('1676476515359551488', '43', 
'baseRetryBackoffMs', 'baseRetryBackoffMs', 1, 3, 14, 
'{\"required\":\"0\",\"defaultValue\":\"100\",\"rule\":\"\"}', '2023-07-05 
14:22:03.347', '2023-07-07 22:50:00.618');
 INSERT INTO `plugin_handle` VALUES ('1676476639779385344', '43', 
'maxRetryBackoffMs', 'maxRetryBackoffMs', 1, 3, 15, 
'{\"required\":\"0\",\"defaultValue\":\"100\",\"rule\":\"\"}', '2023-07-05 
14:22:33.010', '2023-07-07 22:50:00.619');
-INSERT INTO `plugin_handle` VALUES ('1676477312923234304', '43', 
'enableLocalTest', 'enableLocalTest', 2, 3, 15, 
'{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2023-07-05 
14:25:13.500', '2023-07-07 22:50:00.619');
 INSERT INTO `plugin_handle` VALUES ('1676477594361032704', '43', 
'setGiveUpExtraLongSingleLog', 'setGiveUpExtraLongSingleLog', 2, 3, 16, 
'{\"required\":\"0\",\"defaultValue\":\"false\",\"rule\":\"\"}', '2023-07-05 
14:26:20.600', '2023-07-07 22:50:00.620');

Review Comment:
   In MySQL init seed data for plugin_id=43 (loggingHuaweiLts), several 
required plugin_handle rows are missing: `regionName` is absent after 
`accessKeySecret`, and `retries`/`enableLocalTest` are also missing before 
`baseRetryBackoffMs`/`maxRetryBackoffMs`. These fields are required by the 
Huawei LTS config/client and are present in other DB init scripts, so MySQL 
installs will have incomplete handle metadata. Please restore the missing 
plugin_handle rows (scope Tars removals to plugin_id=13 only).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

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

Reply via email to