-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/dop-sceneSet-arallel
- Loading branch information
Showing
486 changed files
with
29,637 additions
and
4,262 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `erda_issue_filter_bookmark` MODIFY COLUMN `filter_entity` varchar(4096) NOT NULL COMMENT 'base64 of filter json'; |
38 changes: 38 additions & 0 deletions
38
.erda/migrations/cmdb/20211008-code-coverage-exec-record.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2021 Terminus, Inc. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
CREATE TABLE `dice_code_coverage_exec_record` | ||
( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键', | ||
`project_id` bigint(20) NOT NULL COMMENT '项目ID', | ||
`status` varchar(128) NOT NULL COMMENT 'running,ready,ending,success,fail,cancel', | ||
`report_status` varchar(128) NOT NULL COMMENT 'running,success,fail,cancel', | ||
`coverage` decimal(65, 2) NOT NULL DEFAULT 0.00 COMMENT '行覆盖率', | ||
`report_url` varchar(255) NOT NULL DEFAULT "" COMMENT '报告下载地址', | ||
`report_content` longtext NOT NULL COMMENT '报告分析内容', | ||
`start_executor` varchar(255) NOT NULL COMMENT '开始执行者', | ||
`end_executor` varchar(255) NOT NULL DEFAULT "" COMMENT '结束执行者', | ||
`time_begin` datetime NOT NULL COMMENT '开始时间', | ||
`time_end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' COMMENT '结束时间', | ||
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | ||
`msg` varchar(2000) NOT NULL DEFAULT "" COMMENT '日志信息', | ||
`report_msg` varchar(2000) NOT NULL DEFAULT "" COMMENT '报告日志信息', | ||
`report_time` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' COMMENT '报告生成时间', | ||
PRIMARY KEY (`id`), | ||
KEY `idx_project_id` (`project_id`) USING BTREE | ||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='代码覆盖率执行记录'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ALTER TABLE dice_issues ADD `reopen_count` int(11) NOT NULL DEFAULT 0 COMMENT 'issue reopen count'; | ||
|
||
UPDATE dice_issues, | ||
(SELECT issue_id, | ||
Count(*) AS reopen | ||
FROM dice_issue_streams | ||
WHERE stream_type = 'TransferState' | ||
AND stream_params LIKE '%"NewState":"重新打开"%' | ||
GROUP BY issue_id) AS stats | ||
SET reopen_count = stats.reopen | ||
WHERE reopen_count = 0 | ||
AND dice_issues.id = stats.issue_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ALTER TABLE tb_gateway_api ADD INDEX `idx_path` (api_path(128)); | ||
ALTER TABLE tb_gateway_api ADD INDEX `idx_runtime` (runtime_service_id); | ||
ALTER TABLE tb_gateway_api ADD INDEX `idx_type_runtime` (redirect_type,runtime_service_id,is_deleted); | ||
ALTER TABLE tb_gateway_route ADD INDEX `idx_api` (api_id,is_deleted); | ||
ALTER TABLE tb_gateway_service ADD INDEX `idx_api` (api_id,is_deleted); | ||
ALTER TABLE tb_gateway_package ADD INDEX `idx_runtime` (runtime_service_id,is_deleted); | ||
ALTER TABLE tb_gateway_package_api ADD INDEX `idx_runtime` (runtime_service_id,is_deleted); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` in (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"service_node\"%") AS `ids`); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"service_node\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return 1; }\"}],\"group\":[\"terminus_key\",\"msp_env_id\",\"service_id\"],\"metric\":\"application_service_node\",\"outputs\":[\"metric\"],\"select\":{\"application_id\":\"#application_id\",\"application_name\":\"#application_name\",\"instrumentation_library\":\"#instrumentation_library\",\"instrumentation_library_version\":\"#instrumentation_library_version\",\"msp_env_id\":\"#msp_env_id\",\"project_id\":\"#project_id\",\"project_name\":\"#project_name\",\"runtime_id\":\"#runtime_id\",\"runtime_name\":\"#runtime_name\",\"service_id\":\"#service_id\",\"service_name\":\"#service_name\",\"terminus_key\":\"#terminus_key\",\"workspace\":\"#workspace\"},\"window\":2}","3.0"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_http_service\"%") AS `ids`); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_http_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?field.elapsed_count:0; }\"}],\"group\":[\"host\",\"req_host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_http\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"http_url\":\"#http_url\",\"peer_service_scope\":\"#peer_service_scope\",\"req_host\":\"#req_host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":1}","3.0"); |
13 changes: 13 additions & 0 deletions
13
.erda/migrations/monitor/20210927-sp_metric_expression.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"service_node\"%") AS `ids`); | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_cache_service\"%") AS `ids`); | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_db_service\"%") AS `ids`); | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_http_service\"%") AS `ids`); | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_mq_service\"%") AS `ids`); | ||
UPDATE `sp_metric_expression` SET `enable` = 0 WHERE `id` = (SELECT `id` FROM (SELECT `id` FROM `sp_metric_expression` WHERE `enable` = 1 AND `expression` LIKE "%\"alias\":\"application_rpc_service\"%") AS `ids`); | ||
|
||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"service_node\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return 1; }\"}],\"group\":[\"terminus_key\",\"msp_env_id\",\"service_id\"],\"metric\":\"application_service_node\",\"outputs\":[\"metric\"],\"select\":{\"application_id\":\"#application_id\",\"application_name\":\"#application_name\",\"instrumentation_library\":\"#instrumentation_library\",\"instrumentation_library_version\":\"#instrumentation_library_version\",\"msp_env_id\":\"#msp_env_id\",\"project_id\":\"#project_id\",\"project_name\":\"#project_name\",\"runtime_id\":\"#runtime_id\",\"runtime_name\":\"#runtime_name\",\"service_id\":\"#service_id\",\"service_name\":\"#service_name\",\"terminus_key\":\"#terminus_key\",\"workspace\":\"#workspace\"},\"window\":2}","3.0"); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_cache_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_cache\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\"},\"window\":2}","3.0"); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_db_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_db\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\"},\"window\":2}","3.0"); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_http_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?field.elapsed_count:0; }\"}],\"group\":[\"host\",\"req_host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_http\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"http_url\":\"#http_url\",\"peer_service_scope\":\"#peer_service_scope\",\"req_host\":\"#req_host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":2}","3.0"); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_mq_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"}],\"group\":[\"host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_mq\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":2}","3.0"); | ||
INSERT `sp_metric_expression`(`attributes`,`expression`,`version`) VALUES("{}","{\"alias\":\"application_rpc_service\",\"filter\":{},\"functions\":[{\"aggregator\":\"sum\",\"field\":\"elapsed\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_mean * field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"count\",\"field_script\":\"function invoke(field, tag){ return field.elapsed_count; }\"},{\"aggregator\":\"sum\",\"field\":\"errors\",\"field_script\":\"function invoke(field, tag){ return tag.error=='true'?field.elapsed_count:0; }\"}],\"group\":[\"host\",\"target_terminus_key\",\"target_application_id\",\"target_runtime_name\",\"target_service_name\",\"target_addon_id\",\"source_terminus_key\",\"source_application_id\",\"source_runtime_name\",\"source_service_name\",\"source_addon_id\"],\"metric\":\"application_rpc\",\"outputs\":[\"metric\"],\"select\":{\"cluster_name\":\"#cluster_name\",\"component\":\"#component\",\"db_type\":\"#db_type\",\"host\":\"#host\",\"peer_service_scope\":\"#peer_service_scope\",\"source_addon_id\":\"#source_addon_id\",\"source_addon_type\":\"#source_addon_type\",\"source_application_id\":\"#source_application_id\",\"source_application_name\":\"#source_application_name\",\"source_project_id\":\"#source_project_id\",\"source_project_name\":\"#source_project_name\",\"source_runtime_id\":\"#source_runtime_id\",\"source_runtime_name\":\"#source_runtime_name\",\"source_service_id\":\"#source_service_id\",\"source_service_name\":\"#source_service_name\",\"source_terminus_key\":\"#source_terminus_key\",\"source_workspace\":\"#source_workspace\",\"target_addon_id\":\"#target_addon_id\",\"target_addon_type\":\"#target_addon_type\",\"target_application_id\":\"#target_application_id\",\"target_application_name\":\"#target_application_name\",\"target_instance_id\":\"#target_instance_id\",\"target_project_id\":\"#target_project_id\",\"target_project_name\":\"#target_project_name\",\"target_runtime_name\":\"#target_runtime_name\",\"target_service_id\":\"#target_service_id\",\"target_service_name\":\"#target_service_name\",\"target_terminus_key\":\"#target_terminus_key\",\"target_workspace\":\"#target_workspace\"},\"window\":2}","3.0"); |
Oops, something went wrong.